We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1c97e1 commit 49fd1adCopy full SHA for 49fd1ad
1 file changed
src/compiler/checker.ts
@@ -20233,7 +20233,10 @@ namespace ts {
20233
// perform property check if property or indexer is declared in 'type'
20234
// this allows to rule out cases when both property and indexer are inherited from the base class
20235
let errorNode: Node;
20236
- if (propDeclaration && (propDeclaration.name.kind === SyntaxKind.ComputedPropertyName || prop.parent === containingType.symbol)) {
+ if (propDeclaration &&
20237
+ (getSpecialPropertyAssignmentKind(propDeclaration as BinaryExpression) === SpecialPropertyAssignmentKind.ThisProperty ||
20238
+ propDeclaration.name.kind === SyntaxKind.ComputedPropertyName ||
20239
+ prop.parent === containingType.symbol)) {
20240
errorNode = propDeclaration;
20241
}
20242
else if (indexDeclaration) {
0 commit comments