We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dc1f40 commit aaa5592Copy full SHA for aaa5592
src/compiler/checker.ts
@@ -20192,7 +20192,7 @@ namespace ts {
20192
markAliasReferenced(parentSymbol, node);
20193
}
20194
if (!prop) {
20195
- const indexInfo = assignmentKind === AssignmentKind.None || !isGenericObjectType(leftType) ? getIndexInfoOfType(apparentType, IndexKind.String) : undefined;
+ const indexInfo = assignmentKind === AssignmentKind.None || !isGenericObjectType(leftType) || isThisTypeParameter(leftType) ? getIndexInfoOfType(apparentType, IndexKind.String) : undefined;
20196
if (!(indexInfo && indexInfo.type)) {
20197
if (isJSLiteralType(leftType)) {
20198
return anyType;
0 commit comments