Skip to content

Glossary: TypeScript Basics

discriminated union

Also written: discriminant, kind property

A union of object types that each have a shared property with a literal type, such as `kind`. Checking that property narrows to one member, as with Kettle & Crane's card, giftCard and invoice payments.

Where the book teaches it

Related terms

union typeliteral typenarrowingswitch