Skip to content

Commit db1820b

Browse files
committed
Explore at least 10 levels of constraints before checking for deeply nested types
1 parent ee1f262 commit db1820b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11053,7 +11053,7 @@ namespace ts {
1105311053
return t.immediateBaseConstraint = noConstraintType;
1105411054
}
1105511055
let result;
11056-
if (!isDeeplyNestedType(t, stack, stack.length)) {
11056+
if (stack.length < 10 || !isDeeplyNestedType(t, stack, stack.length)) {
1105711057
stack.push(t);
1105811058
constraintDepth++;
1105911059
result = computeBaseConstraint(getSimplifiedType(t, /*writing*/ false));

0 commit comments

Comments
 (0)