10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a fr 8000 ee GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to build a function that only accepts strictObject() schemas, but it turns out those two schemas produce the exact same type:
strictObject()
import * as zod from '@zod/mini'; const x = zod.strictObject({}); // const x: zod.ZodMiniObject<{}, {}> const y = zod.object({}); // const y: zod.ZodMiniObject<{}, {}>
I would expect to either have a dedicated type like ZodMiniStrictObject<{}, {}> or a flag like ZodMiniObject<{}, {}, 'strict'>.
ZodMiniStrictObject<{}, {}>
ZodMiniObject<{}, {}, 'strict'>
The text was updated successfully, but these errors were encountered:
Not planned currently but I'll leave this open to gauge interest
Sorry, something went wrong.
I’m just curios about the reasoning behind this decision. In Zod v3 this was possible.
No branches or pull requests
I want to build a function that only accepts
strictObject()
schemas, but it turns out those two schemas produce the exact same type:I would expect to either have a dedicated type like
ZodMiniStrictObject<{}, {}>
or a flag likeZodMiniObject<{}, {}, 'strict'>
.The text was updated successfully, but these errors were encountered: