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

[CS2] async/await doesn't transpile? #4398

Closed
kenOfYugen opened this issue Dec 9, 2016 · 2 comments
Closed

[CS2] async/await doesn't transpile? #4398

kenOfYugen opened this issue Dec 9, 2016 · 2 comments
Labels

Comments

@kenOfYugen
Copy link

I was trying out the 2 branch. According to Progress as of December 2016, async/await is in.

Using the coffee --nodejs --harmony-async-await script.coffee command to run code works fine.

Transforming it to JS via coffee --nodejs --harmony-async-await -c script.coffee, the resulting code lacks all async statements! Am I doing something wrong?

And of course [email protected] complains with ReferenceError: await is not defined.
I saw the #4351 contains an example of transpiled code, is the code written by hand?

@vendethiel
Copy link
Collaborator

Transforming it to JS via coffee --nodejs --harmony-async-await -c script.coffee, the resulting code lacks all async statements! Am I doing something wrong?

It's hard to tell without seeing any piece of code (input and output).

Passing --harmony-async-await when compiling is unnecessary, however.

I saw the #4351 contains an example of transpiled code, is the code written by hand?

No, as you did confirm: running the code directly works fine.

@kenOfYugen
Copy link
Author

It was frustrating because any code, even the async tests didn't transpile correctly.
I just wanted confirmation, turns out there was a mistake on my part in the configuration, using two versions of coffee. Thanks, closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants