3 ms·
> For more complex cases I find myself wishing I could just turn Typescript into some kind of schema validation for JSON. Not sure if this is what you're looki
by yesbabyyes 5y ago
> For more complex cases I find myself wishing I could just turn Typescript into some kind of schema validation for JSON.
Not sure if this is what you're looking for, and whether it's powerful and expressive enough for your use case, but you can use typescript-json-schema¹ for this, and validate with eg ajv.
¹https://github.com/YousefED/typescript-json-schema https://github.com/YousefED/typescript-json-schema