-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Support tagged templates in ES5 and ES3 #2253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That has already been implemented in #1589. Note that the first argument of the downlevel call should have a raw property. We ended up with the following code: (_a = ["Hello ", "! You're looking ", " today!"], _a.raw = ["Hello ", "! You're looking ", " today!"], fn(_a, you, adjective));
var _a; |
Oh, damn, github search by default only searched open issues :-/. Babel does more or less the same thing, except it uses a generated helper (and also does some |
Incoming in 1.5 :) |
Great. Thanks. Sorry for duplicate issue :). |
No worries - as a note, we thought about Just for documentation, the duplicate issue is #1590. |
Tagged templates are fairly easy to implement using ES5 and ES3, you simply turn the following:
into the following:
(sample taken from http://updates.html5rocks.com/2015/01/ES6-Template-Strings)
The text was updated successfully, but these errors were encountered: