-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Support import types in JSDoc links #43950
Comments
Same issue for me - this is especially annoying, because TS and eslint regard type imports which are only used for JSDoc as unused and will request to remove those imports. |
As a workaround, you could use typedef with an import, pointing the link to it: /** @typedef {import("./typedefs.js").TheType} TheType */
/**
* Some doc with a link to the type {@link TheType}.
*/ Not great, as "go to definition" will take you to this typedef instead of the main one, but at least the correct type is shown when hovering. |
That will cause |
I would really love to see this too.
Today, I think the best solution is to manually alias the import to start with an |
I think my old issue is similar to this one... I was trying to Per
I was expecting that these comments link to the function in /**
* @see module:date-fns/format
* @link module:date-fns/format
*/ |
+1 Why i should import it in top of the module for simple JSDoc link? |
Bug Report
🔎 Search Terms
🕗 Version & Regression Information
4.3.0-dev.20210503
💻 Code
For some JavaScript:
🙁 Actual behavior
The parameter type is resolved but the
@link
is not🙂 Expected behavior
Both links should be resolved
The text was updated successfully, but these errors were encountered: