nicolas_rusig
nicolas_rusig
DTDrizzle Team
Created by Noahh on 5/9/2023 in #help
Using with NestJS and Zod
It seems the issue comes from the default tsconfig.ts of Nestjs. Even normal Zod has this issue on Nestjs. strictNullChecks=false makes z.object() properties optional From the documentation of Zod, the strict mode must be enabled for Zod to work properly and strictNullChecks is part of the strict mode so needs to enable too you should modify your tsconfig.ts to have this { "compilerOptions": { "strictNullChecks": true, "strict": true, } }
2 replies