mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Permit assignment this.xxx when class has index signature
This commit is contained in:
parent
7dc1f40dc1
commit
aaa55923e8
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user