Omit specific members from a union by type.
A union type
The type to exclude from the union
1.1.0
Excludes union members that extend a given type. Complementary to UnionPick, useful for narrowing unions.
type U = string | number | boolean | null;type Filtered = UnionOmit< U, string | null >; // number | boolean Copy
type U = string | number | boolean | null;type Filtered = UnionOmit< U, string | null >; // number | boolean
Omit specific members from a union by type.