Merge pull request #2557 from Microsoft/exportEqualsDtsFix

Ensure export= is emitted correctelly in declaration files
This commit is contained in:
Mohamed Hegazy
2015-03-31 20:39:15 -07:00
11 changed files with 113 additions and 28 deletions

View File

@@ -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);
}