3 ms·
Zod is great. It has some weaknesses - you can't just reuse types from external libraries; it can be verbose. There are some libraries that provide a cleaner e
by rossng 3y ago
Zod is great. It has some weaknesses - you can't just reuse types from external libraries; it can be verbose.
There are some libraries that provide a cleaner experience (e.g. typescript-is/typia). But they rely either on code generation or extending the TypeScript compiler while Zod just makes do with some clever typing.
TypeScript itself will never integrate something like this as it goes against their design goals[1].
[1] https://github.com/microsoft/TypeScript/wiki/TypeScript-Design-Goals https://github.com/microsoft/TypeScript/wiki/TypeScript-Desi...