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

The keyword 'await' is reserved #64

Closed
sateffen opened this issue Feb 7, 2017 · 2 comments
Closed

The keyword 'await' is reserved #64

sateffen opened this issue Feb 7, 2017 · 2 comments

Comments

@sateffen
Copy link

sateffen commented Feb 7, 2017

Hey,

this line uses the name "await" as function name, even though it's a reserved keyword.

As mentioned in this issue at webpack, this causes problems when trying to parse the resulting d3 lib with a newer parser.

There were a few issues there (#55 and #58) containing the same problem, but the problem itself is not solved (or reoccured).

@mbostock
Copy link
Member

mbostock commented Feb 7, 2017

Hi. The use of the name await on the line you linked applies to a property of Queue.prototype, not a function. It’s perfectly valid to use reserved words as property names (see Reserved word usage and Identifier Names and Identifiers).

My guess is that webpack is rewriting the code somehow to cause this breakage, but with apologies, the issue is not the source code here.

@mbostock mbostock closed this as completed Feb 7, 2017
@sateffen
Copy link
Author

sateffen commented Feb 7, 2017

Thank you for that crucial hint! I totally overlooked the missing function name :-)

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

No branches or pull requests

2 participants