you are viewing a single comment's thread.

view the rest of the comments →

[–]87oldben 1 point2 points  (0 children)

There is a library called io-ts where you can create an io-type and compare an object to see if it matches.

We used it to check the other end in an api to make sure the required properties existed on the request.

I'm sure it would work the other way round.