Simplify JS check in index constraint error reporting
Any declaration that is a BinaryExpression is a special javascript declaration, and all JS declarations that are checked for index constraint compatibility are, in fact, relevant.
This commit is contained in:
parent
b4caf646ea
commit
6038ea09c9
1 changed files with 1 additions and 1 deletions
|
@ -20339,7 +20339,7 @@ namespace ts {
|
|||
// this allows to rule out cases when both property and indexer are inherited from the base class
|
||||
let errorNode: Node;
|
||||
if (propDeclaration &&
|
||||
(getSpecialPropertyAssignmentKind(propDeclaration as BinaryExpression) === SpecialPropertyAssignmentKind.ThisProperty ||
|
||||
(propDeclaration.kind === SyntaxKind.BinaryExpression ||
|
||||
propDeclaration.name.kind === SyntaxKind.ComputedPropertyName ||
|
||||
prop.parent === containingType.symbol)) {
|
||||
errorNode = propDeclaration;
|
||||
|
|
Loading…
Reference in a new issue