Colin McDonnell

Results 468 comments of Colin McDonnell

This feature has been implemented in the [Zod 4 beta](https://v4.zod.dev/api#stringbool) and I'm not planning to backport it to Zod 3 for compatibility reasons I'm afraid. But thanks for the PR,...

Assignability issues are complicated. This is usually due to multiple versions of Zod existing simultaneously in your codebase. @dosu chime in.

Here's a dedicated guide for library authors that answers some common questions: https://v4.zod.dev/library-authors 1. Best practices around peer dependencies 2. How to support Zod v3 and Zod v4 simultaneously 3....

I strongly encourage you to bump the version and continue maintaining this! Many people will want a hassle-free migration path, while also getting the perf benefits of Zod 4. The...

I'm afraid these are both intentional and known changes in Zod 4. The top-level `path` param in the parse methods was just a mistake. That was intended as an internal...

linking my Zod 4 PR so people can find this tracking issue: https://github.com/colinhacks/zod/pull/4074

Yeah, it's a known unsoundness. There's nothing Zod can really do here. `z.treeifyError` is a convenience method, and it works in the 98% case. You can do get the generic...

> Here we're seeing the consequence of designing ZodDefault to change the input to a default value if it's undefined, rather than just changing the output value if it's undefined....

I think it would be great to see you guys adopt `.meta()` BUT I have nothing against the `prototype`/`declare module` approach in general. I think it's a totally valid way...