Skip to main content

Practice

Unions & Narrowing β€” Practice

intermediate~18 min of coding3 challenges

Runtime narrowing: typeof-based formatters, a discriminated-union reducer, and exhaustive switches with a default that throws.

Checking your progress…0%

What you will practice

  1. Narrowing Formatterintermediate
  2. Discriminated Reducerintermediate
  3. Exhaustive Switchintermediate

Need the concept first? Re-read the lesson.