Colin McDonnell

Results 258 comments of Colin McDonnell

Apologies, this actually is a bug. See my reply here: https://github.com/colinhacks/zod/pull/3282

Good catch. For security reasons, Zod isn't supposed to print the input data when it throws an error...but you've found the exception here with `ZodInvalidLiteralIssue`. This will be fixed in...

Good catch, and a clever fix. Ultimately I want to avoid relying on ZodFirstPartySchemaTypes so that Zod is more compatible with user-defined `ZodType` subclasses. The right approach here would be...

It looks like you don't have strict mode active in your `tsconfig.json`, that would account for why all the properties of your object schemas are optional.

Super hard to do correctly. If someone wants to make a specific API proposal here, I'm all ears. But this is the kind of thing that's almost impossible to make...

Yeah the code still needs to be defined in `ZodIssueCode`. This is necessary for the discriminated union to work properly (`ZodIssue` is a big discriminated union of every issue type)...

> Effect which is either sync or async depending on if the schema has or not async transforms Unfortunately Zod doesn't actually know ahead of time if a schema contains...

It certainly *should* be possible for Zod's parsing engine to return a Promise only when necessary. In Zod 4 the parsing engine is getting refactored, so I'll try to include...