Hacker News new | ask | show | jobs
by tubthumper8 844 days ago
TypeScript has discriminated unions if that's what you were thinking of

https://www.typescriptlang.org/docs/handbook/2/narrowing.htm...