mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 11:54:44 -06:00
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
@ -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…
x
Reference in New Issue
Block a user