Discriminated Unions and Tagged Types in TypeScript

Learn how discriminated unions and tagged types let you model precise application state in TypeScript, with exhaustive checking that catches missing cases.