create an element-wise intersection between two tuples. note that the intersection any & T does not produce T for some reason unfortunately.
any & T
T
type A = TupleUnion<[number, unknown, string, boolean], [5, number, string, any, 99]>// A === [number, number, string, boolean>, undefined | 99] Copy
type A = TupleUnion<[number, unknown, string, boolean], [5, number, string, any, 99]>// A === [number, number, string, boolean>, undefined | 99]
create an element-wise intersection between two tuples. note that the intersection
any & T
does not produceT
for some reason unfortunately.