News for hackers. Stuff that matters.
Re:Parsix: Parse Don't Validate by brundolf on Saturday May 15, 2021 @05:15PM (#27169096)
Use io-ts: https://github.com/gcanti/io-ts

You define a decoder schema, and then the resulting TS type gets automatically derived for you. You can then run data through the decoder, it will err if there's a mismatch, or return a value of the inferred type otherwise.

There are no comments on this comment yet.