mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 06:17:19 -05:00
Fix overzealous renaming of emit helpers in es module emit (#36541)
This commit is contained in:
@@ -105,7 +105,9 @@ namespace ts {
|
||||
*/
|
||||
function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void {
|
||||
if (isSourceFile(node)) {
|
||||
helperNameSubstitutions = createMap<Identifier>();
|
||||
if ((isExternalModule(node) || compilerOptions.isolatedModules) && compilerOptions.importHelpers) {
|
||||
helperNameSubstitutions = createMap<Identifier>();
|
||||
}
|
||||
previousOnEmitNode(hint, node, emitCallback);
|
||||
helperNameSubstitutions = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user