Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for
@link
tag parsing, converting identifiers to their full module paths. It respects link text if it exists, if not, it uses the original identifier.For nested member access, it just links to the root identifier, because finding what kind of member it is and constructing the namepath correctly is a bit more complicated and I don't fully understand how it works.
Some further notes on nested member access that could be added in a separate issue:
We'd need to know what kind of member it is - instance or static, property or method - and format the namepath accordingly.
To find out what kind of member it is, we could use the AST cached in
fileNodes
, though, that could cause an issue if the imported file hasn't been cached yet.Using the default JSDoc template, I found links work with the
Identifier#member
namepath format for everything except static methods which requireIdentifier.member
:module:path/to/module.Identifier#member
module:path/to/module.Identifier.member
Identifier#member
working for static properties contradicts the docs, which saysIdentifier.member
should be used for static members. This could be a bug in JSDoc core, a bug in the default template, or just incorrect documentation, I don't know.