From 2024ca20f883aa2c1c912d605287c2ed9d963a93 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 13 Oct 2017 15:25:04 -0700 Subject: [PATCH] Create truly unique names for tagged template strings. --- src/compiler/transformers/es2015.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index d5ce2bdc3a4..a1e52480172 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3676,7 +3676,8 @@ namespace ts { // Do not do this in the global scope, as any variable we currently generate could conflict with // variables from outside of the current compilation. In the future, we can revisit this behavior. if (isExternalModule(currentSourceFile)) { - const tempVar = createTempVariable(recordTaggedTemplateString); + const tempVar = createUniqueName("templateObject"); + recordTaggedTemplateString(tempVar); templateArguments[0] = createLogicalOr( tempVar, createAssignment(