News for hackers. Stuff that matters.
Re:Zod 4 by kaoD on Monday May 19, 2025 @04:40PM (#44034605)
Sorry if it's mentioned in the article but I'm on mobile.

Is fixing .optional() in TS[0] part of the 9/10 top-issues fixed? This has been my biggest pain point with Zod... but still Zod is so good I still choose to just deal with it :) Thanks for an amazing part of the ecosystem.

[0] https://github.com/colinhacks/zod/issues/635

Re:Zod 4 by colinmcd on Tuesday May 20, 2025 @03:26AM (#44038742)
Yes! Zod now differentiates between `z.string().optional()` and `z.union([z.string(), z.undefined()])` (as in TypeScript itself). Details: https://x.com/colinhacks/status/1919291504587137496