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

TypeScript async (__awaiter) produces illegal Closure JS #124

Closed
evmar opened this issue Apr 8, 2016 · 4 comments
Closed

TypeScript async (__awaiter) produces illegal Closure JS #124

evmar opened this issue Apr 8, 2016 · 4 comments

Comments

@evmar
Copy link
Contributor

evmar commented Apr 8, 2016

If you declare an async function, TypeScript injects this function __awaiter in the result.

st/foo.js:1: ERROR - The body of a goog.module cannot reference this.
goog.module('st.foo.js');var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

This is pretty low priority because I don't think our users are using async yet.

@batuhan
Copy link

batuhan commented Jan 23, 2017

Is there an update on this? Just hit this bug.

@evmar
Copy link
Contributor Author

evmar commented Jan 23, 2017

I think this is the same underlying problem as
#168

There I said:
"the fix is to use --noEmitHelpers and then to provide your own, Closure-compatible implementations of those helpers"

Now that I'm thinking about it, I will file a new bug based on some new developments in this area, too; one sec.

@evmar
Copy link
Contributor Author

evmar commented Aug 20, 2019

I think @mprobst is working on this right now.

@evmar
Copy link
Contributor Author

evmar commented Aug 20, 2019

Wait actually our tslib fixes this one.

@evmar evmar closed this as completed Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants