-
Notifications
You must be signed in to change notification settings - Fork 711
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
@link to exported member with declaration reference links to top of module #2810
Comments
Going to ask for a reproduction that I can easily clone for this one. I don't want to spend time guessing what your setup actually looks at. Also, please try to reproduce without the plugin. Plugins can do things which will break link resolution. |
Apologies, here is a minimal example that shows this: TypeStrong/typedoc-repros#48 The first link in the doc for |
That's... interesting. I apparently missed the
|
... or maybe TypeDoc's docs should just be updated to describe how typedoc/src/lib/converter/comments/declarationReferenceResolver.ts Lines 275 to 283 in 016e6a1
|
Oh, I see where my original mistake was: I was trying to link to a property of an object (which seems to be impossible as they don't have their own anchor or page). And that's why I thought |
TypeDoc does support one level of properties, though there was a bug prior to the most recent version where the links were resolved incorrectly. |
Search terms
link, declaration references
Expected Behavior
I expect the link to point to the relevant object, class, etc regardless which resolution type is used.
Actual Behavior
When I link to an exported in another module using the declaration reference syntax (because the linked member is not imported by the file for example), the link points to the top/root module and not to the exported member.
Steps to reproduce the bug
For example,
moduleA
exportssomeVar
, which in the doc has its own page.If I import this into
moduleB
and use{@link someVar}
it correctly links to it.If I don't import it and use
{@link moduleA!~someVar}
it links tomoduleA
.Relevant installed packages + versions
tsconfig.json
How you are running TypeDoc + any relevant configuration files
Environment
The text was updated successfully, but these errors were encountered: