Hacker News new | past | comments | ask | show | jobs | submit login

> Perhaps if TS or an extension allowed "materializing" TS, that is `value instanceof SomeInterface` generated code to check for the existence of appropriate interface members, this could be avoided

It's not perfect and a bit of a bolt-on, but io.ts works reasonably well in this area:

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: