News for hackers. Stuff that matters.
Re:TypeScript’s quirks: How inconsistencies make the languag... by fyp on Friday January 31, 2020 @09:50PM (#22208284)
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.

There are no comments on this comment yet.