-
Notifications
You must be signed in to change notification settings - Fork 589
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
[JavaScript] Changing declaration keywords from storage
to keyword.declaration
#2643
Comments
Yes, I think those keywords should get
The scope naming guidelines don't make a definite statement about which scope to use for user-defined types/classes. There is
and later also
Afaik the |
I agree completely. I've written a PR to scope I'm mostly sold on Types in TypeScript should probably be |
As per #1842, we seem to have the new convention where declaration keywords receive
keyword.declaration
rather than the longtime-traditionalstorage.type
. JS/TS now uses this forfunction
and=>
, but not for the other declaration keywords.This affects the following keywords (that I'm aware of):
Even though
function
class
interface
are capable of denoting an anonymous construct, all of them qualify as keywords that declare a name. Forvar
let
const
, this is their only purpose. I believe they should all bekeyword.declaration
.import
might qualify as well. It's a keyword that introduces 0 to N names into the scope. As a side effect, it also includes an additional module into your tree. This side effect could disqualify it from beingkeyword.declaration
, but I believe it to be a strong contender.Meanwhile,
export
might qualify being a storage modifier likepublic
, since it serves the exact same purpose. But perhaps this needs a separate issue.In addition, I'm surprised by the scoping of arbitrary types in TS as
support.class
. Shouldn't it bestorage.type
? Might need a separate issue.The text was updated successfully, but these errors were encountered: