Pick specific members from a union by type.
A union type
The type to match union members against
1.1.0
Extracts only the union members that extend a given type. Useful for filtering union types without modifying the original type.
type U = string | number | boolean | null;type Filtered = UnionPick< U, string | number >; // string | number Copy
type U = string | number | boolean | null;type Filtered = UnionPick< U, string | number >; // string | number
Pick specific members from a union by type.