-
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 ES2017 Target #10768
Comments
A PR would be appreciated. Should be a small change. |
Downlevel async/await is just a deal breaker for me right now. Is it happening anything about this issue? |
@soft-labs downlevel |
The point of this issue is to output async/await without downleveling.
|
@DanielRosenwasser Oh yes, I know. I need no transpilling at all, so I can use native chrome (is out now) and node with v8 5.4 native async/await implementation. |
I think everyone is waiting for TSC to have option to naively use async / await (without generation of __awaiter etc.). Any idea when this might be included in nighties? |
We would be happy to accept a PR for this. |
Hi - trying to use es2017 target in tsconfig.json but I get: error TS6046: Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015' I'm using nightly: 2.1.0-dev.20161015 |
I think it was merged just after the cutoff time for the |
Awesome! |
Does #11942 counts missing in ES2017 target? |
7b9a42f adds a new |
Just wondering whether The code compiles fine - it's just that |
@JD-Robbs, it does not include the dom, can you file a new issue for that. |
specifying the lib explicitly in the tsconfig.json file should work though. |
@mhegazy thank you very much indeed. As you say, the following configuration works:
So - it's not an |
It still seems like it should work if it works for es2015. I added the lib option manually but it would be nice to not have to do that. |
The above still seems to be an issue. I can't find where in the codebase this is determined. |
Upgraded to Angular 5.0.0, still having the same issues described below :
And running the command
|
@nblavoie this issue is closed almost a year ago. I do not think this is what you are looking for. You might have better luck sharing this on StackOverflow. |
This is a request to make
"target": "es2017"
a valid compiler option. There is a list of finished features for ES2017 (all stage 4) that can be found on the TC39 Finished Proposals page.Note that TypeScript already supports
"lib": ["es2017"]
and includeslib.2017.d.ts
, which declares the standard library features coming in ES2017, such asObject.values
andObject.entries
.TypeScript also supports the two new syntactic features (async functions and trailing function commas), but with the current highest target (
es6
), these features are unconditionally downlevelled.With an
ES2017
target, async functions and trailing commas would be preserved in the transpiled JavaScript output, without downlevelling.Async/await runtime support
Async functions are already implemented in both the V8 and ChakraCore runtimes. Node.js will support async/await natively (initially in v7.x with
--harmony
) when it updates to V8 5.4, expected by next month (i.e. October 2016).Related issues
ESNext
target, which is a separate idea to this issue.The text was updated successfully, but these errors were encountered: