-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Fix binding of jsdoc typedefs with no in-comment name attached to an expression statement #32610
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
Conversation
…expression statement
cc @sandersn because the reviewers dropdown breaks all the time~ |
@typescript-bot user test this - I expect some outstanding failures from unrelated things, but I wanna see the new diff |
Heya @weswigham, I've started to run the parallelized community code test suite on this PR at 340a718. You can monitor the build here. It should now contribute to this PR's status checks. |
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
@typescript-bot user test this |
Heya @weswigham, I've started to run the parallelized community code test suite on this PR at bd74b7a. You can monitor the build here. It should now contribute to this PR's status checks. |
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round of comments; still need to understand the symbol baseline changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I'd like answers to my 2 questions about the baselines before you merge.
#32520 migrated the
@enum
tag to bind the same way as a@typedef
, which revealed thru this user test diff that@typedef
tags did not correctly support binding to expression statements (only variable declarations). This PR remedies that deficiency, so@enum
s bound to expression statements continue to function, as do@typedef
s, meaning this:now works, and binds
type Whatever = number
intoNS
(previously it would silently fail to bind anything).In doing so I cleaned up some of the JS-related binding flags -
Assignment
no longer impliesType
orValue
(it's just a flag that means the declaration is from JS and may merge in odd ways, the symbol maybe be only a type, only a value, or a combination thereof), and the binder always binds all psuedonamespace references in binary expression left hand side expressions to the appropriate symbol, not just if it's the first time the namespace has been referenced. This means find all references on one of these namespaces will have many more entries, and more importantly, the nodes will always have a.symbol
for use in the delayed typedef binding and in checking.Fixes #32669