mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
update getSymbolInfo
This commit is contained in:
1 parent
e0ffc47acc
commit
bbeeb8df7f
4 files changed
+53
-14
No files matched your search
+5
-12
@@ -6849,6 +6849,11 @@ module ts {
|
||||
}
|
||||
|
||||
function getSymbolInfo(node: Node) {
|
||||
if (isDeclarationOrFunctionExpressionOrCatchVariableName(node)) {
|
||||
// In this case, we call getSymbolOfNode instead of getSymbolInfo because it is a declaration
|
||||
return getSymbolOfNode(node.parent);
|
||||
}
|
||||
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.Identifier:
|
||||
case SyntaxKind.PropertyAccess:
|
||||
@@ -6890,18 +6895,6 @@ module ts {
|
||||
return moduleType ? moduleType.symbol : undefined;
|
||||
}
|
||||
break;
|
||||
|
||||
// External module name in an ambient declaration
|
||||
case SyntaxKind.ModuleDeclaration:
|
||||
// Property with name as string or numeric literal
|
||||
case SyntaxKind.Property:
|
||||
case SyntaxKind.PropertyAssignment:
|
||||
// Enum member with string or numeric literal name
|
||||
case SyntaxKind.EnumMember:
|
||||
if ((<Declaration>node.parent).name === node) {
|
||||
return getSymbolOfNode(node.parent);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user