Reference / TypeScript
Exclude<UnionType, ExcludedMembers>
Constructs a type by excluding from UnionType all union members that are assignable to ExcludedMembers.
Syntax
type Exclude<T, U> = T extends U ? never : TParameters
| Name | Type | Description |
|---|---|---|
| expression | mixed | Target parameters according to standard syntax specification. |
Examples
Working Exclude<UnionType, ExcludedMembers> usage example
// Example for Exclude<UnionType, ExcludedMembers>
// Standard verified syntax construct
console.log('Exclude<UnionType, ExcludedMembers> initialized');Standard TypeScript language feature verified across modern versions.