|
|
|
|
|
by aleclarsoniv
613 days ago
|
|
I'd recommend TypeBox[1] as an alternative, which has a runtime “compiler” for generating optimized JS functions from the type objects. It also produces a JSON schema, which can be useful for generating API docs and API clients if needed. It also has a companion library[2] for generating TypeBox validators from TypeScript definitions, which I'm currently using in an RPC library I'm working on. [1]: https://github.com/sinclairzx81/typebox
[2]: https://github.com/sinclairzx81/typebox-codegen |
|
After doing a deep-dive comparison, I’m left wondering why to ever choose Zod over TypeBox.