Infered type from schema made everything optional #1170
-
So I was just playing around with zod, and created an empty project just with zod installed. Here is my only file
But as you can see on the image the type is inferred with all properties being optional.
And here is the complete stack trace from the tsc compiled js file: Stack TraceD:\wd2\zod-test\node_modules\zod\lib\types.js:123 ZodError: [ Any insight would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You need to ensure your tsconfig specifies |
Beta Was this translation helpful? Give feedback.
You need to ensure your tsconfig specifies
strict: true