Skip to content

Glossary: TypeScript Basics

literal type

Also written: literal types, union of literals

A type with exactly one value, such as `"UPS"` or `12`. A union of literals like `"UPS" | "USPS" | "FedEx"` lists the only allowed choices.

Where the book teaches it

Related terms

wideningas constunion typediscriminated union