Fixes searches for export * as 'identifier' (#39533)

* Fixes searches for export * as 'identifier'
Fixes #39006

* Fix the context span to export declaration (was incorrectly set to sourceFile in prev commit)
This commit is contained in:
Sheetal Nandi authored and GitHub committed 2020-07-09 13:45:43 -07:00
1 parent bf1ea6508b
commit b397d1fd4a
4 files changed
+15 -7

No files matched your search

+1
View File
@@ -132,6 +132,7 @@ namespace ts.FindAllReferences {
return node.parent.parent;
case SyntaxKind.ImportClause:
case SyntaxKind.NamespaceExport:
return node.parent;
case SyntaxKind.BinaryExpression:
+3
View File
@@ -481,6 +481,9 @@ namespace ts.FindAllReferences {
return exportInfo(symbol, getExportKindForDeclaration(exportNode));
}
}
else if (isNamespaceExport(parent)) {
return exportInfo(symbol, ExportKind.Named);
}
// If we are in `export = a;` or `export default a;`, `parent` is the export assignment.
else if (isExportAssignment(parent)) {
return getExportAssignmentExport(parent);