diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4a5a85db1398b..20f70b867980e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -25081,7 +25081,7 @@ namespace ts { const substituteConstraints = !(checkMode && checkMode & CheckMode.Inferential) && someType(type, isGenericTypeWithUnionConstraint) && (isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode)); - return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable && !isMappedTypeGenericIndexedAccess(t) ? getBaseConstraintOrType(t) : t) : type; + return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable ? getBaseConstraintOrType(t) : t) : type; } function isExportOrExportExpression(location: Node) {