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 free 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
zod 3.21.4
({ }) satisfies { x: undefined }; // 1 ({ }) satisfies z.infer<typeof x>; // 2 const x = z.object({ x: z.undefined() });
1
2
x
zod
It is not the problem with strict: true in tsconfig.
strict: true
The text was updated successfully, but these errors were encountered:
#2464
sadly this is already known and unresolved.
Sorry, something went wrong.
Does exactOptionalPropertyTypes in the compiler options in tsconfig.json have any effect on this, e.g.?
exactOptionalPropertyTypes
{ "compilerOptions": { "exactOptionalPropertyTypes": true } }
Cheers
No branches or pull requests
Given:
zod 3.21.4
Expected:
1
should not typecheck because field is not optional2
should not typecheck as well becausex
models the same typeActual:
1
typechecks (and it is correct)2
does not typecheck (zod
for unknown reason makes field optional)It is not the problem with
strict: true
in tsconfig.The text was updated successfully, but these errors were encountered: