mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-16 05:41:21 -06:00
emit publish of exported values in variable declarations
This commit is contained in:
parent
50496ccd97
commit
83fcca81a8
@ -2740,7 +2740,6 @@ var __param = this.__param || function(index, decorator) { return function (targ
|
||||
}
|
||||
else {
|
||||
renameNonTopLevelLetAndConst(<Identifier>node.name);
|
||||
emitModuleMemberName(node);
|
||||
|
||||
let initializer = node.initializer;
|
||||
if (!initializer && languageVersion < ScriptTarget.ES6) {
|
||||
@ -2763,7 +2762,21 @@ var __param = this.__param || function(index, decorator) { return function (targ
|
||||
}
|
||||
}
|
||||
|
||||
let publishExportedValue =
|
||||
currentFileIsEmittedAsSystemModule() && (getCombinedNodeFlags(node) & NodeFlags.Export) && isSourceFileLevelDeclaration(node);
|
||||
|
||||
if (publishExportedValue) {
|
||||
write(`${exportFunctionForFile}("`);
|
||||
emitNodeWithoutSourceMap(node.name);
|
||||
write(`", `);
|
||||
}
|
||||
|
||||
emitModuleMemberName(node);
|
||||
emitOptional(" = ", initializer);
|
||||
|
||||
if (publishExportedValue) {
|
||||
write(")")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user