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

This article seems relevant, https://www.typescriptlang.org/docs/handbook/advanced-types.... . Particularly the part on discriminated unions. I'm just now learning TypeScript, so I have yet to actually implement anything this way.



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

Search: