You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that when baseUnion is used as the first in the intersection array, it works fine. When baseUnion appears second, UnionToIntesection flattens it too much, which causes the final unionAsSecondInIntersection struct to be never.
Workaround
Use union as the first element of the array provided to intersection. unionAsFirstInIntersection is constructed correctly.
The text was updated successfully, but these errors were encountered:
Because
intersection
usesUnionToIntersection
on its arguments (except for the first one), it flattens anyunion
s that appear in theintersection
.TypeScript playground
Notice that when
baseUnion
is used as the first in theintersection
array, it works fine. WhenbaseUnion
appears second,UnionToIntesection
flattens it too much, which causes the finalunionAsSecondInIntersection
struct to benever
.Workaround
Use
union
as the first element of the array provided tointersection
.unionAsFirstInIntersection
is constructed correctly.The text was updated successfully, but these errors were encountered: