mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Handle computed property names
This commit is contained in:
1 parent
01bbc4de2e
commit
e41533acc7
3 files changed
+33
-28
No files matched your search
@@ -62,11 +62,16 @@ namespace ts.FindAllReferences {
|
||||
node.parent.parent.left === node.parent ?
|
||||
node.parent.parent :
|
||||
undefined;
|
||||
return binaryExpression && getAssignmentDeclarationKind(binaryExpression) !== AssignmentDeclarationKind.None ?
|
||||
getDeclarationForDeclarationSpan(binaryExpression) :
|
||||
undefined;
|
||||
if (binaryExpression && getAssignmentDeclarationKind(binaryExpression) !== AssignmentDeclarationKind.None) {
|
||||
return getDeclarationForDeclarationSpan(binaryExpression);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
|
||||
// Handle computed property name
|
||||
const propertyName = findAncestor(node, isComputedPropertyName);
|
||||
return propertyName ?
|
||||
getDeclarationForDeclarationSpan(propertyName.parent) :
|
||||
undefined;
|
||||
}
|
||||
|
||||
if (isConstructorDeclaration(node.parent) ||
|
||||
|
||||
Reference in new issue
Block a user