Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uptsickle emits uncompilable code for parameter named "interface" #766
Comments
|
Is the problem maybe just the `{?=}`? I think I stumbled across that before
and I thought I had fixed that, but maybe it's in one of my PRs that I
haven't had time to land.
|
|
I think closure compiler is actually unable to parse this. If you change the name to something else it builds. |
|
`interface` is a reserved keyword in strict mode. Looks like a JSCompiler
bug, but also we maybe should not be generating that.
|
|
Relevant part of spec: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example, this snipit from the nodejs typings
Generates an externs file with this content, including the parameter named "interface".
however, closure compiler then rejects this with
I was a little surprised that Typescript accepts this, but Chrome, Safari, and Firefox all accept this code so i'm assuming it's valid to use "interface" as a parameter name is javascript. I did file a closure compiler bug as well.