Tagged templates emit for ES3 & 5 #1590
Labels
Fixed
A PR has been merged for this issue
In Discussion
Not yet reached consensus
Suggestion
An idea for TypeScript
Milestone
Currently tagged templates aren't supported when targeting ES3 or ES5. Tagged templates can be (partially) emitted like this:
The only difference with ES6 is (if I'm not mistaken) that the
raw
property on the first argument is missing. I think there are 3 solutions for this:TemplateStringsArray
as first argument, onlystring[]
string[]
as first argument, emit as above, otherwise (also if first argument isany
), emit as below.Alternative javascript would be:
I'd vote for 1, since the
.raw
property won't be used in most cases.I've implemented basic functionality in #1589 (without a solution for the
.raw
property)The text was updated successfully, but these errors were encountered: