mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Remove references with exports.id as es6 module doesnt have exports.id
Conflicts: tests/baselines/reference/es6ExportAll.js tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.js tests/baselines/reference/es6ImportNamedImport.js
This commit is contained in:
committed by
Mohamed Hegazy
parent
4b7548487c
commit
006ed82730
@@ -10817,7 +10817,13 @@ module ts {
|
||||
|
||||
function getExportNameSubstitution(symbol: Symbol, location: Node): string {
|
||||
if (isExternalModuleSymbol(symbol.parent)) {
|
||||
return "exports." + unescapeIdentifier(symbol.name);
|
||||
var symbolName = unescapeIdentifier(symbol.name);
|
||||
if (languageVersion >= ScriptTarget.ES6) {
|
||||
return symbolName;
|
||||
}
|
||||
else {
|
||||
return "exports." + symbolName;
|
||||
}
|
||||
}
|
||||
var node = location;
|
||||
var containerSymbol = getParentOfSymbol(symbol);
|
||||
|
||||
@@ -3810,8 +3810,14 @@ module ts {
|
||||
function emitModuleMemberName(node: Declaration) {
|
||||
emitStart(node.name);
|
||||
if (getCombinedNodeFlags(node) & NodeFlags.Export) {
|
||||
emitContainingModuleName(node);
|
||||
write(".");
|
||||
var container = getContainingModule(node);
|
||||
if (container) {
|
||||
write(resolver.getGeneratedNameForNode(container));
|
||||
write(".");
|
||||
}
|
||||
else if (languageVersion < ScriptTarget.ES6) {
|
||||
write("exports.");
|
||||
}
|
||||
}
|
||||
emitNodeWithoutSourceMap(node.name);
|
||||
emitEnd(node.name);
|
||||
|
||||
Reference in New Issue
Block a user