devtypes - v1.1.0
    Preparing search index...

    Type Alias UnionOmit<U, T>

    UnionOmit: U extends T ? never : U

    Omit specific members from a union by type.

    Type Parameters

    • U

      A union type

    • T

      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