3 ms·
There is nothing wrong with Typescript definitions if that works for your use case. Json schema is more flexible: - it can do checks at runtime (to validate un
by jupp0r 9y ago
There is nothing wrong with Typescript definitions if that works for your use case. Json schema is more flexible:
- it can do checks at runtime (to validate untrusted input, for example)
- there are libraries for many other programming languages
- it can express constraints on values as well as on types (size of arrays, string regex matching, integer value ranges, ...)