Skip to content
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

Merged
merged 2 commits into from
Oct 13, 2015
Merged

Conversation

mhegazy
Copy link
Contributor

@mhegazy mhegazy commented Oct 12, 2015

Now that async/await support has reached stage 3 in the TC39 proposal process, time to remove the --experimentalAsyncFunctions flag

@yuit
Copy link
Contributor

yuit commented Oct 12, 2015

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) {
Copy link
Member

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?

Copy link
Contributor Author

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

@sandersn
Copy link
Member

👍

@ctaggart
Copy link
Contributor

I had to lookup and see what TC39 was. It is a well documented here:
http://tc39.github.io/ecmascript-asyncawait/

mhegazy added a commit that referenced this pull request Oct 13, 2015
@mhegazy mhegazy merged commit 99d448a into master Oct 13, 2015
@mhegazy mhegazy deleted the removeExperimentalAsyncFunctions branch October 13, 2015 21:17
@elhigu
Copy link

elhigu commented Dec 1, 2015

https://github.com/Microsoft/TypeScript/wiki/Compiler-Options needs an update... this flag is still mentioned there without deprecation note.

@NekR
Copy link

NekR commented Mar 22, 2016

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 yield. So would be good to target ES5, but still use yield and async/await.

@DanielRosenwasser
Copy link
Member

For the time being, no. But we're working on supporting async/await in pre-ES6 targets.

@NekR
Copy link

NekR commented Mar 22, 2016

@DanielRosenwasser thanks. Just got the idea:
TS -> ES6 and then transpiling to ES5 via Babel with disabled yield transpilation.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants