I recently found out about Zod, which is TypeScript-first schema validation with static type inference
We currently use io-ts for this, which is working fine but can be a little confusing at times. Particularly it is written in a functional style, which nothing else in the codebase is.
I recently found out about Zod, which is
TypeScript-first schema validation with static type inference
We currently use io-ts for this, which is working fine but can be a little confusing at times. Particularly it is written in a functional style, which nothing else in the codebase is.
Zod has a nice comparison to io-ts, which brings up some of these problems with
io-ts
.Is it worth trying to switch? Will it make the code cleaner and easier to understand? Will it give useful error messages?