-
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 is Disconnected from VSCode - Makes @link near-impossible to use effectively #2141
Comments
We can also see that a typescript team member seems to confirm this is a bug with |
Welcome to the horrible world that is trying to build software that has conflicting requirements from several groups of people and trying to make one group happy breaks another. Something I've wanted to try for a while is see if links can be resolved by TS, and if not fall back to TypeDoc's current implementation, but have been busy recently, so haven't done anything on typedoc. It's worth mentioning that "works in vscode" is also not good enough, because what works in your .ts files may no longer work once the comment is copied into a .d.ts file during compilation... so it might work for you, but not for your library's consumers. I suspect this is part of why the tsdoc team went with global resolution. |
I believe the Can def imagine its a whole can of worms to collaborate all these things together though! |
How VSCode resolves links, yes. However, |
I'm strongly in support of having an option where we let the TypeScript compiler resolve links. In the meantime, would it be easy to support an option that just uses the old resolution behaviour from 0.22.x? A bunch of our links broke when we upgraded to 0.23.x |
If a link fails to resolve with the new behavior in 0.23, it should fall back to 0.22's resolution. This is going to be removed in 0.24 as I don't want to continue maintaining the incredibly inefficient algorithm it uses. In 0.24, I intend to try to use TypeScript's resolution of |
Huh ok interesting. I'll try to see if I can figure out why our links are breaking 🤔. Re 0.24 behaviour, that sounds awesome |
Search terms
Expected Behavior
Provide a way to give users a good experience via linking both when using the package in IDE vs scanning the TypeDoc.
Actual Behavior
I want to provide links to types that make sense to use for various types. I want this to improve developer experience both for
TypeDoc
and when using the package itself via VSCode's inline documentation. We should be able to use them together without importing everything directly.HOWEVER, this is impossible:
{@link enums.OrderTypes}
{@link enums.OrderTypes}
So TypeDoc would REQUIRE
{@link OrderTypes}
and it will try to find things directly instead of realizing I importedenums
and I am referring to the OrderTypes on theenums
import.Using
{@link enums.OrderTypes}
When Using VSCode Documentation
What TypeDoc Generates
Using
{@link OrderTypes}
When Using VSCode Documentation
What TypeDoc Generates
Steps to reproduce the bug
Environment
The text was updated successfully, but these errors were encountered: