3 ms·
Hopefully someone can compare Zod4 to TypeBox. Last I looked, the nice thing about TypeBox was that is _was_ JsonSchema just typed which was nice for interoper
by sroussey 1y ago
Hopefully someone can compare Zod4 to TypeBox.
Last I looked, the nice thing about TypeBox was that is _was_ JsonSchema just typed which was nice for interoperability.
- hdjrudni 1y agoI was using TypeBox but switched to Zod. I like TypeBox but I found I don't actually need my schema to be a JSON Schema and the one time I did want a JSON Schema it was hard to get actual JSON back out of TypeBox. The thing I like about Zod is the "refinements" and "transforms" and the new "overwrite" in Zod 4 was just what I wanted. TypeBox does have a transform (https://github.com/sinclairzx81/typebox?tab=readme-ov-file#types-transform https://github.com/sinclairzx81/typebox?tab=readme-ov-file#t...) but you can't transform and then apply more validations and then maybe another transform, etc. For example, I like to trim strings before checking length.