2 ms·
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
by kaoD 1y ago
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 https://github.com/colinhacks/zod/issues/635
- colinmcd 1y agoYes! 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 https://x.com/colinhacks/status/1919291504587137496