Skip to content

Glossary: TypeScript Beyond the Basics

Exclude

Also written: Exclude<U, M>

A utility type that removes from a union the members that match another type. `Exclude<Status, "shipped" | "cancelled">` leaves `"pending" | "paid"`.

Where the book teaches it

Related terms

ExtractNonNullableDistributive