Create truly unique names for tagged template strings.

This commit is contained in:
Daniel Rosenwasser 2017-10-13 15:25:04 -07:00
parent 2f917d5abc
commit 2024ca20f8

View file

@ -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(