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:
Sheetal Nandi
2015-02-17 13:47:15 -08:00
committed by Mohamed Hegazy
parent 4b7548487c
commit 006ed82730
13 changed files with 34 additions and 22 deletions

View File

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

View File

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