Get the intersection of two union types.
First union type
Second union type
Produces a union of types that are present in both A and B.
A
B
type A = 'a' | 'b' | 'c';type B = 'a' | 'x';type C = UnionDifference< A, B >; // 'a' Copy
type A = 'a' | 'b' | 'c';type B = 'a' | 'x';type C = UnionDifference< A, B >; // 'a'
Get the intersection of two union types.