Colin McDonnell
Colin McDonnell
Thanks! The optionality stuff has been updated already in https://github.com/colinhacks/zod/pull/4090 The `JSON.stringify` approach in `additionalProperties` seems a little fragile to me, and I'm not sure the complexity is worth it,...
cc @pax-k I think this is 90% done, would love to see it across the finish line. Or if you're hosed let me know and I'll open a new PR...
What's the code that you're bundling? Difficult to debug this otherwise. Please also upgrade to the latest beta before you try again. You'll need to update your imports to `zod/v4`:...
I was originally planning to ship source maps and declaration maps alongside the original source, but I think that causes issues for people, and I'm not convinced it's actually a...
Sorry, this will never happen. Litigated extensively elsewhere. @dosu explain
While it seems reasonable that Zod could have a `z.json` that automatically calls `JSON.parse()` during Zod's own `parse()` call, ultimately 1) This ship has sailed somewhat since `z.json()` already expects...
I don't think that aligns with the Zod's concept of "coercion" - accepting `unknown` input and using JS built-ins to convert to a primitive value.
> I don't think that aligns with the Zod's concept of "coercion" - accepting unknown input and using JS built-ins to convert to a primitive value. You guys are cherrypicking...
In Zod 4, you can access the set of values on a union of literals with `._zod.values`. This may be what you're looking for. ```ts const schema = z.union([z.literal("a"), z.literal("b"),...