Skip to content

Glossary: React Beyond the Basics

narrowing

Also written: narrows, narrowed

TypeScript working out a more specific type from a check, such as inside a `case` or after an `if`. It is how `data` becomes `Product[]` after the loading and error checks.

Where the book teaches it

Related terms

discriminated unioninstanceof