Skip to content
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

JS Doc @Link support for referring to property of class/interface #43383

Closed
mjbvz opened this issue Mar 25, 2021 · 3 comments · Fixed by #43625
Closed

JS Doc @Link support for referring to property of class/interface #43383

mjbvz opened this issue Mar 25, 2021 · 3 comments · Fixed by #43625
Assignees
Labels
Experience Enhancement Noncontroversial enhancements Fix Available A PR has been opened for this issue
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Mar 25, 2021

Bug Report

🔎 Search Terms

  • jsdoc
  • @link
  • @see

🕗 Version & Regression Information

4.3.0-dev.20210325

💻 Code

For the TS:

interface Foo {
    /**
     * {@link Foo#xyz}
     * 
     * {@link Foo.xyz}
     * 
     * {@link Foo~xyz}
     * 
     * {@link xyz}
     */
    abc: number;
    
    /**
     * {@link abc}
     */
    xyz: number;
}

Hover over abc and view the links.

🙁 Actual behavior

None of the links are resolved. I was not able to find a way to have documentation on one property refer to another property

🙂 Expected behavior

If we are following JSDoc, I'd expect that Foo#xyz would be resolved. However we may also want to support: xyz (and maybe Foo.xyz?)

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Mar 26, 2021
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.3.1 milestone Mar 26, 2021
@sandersn sandersn modified the milestones: TypeScript 4.3.1, Backlog Apr 8, 2021
@sandersn sandersn added Experience Enhancement Noncontroversial enhancements and removed Needs Investigation This issue needs a team member to investigate its status. labels Apr 8, 2021
@sandersn
Copy link
Member

sandersn commented Apr 8, 2021

Initial @link support parses entity names (dotted names) but does not resolve them.
Edit: it does actually resolve them, but not the Typescript syntax for referring to class members, Foo.prototype.xyz.

Filed #43594 to track parsing #.
Filed #43595 to track within-class/interface lookup.

I'll look at the first two after the 4.3 release.

@mjbvz
Copy link
Contributor Author

mjbvz commented Apr 8, 2021

@sandersn Are there any workarounds for this issue planned for TS 4.3? We're eager to start adopting@link in our d.ts (microsoft/vscode#120120) but not being able to link to properties is a pretty significant limitation

@sandersn
Copy link
Member

sandersn commented Apr 8, 2021

I can look at it during the beta if it's blocking your adoption. I can probably put some special-case code in the services-only symbol lookup.

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants