zerokelvin - Why is MySchema.parse making optio...
Why is
MySchema.parse
making optional all of the properties of my schema? How do I stop it from doing this?
Stackblitz: https://stackblitz.com/edit/typescript-pnkeqy?file=index.ts,package.json
StackBlitz
TypeScript Zod Playground (forked) - StackBlitz
Blank starter project for building TypeScript apps.
2 Replies
This happens when you do not use
strict: true
in your tsconfig, more specifically strictNullChecks
has to be enabled.Ah, that's it! That fixed my issue, thanks @Sikari !!