Hacker News new | ask | show | jobs
by breatheoften 2559 days ago
There are libraries that let you define runtime schema objects which you can invoke to validate incoming data — and they also let you extract static types from those schemas so you don’t have to write things twice:

https://github.com/gcanti/io-ts https://github.com/pelotom/runtypes