Hacker News new | ask | show | jobs
by zackify 2491 days ago
this is why I wish typescript added runtime checks in development. Worst case, it would throw a TS error in your browser any time a function call or a network request didn’t match what you typed
1 comments

you don't really want the overhead of checking types on every call, you know where your applications entry points are - if you need checks add them.
but I can’t add checks to the couple places I let users upload json for a form builder, for instance. No way to validate json with typescript natively. That would be awesome