Fix declaration emit for imported export alias specifiers (#19852)

* Badness

* Revert #3641, whose original bug has been fixed by other means

* Add another repro
This commit is contained in:
Wesley Wigham
2017-11-08 18:44:46 -08:00
committed by GitHub
parent c6fddbad27
commit ceaeffa3ab
17 changed files with 254 additions and 31 deletions

View File

@@ -2161,7 +2161,6 @@ namespace ts {
return forEachEntry(symbols, symbolFromSymbolTable => {
if (symbolFromSymbolTable.flags & SymbolFlags.Alias
&& symbolFromSymbolTable.escapedName !== "export="
&& !getDeclarationOfKind(symbolFromSymbolTable, SyntaxKind.ExportSpecifier)
&& !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration)))
// If `!useOnlyExternalAliasing`, we can use any type of alias to get the name
&& (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration))) {