mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-24 02:21:30 -05:00
Set LocalName flag for exported local then skip it
The module transformer now skips substitution of LocalName, just like ts transformer already does.
This commit is contained in:
@@ -552,7 +552,7 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
statements.push(
|
||||
createExportStatement(node.name, node.name, /*location*/ node)
|
||||
createExportStatement(node.name, setNodeEmitFlags(getSynthesizedClone(node.name), NodeEmitFlags.LocalName), /*location*/ node)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -712,6 +712,10 @@ namespace ts {
|
||||
}
|
||||
|
||||
function substituteExpressionIdentifier(node: Identifier): Expression {
|
||||
if (getNodeEmitFlags(node) & NodeEmitFlags.LocalName) {
|
||||
return node;
|
||||
}
|
||||
|
||||
const container = resolver.getReferencedExportContainer(node, (getNodeEmitFlags(node) & NodeEmitFlags.ExportName) !== 0);
|
||||
if (container) {
|
||||
if (container.kind === SyntaxKind.SourceFile) {
|
||||
|
||||
Reference in New Issue
Block a user