-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Add ability to target es5 and still use generators for async/await #12557
Comments
use |
yes that is exactly what I did with ts 2.1.1 and yet my js file is created with:
which sure seems like state machine and not generators (no yields) here is my tsconfig: https://github.com/born2net/studioDashboard/blob/master/tsconfig.json regards Sean |
ah.. sorry, i miss read the issue. i thought you did not want generators, and wanted to target ES5. But generators are an ES6 feature, and TS does not support granular targeting for transformations. |
but my Chrome browser supports generators so why can't I target es5 and specifically tell TS that generators are available in my browsers and use it? |
Please see #4692 (comment) for relevant discussion. |
@born2net for your Chrome browser can't you just target ES2015? |
be nice if I could cherry pick the comparability for async/await... |
@born2net Chrome also supports native async/await since v55 |
interesting, so how do you tell TS to not transpile at all? so async / await can run natively? |
|
sweet tx! |
I am targeting es5 in my tsconfig and so when I transpile with tsc I get the long (non generators) version of async / await. So I figured if I added to my tsconfig the following:
so I hoped TS will see that my browser supports generators and thus will take advantage of them, but still I get the longer format of async / await...
is this a bug? missing feature?
regards,
Sean
The text was updated successfully, but these errors were encountered: