We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
class implements Interface
interface B {} const A = class implements B { readonly foo = 1 }
Screenshot:
It seems the word implements was identified as a class name, because JavaScript.sublime-syntax doesn't exclude it from reserved_word.
implements
reserved_word
So the workaround is to give the scoped class a name:
const A = class A implements B { readonly foo = 1 }
FYI, my initial code was like this:
export foo: IFoo = new class implements IFoo {}
The text was updated successfully, but these errors were encountered:
[JavaScript] Fix anonymous class instantiation
2722de8
Fixes sublimehq#4125 This commit adds "future reserved words" from [1] to prevent them being scoped as normal identifiers which fixes anonymous class instantiations in TypeScript. They are also marked reserved in JavaScript as specified as such by [1], and `implements` is scoped illegal in class declarations. [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#keywords
Successfully merging a pull request may close this issue.
What happened?
Screenshot:
It seems the word
implements
was identified as a class name, because JavaScript.sublime-syntax doesn't exclude it fromreserved_word
.So the workaround is to give the scoped class a name:
FYI, my initial code was like this:
The text was updated successfully, but these errors were encountered: