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