3 ms·
Not exactly what you want, I think, but there is zod [0]. I really would like to see nominal typing support in TypeScript. Currently, it's hard to validate a p
by renke1 5y ago
Not exactly what you want, I think, but there is zod [0].
I really would like to see nominal typing support in TypeScript. Currently, it's hard to validate a piece of data (or parse for that matter) once and have other functions only operate on that validated data. There are (ugly?) workarounds though [1].
[0]: https://github.com/colinhacks/zod https://github.com/colinhacks/zod
[1]: https://gist.github.com/dcolthorp/aa21cf87d847ae9942106435bf47565d https://gist.github.com/dcolthorp/aa21cf87d847ae9942106435bf...