Skip to content

Commit f9681e2

Browse files
committed
Update comment
1 parent d0fc077 commit f9681e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8850,8 +8850,9 @@ namespace ts {
88508850
return true;
88518851
}
88528852

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.
88558856
function intersectUnionsOfPrimitiveTypes(types: Type[]) {
88568857
let unionTypes: UnionType[] | undefined;
88578858
const index = findIndex(types, t => (t.flags & TypeFlags.UnionOfPrimitiveTypes) !== 0);

0 commit comments

Comments
 (0)