← All projects
intermediate4h

Typed Study Tracker

Model a small study-tracking domain with TypeScript's type system: discriminated unions for lesson state, derived types for updates, and a type guard for data loaded from storage.

Tracks: TypeScript

Objectives

  • Design a discriminated union that makes an impossible lesson state unrepresentable
  • Derive an update type with Partial rather than duplicating a shape
  • Write a type guard that safely validates data of type unknown
  • Use a generic function to operate on the tracker without losing type information

Before you start

Milestones

0%

References