Case File: Choose One
A tracking event is one of three shapes, and each shape has its own field. Turn a loose bag of optional fields into a discriminated union on kind, so that the compiler knows which fields exist for which event, refuses impossible combinations and notices when a case is forgotten. Real TypeScript in strict mode, generated for you alone.
Case File: Choose One
A tracking event is one of three shapes, and each shape has its own field. Turn a loose bag of optional fields into a discriminated union on kind, so that the compiler knows which fields exist for which event, refuses impossible combinations and notices when a case is forgotten. Real TypeScript in strict mode, generated for you alone.
In this lesson:
- typescript
- union-types
- discriminated-union
- narrowing
- exhaustiveness
- never
- case-file
This lesson is part of a paid plan
Upgrade to Pro to unlock this course, its labs and its exam.
View Pricing Plans