Skip to content

Glossary: TypeScript Basics

switch

A JavaScript statement that picks a branch by a value. TypeScript narrows the value in each `case` and notices a missing case in a union.

Where the book teaches it

Related terms

neverdiscriminated unionnoFallthroughCasesInSwitch