mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Permit assignment this.xxx when class has index signature
This commit is contained in:
@@ -20192,7 +20192,7 @@ namespace ts {
|
||||
markAliasReferenced(parentSymbol, node);
|
||||
}
|
||||
if (!prop) {
|
||||
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;
|
||||
if (!(indexInfo && indexInfo.type)) {
|
||||
if (isJSLiteralType(leftType)) {
|
||||
return anyType;
|
||||
|
||||
Reference in New Issue
Block a user