Lesson · Intermediate · 25 min
Unions over booleans
Replacing flag combinations with a union of states that cannot contradict each other.
- typescript
- lesson
Inside this lesson
- You will: Write a discriminated union for a state
- You will: Exhaustively handle it
- Sections
- 3
- Exercise
- Yes
The full lesson opens with a membership that covers TypeScript.
Sign in if you already subscribe.
Sign in
