TypeScript Developer

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.

55 min

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

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans