File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8850,8 +8850,9 @@ namespace ts {
8850
8850
return true;
8851
8851
}
8852
8852
8853
- // Remove all unions of primitive types from the given list and replace them with a
8854
- // single union containing an intersection of those primitive types.
8853
+ // If the given list of types contains more than one union of primitive types, replace the
8854
+ // first with a union containing an intersection of those primitive types, then remove the
8855
+ // other unions and return true. Otherwise, do nothing and return false.
8855
8856
function intersectUnionsOfPrimitiveTypes(types: Type[]) {
8856
8857
let unionTypes: UnionType[] | undefined;
8857
8858
const index = findIndex(types, t => (t.flags & TypeFlags.UnionOfPrimitiveTypes) !== 0);
You can’t perform that action at this time.
0 commit comments