Compute intersections across multiple types and unions.
Tuple of types
Finds common members among a tuple of types or unions. Useful for detecting overlapping keys or values.
Will return never if only one type is given.
Can be slow for large tuples due to combinatorial explosion.
type KeysA = 'a' | 'aa'type KeysB = 'a' | 'bb'type KeysX = 'x' | 'bb'type Int1 = Intersect< [ KeysA, KeysB, KeysX ] > // 'a' | 'bb'type Int2 = Intersect< [ true, false, 1, true ] > // true Copy
type KeysA = 'a' | 'aa'type KeysB = 'a' | 'bb'type KeysX = 'x' | 'bb'type Int1 = Intersect< [ KeysA, KeysB, KeysX ] > // 'a' | 'bb'type Int2 = Intersect< [ true, false, 1, true ] > // true
Compute intersections across multiple types and unions.