Show HN: TypeScript types that conform to JSON schemas without code generation
github.comThis library allows you to write code that generates Typescript type/JSON schema pairs <T, s> such that
1. Any type that s can validate is assignable to T
2. As few objects as possible that are assignable to T cannot be validated by s.
This allows you to write JSON schemas and use the corresponding Typescript type without having to resort to code generation, maintaining two types side-by-side, or re-writing a whole JSON schema validator in something like io-ts.
Hope it's useful to someone!