3 ms·
I am having the same problem and I think I am going to go with json schema. The problem is that a lot of the things you want to validate aren't easily expressi
by fyp 7y ago
I am having the same problem and I think I am going to go with json schema.
The problem is that a lot of the things you want to validate aren't easily expressible as typescript types (e.g., valid email address, make sure two fields are always the same length, etc). If json schema are more expressive you want to use that as your source to generate the typescript interface instead of the other way around.