Skip to content

strictNullChecks=false makes z.object() properties optional #2160

Discussion options

You must be logged in to vote

https://github.com/colinhacks/zod#requirements

You must enable strict mode in your tsconfig.json. This is a best practice for all TypeScript projects.

if you disable strictNullChecks, then you are disabling part of strict mode which is required for zod to work correctly.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JacobWeisenburger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2158 on March 07, 2023 16:19.