@@ -11128,6 +11128,12 @@ module ts {
11128
11128
}
11129
11129
11130
11130
function getAliasNameSubstitution(symbol: Symbol): string {
11131
+ // If this is es6 or higher, just use the name of the export
11132
+ // no need to qualify it.
11133
+ if (languageVersion >= ScriptTarget.ES6) {
11134
+ return undefined;
11135
+ }
11136
+
11131
11137
let node = getDeclarationOfAliasSymbol(symbol);
11132
11138
if (node) {
11133
11139
if (node.kind === SyntaxKind.ImportClause) {
@@ -11143,15 +11149,12 @@ module ts {
11143
11149
11144
11150
function getExportNameSubstitution(symbol: Symbol, location: Node): string {
11145
11151
if (isExternalModuleSymbol(symbol.parent)) {
11146
- var symbolName = unescapeIdentifier(symbol.name);
11147
11152
// If this is es6 or higher, just use the name of the export
11148
11153
// no need to qualify it.
11149
11154
if (languageVersion >= ScriptTarget.ES6) {
11150
11155
return undefined;
11151
11156
}
11152
- else {
11153
- return "exports." + symbolName;
11154
- }
11157
+ return "exports." + unescapeIdentifier(symbol.name);
11155
11158
}
11156
11159
let node = location;
11157
11160
let containerSymbol = getParentOfSymbol(symbol);
@@ -11179,7 +11182,7 @@ module ts {
11179
11182
return getExportNameSubstitution(exportSymbol, node.parent);
11180
11183
}
11181
11184
// Named imports from ES6 import declarations are rewritten
11182
- if (symbol.flags & SymbolFlags.Alias && languageVersion < ScriptTarget.ES6 ) {
11185
+ if (symbol.flags & SymbolFlags.Alias) {
11183
11186
return getAliasNameSubstitution(symbol);
11184
11187
}
11185
11188
}
0 commit comments