mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 10:46:28 -05:00
update getSymbolInfo
This commit is contained in:
@@ -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