Skip to content

Commit aa1c25d

Browse files
committed
Remove unnecessary check in getNarrowableTypeForReference
1 parent 53809d8 commit aa1c25d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25081,7 +25081,7 @@ namespace ts {
2508125081
const substituteConstraints = !(checkMode && checkMode & CheckMode.Inferential) &&
2508225082
someType(type, isGenericTypeWithUnionConstraint) &&
2508325083
(isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
25084-
return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable && !isMappedTypeGenericIndexedAccess(t) ? getBaseConstraintOrType(t) : t) : type;
25084+
return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable ? getBaseConstraintOrType(t) : t) : type;
2508525085
}
2508625086

2508725087
function isExportOrExportExpression(location: Node) {

0 commit comments

Comments
 (0)