Re:Designing the perfect TypeScript schema validation library
by IggleSniggle on Thursday March 12, 2020 @09:27PM
(#22563895)
This looks like it generates JSON Schema, but not runtime validators?
Re:Designing the perfect TypeScript schema validation library
by coffexx on Friday March 13, 2020 @04:37AM
(#22565697)
For that you could use something like ajv.
Json schema has the advantage of being usable across different languages, but it does come with the overhead of maintaining those files and keeping it in sync with your other repos.
It's certainly conceivable to build an equivalent for Zod but you'll eventually want to validate types that aren't expressible in TS (i.e. Integer).