3 ms·
It doesn't use json schema but you might be interested in something like this: https://gcanti.github.io/io-ts/ https://gcanti.github.io/io-ts/ (You can define
by lhnz 5y ago
It doesn't use json schema but you might be interested in something like this: https://gcanti.github.io/io-ts/ https://gcanti.github.io/io-ts/
(You can define runtime encoder/decoders which produce typed values.)
- brundolf 5y agoio-ts is fantastic (I linked it myself above). The killer feature is that it infers the static types of your runtime schemas for you, so you don't have to define them twice. You make a change to the schema, the rest of your code will typecheck against it.