TypeScript Version: 3.9.1-rc
Search Terms: tagged template literal rawText raw ES5
Code
The problem occurs when synthesising tagged template literals programmatically, and then trying to render them in ES5.
The API provides a method for specifying the "raw" parts of the template:
const template = ts.createNoSubstitutionTemplateLiteral('text', 'text');
But due to this regression this raw value is no longer being used.
An empty string is there, instead.
Here is a link to a reproduction: https://github.com/petebacondarwin/ts-3.9-rawtext-bug
Expected behavior:
$localize(__makeTemplateObject(["text"], ["text"]));
Actual behavior:
$localize(__makeTemplateObject(["text"], [""]));
Playground Link:
It is not possible to provide a Playground link because it only occurs when programmatically creating a tagged template literal AST node.
See the reproduction at https://github.com/petebacondarwin/ts-3.9-rawtext-bug
Related Issues:
This is a regression due to this commit: 70399e1#r39098346