Skip to content
Typetypesv0.14.4

TypedExtract

Type-safe version of Extract that ensures the extracted types are valid members

type TypedExtract<Target, UnionKeys extends Target> = Extract<
    Target,
    UnionKeys
>;

Target

The union type to extract from

Target

UnionKeys

The types to extract from the union

UnionKeys extends Target