Comments (2)
That can be done via the .rest()
method:
const T = v
.object({
x: v.number(),
})
.rest(v.union(v.string(), v.number()));
from valita.
I think that this question has been answered, so closing this 👍
from valita.
Related Issues (20)
- v.lazy() causes error HOT 1
- Validating typed arrays HOT 5
- Deno support HOT 1
- Exporting AbstractType HOT 2
- A safe way to transform Zod parser to Valita HOT 2
- Input & output types HOT 10
- TS 4094, issueTrue is private HOT 2
- Can t.Infer be made to _not_ unroll deep schemas? HOT 4
- Annotation support? HOT 5
- Runtime schema inspection / type narrowing HOT 5
- RFE: Add a way to infer readonly types HOT 2
- Improved error reporting for .map() HOT 2
- Help developer catch error early HOT 6
- Should we add `intersect` method to UnionType? HOT 2
- export type classes HOT 6
- Why I can't use `.try(value)` when using `.optional()`? HOT 3
- What is the purpose of `.default(...)` ? HOT 2
- The `protoless` optimization breaks Firebase/Firestore HOT 1
- Passing ParseOptions to chain? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valita.