Skip to content

Commit 504fe15

Browse files
committed
PR feedback
1 parent 08946cd commit 504fe15

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18814,6 +18814,7 @@ namespace ts {
1881418814
// If both the source and target are intersections, we can remove the common types from them before formal normalization,
1881518815
// and run a simplified comparison without those common members.
1881618816
if (originalSource.flags & originalTarget.flags & TypeFlags.Intersection) {
18817+
// Set 1 for elements occuring in the source, then 2 for elements occuring in both source and target
1881718818
const combinedTypeSet = new Map<number, number>();
1881818819
forEach((originalSource as IntersectionType).types, t => combinedTypeSet.set(getTypeId(t), 1));
1881918820
let hasOverlap = false;
@@ -19342,9 +19343,6 @@ namespace ts {
1934219343
// equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion
1934319344
// and issue an error. Otherwise, actually compare the structure of the two types.
1934419345
function recursiveTypeRelatedTo(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState, recursionFlags: RecursionFlags): Ternary {
19345-
if (relation.size > 2 ** 20) {
19346-
debugger;
19347-
}
1934819346
if (overflow) {
1934919347
return Ternary.False;
1935019348
}

0 commit comments

Comments
 (0)