-
Notifications
You must be signed in to change notification settings - Fork 12.8k
@link and @see should lookup sibling methods/properties without a class prefix #43595
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
Labels
Experience Enhancement
Noncontroversial enhancements
Fix Available
A PR has been opened for this issue
Milestone
Comments
Looking at this more closely, this is also a new feature -- In the examples above, there's no place to write a reference I put the test I wrote in the branch link-tag-method-name-resolution. |
sandersn
added a commit
that referenced
this issue
May 21, 2021
This allows unqualified references like: ```ts class Zero { /** @param buddy Must be {@link D_HORSE} or {@link D_DOG}. */ deploy(buddy: number) { } static D_HORSE = 1 static D_DOG = 2 } ``` I surveyed @see and @link again to estimate how common this is. I found a little over 200 uses, which is around 2%. Sorted by frequency, this *is* the next feature on the list, along with the `module:` prefix. So I think this is about the right point to stop adding code. In this case, however, I liked most of the uses -- there were a lot of deprecated functions that referenced a function just below, where it would be wordy to qualify the name, but the reader would benefit from a link. Note that unqualified references do *not* work inside type or object literals. The code I ended up with is quite complicated and I didn't observe any uses in the wild. Fixes #43595
sandersn
added a commit
that referenced
this issue
May 26, 2021
* Add unqualified JSDoc member references This allows unqualified references like: ```ts class Zero { /** @param buddy Must be {@link D_HORSE} or {@link D_DOG}. */ deploy(buddy: number) { } static D_HORSE = 1 static D_DOG = 2 } ``` I surveyed @see and @link again to estimate how common this is. I found a little over 200 uses, which is around 2%. Sorted by frequency, this *is* the next feature on the list, along with the `module:` prefix. So I think this is about the right point to stop adding code. In this case, however, I liked most of the uses -- there were a lot of deprecated functions that referenced a function just below, where it would be wordy to qualify the name, but the reader would benefit from a link. Note that unqualified references do *not* work inside type or object literals. The code I ended up with is quite complicated and I didn't observe any uses in the wild. Fixes #43595 * Remove type/object literal container check Since they don't work anyway
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Experience Enhancement
Noncontroversial enhancements
Fix Available
A PR has been opened for this issue
Expected: goto-def/find-all-refs find the two references to
m
in jsdoc.Actual: They don't.
Note that interfaces have the same problem:
Nested functions work fine:
The text was updated successfully, but these errors were encountered: