Colin McDonnell

Results 423 comments of Colin McDonnell

The current behavior is sound and intentional. Preprocess can accept anything, hence the input type is `unknown`. The `defaultValues` param lets you specify pre-transform defaults, so the value needs to...

I believe this was due to some unfortunate type issues in some early versions of Zod 3.25. I recommend upgrading to Zod 4 or downgrading to Zod 3.25. In any...

Based on conversations with some other maintainers, there's been some restructuring to make stuff easier for maintainers. Here's a dedicated guide for library authors that answers some common questions: https://v4.zod.dev/library-authors...

I'm planning to do a proper fix in which Zod schemas track whether or not they perform transforms and bubble that information up through composite types. Ultimately there needs to...

Hey! Thanks for getting these thoughts in pre-stable release :) > Separate required Flag from the Schema I was chatting with @mmkal about the opposite. Adding an `optional` flag to...

Those errors are fixed, upgrade to 3.25.56 👍

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....

Is there a reason you need `declaration: true` in your tsconfig? Typically this isn't necessary for application code. https://stackoverflow.com/questions/68463963/typescript-the-inferred-type-of-this-node-exceeds-the-maximum-length-the-compi If you need declaration files for some reason, you may have...

This is out of scope for Bun. Currently `tsc` is the only tool in existence for reliably generating declaration files. Doing it right would require re-implementing the entire TypeScript compiler...

Nice catch! 😅 Fixed in the latest beta.