devtypes - v2.0.0
    Preparing search index...

    Type Alias UnionDifference<A, B>

    UnionDifference: A extends B ? never : A

    Get the difference of two union types.

    Type Parameters

    • A

      First union type

    • B

      Second union type

    Produces a union of types that are in A but not in B.

    type A = 'a' | 'b' | 'c';
    type B = 'a' | 'x';
    type C = UnionDifference< A, B >; // 'b' | 'c'