Open Carl-Foster opened 2 weeks ago
Nevermind, looks like it was due to my tsconfig
not setting strict: true
.
The reason I noted this here was due to creating the application through the create-cloudflare
method. The OpenAPI rest application starter has strict:false
I've reopened the issue, to remember to update the create-cloudflare template later Thanks for finding this @Carl-Foster
For some reason, all inferred types of ZodObject have the properties as optional. This is particularly annoying when extracting a type from a discriminated union.
Without
chanfana
, this works as expectedTypeScript version 5.6.3 zod 3.23.8 hono 4.6.9 chanfana 2.1.0