mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Merge pull request #8068 from Microsoft/transform-function-and-import-conflict
[Transforms] Set LocalName flag for exported local then skip it
This commit is contained in:
commit
da72357562
@ -553,7 +553,7 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
statements.push(
|
||||
createExportStatement(node.name, node.name, /*location*/ node)
|
||||
createExportStatement(node.name, setNodeEmitFlags(getSynthesizedClone(node.name), NodeEmitFlags.LocalName), /*location*/ node)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -713,6 +713,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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user