-
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
Remove experimental async functions #5231
Conversation
lgtm. |
@@ -1076,11 +1076,6 @@ namespace ts { | |||
!options.experimentalDecorators) { | |||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators")); | |||
} | |||
|
|||
if (options.experimentalAsyncFunctions && | |||
options.target !== ScriptTarget.ES6) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we now have ES5 support for async functions? What happens if you target ES5 and then use an async function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should be another message Async functions are only available when targeting ECMAScript 6 and higher.
which i have not changed
👍 |
I had to lookup and see what TC39 was. It is a well documented here: |
Remove experimental async functions
https://github.com/Microsoft/TypeScript/wiki/Compiler-Options needs an update... this flag is still mentioned there without deprecation note. |
Is there a way to use async/await but still target ES5? I mean, there is many envs which do not support ES2015 100%, but they support |
For the time being, no. But we're working on supporting async/await in pre-ES6 targets. |
@DanielRosenwasser thanks. Just got the idea: |
Now that async/await support has reached stage 3 in the TC39 proposal process, time to remove the
--experimentalAsyncFunctions
flag