mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Merge pull request #2557 from Microsoft/exportEqualsDtsFix
Ensure export= is emitted correctelly in declaration files
This commit is contained in:
@@ -1109,7 +1109,7 @@ module ts {
|
||||
|
||||
// Check if symbol is any of the alias
|
||||
return forEachValue(symbols, symbolFromSymbolTable => {
|
||||
if (symbolFromSymbolTable.flags & SymbolFlags.Alias) {
|
||||
if (symbolFromSymbolTable.flags & SymbolFlags.Alias && symbolFromSymbolTable.name !== "export=") {
|
||||
if (!useOnlyExternalAliasing || // We can use any type of alias to get the name
|
||||
// Is this external alias, then use it to name
|
||||
ts.forEach(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) {
|
||||
@@ -1950,6 +1950,10 @@ module ts {
|
||||
case SyntaxKind.SourceFile:
|
||||
return true;
|
||||
|
||||
// Export assignements do not create name bindings outside the module
|
||||
case SyntaxKind.ExportAssignment:
|
||||
return false;
|
||||
|
||||
default:
|
||||
Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user