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

Can't figure out how to make a cross-module link #1505

Closed
elashpear opened this issue Feb 8, 2021 · 5 comments
Closed

Can't figure out how to make a cross-module link #1505

elashpear opened this issue Feb 8, 2021 · 5 comments
Labels
question Question about functionality

Comments

@elashpear
Copy link

elashpear commented Feb 8, 2021

I have a class like so:
Screen Shot 2021-02-08 at 3 34 30 PM

I am trying to link to this class from another module inside this package. I can't get it to parse the link.

I checked https://typedoc.org/guides/link-resolution/, #1302, and #1297.

I have tried many combinations of the examples above and it never parses the link or logs any sort of warning. I thought that {@link "state/persistence/SyncEngine".default} would match your description above. I am trying to link to this concrete class as an example from the file that the interface it implements is defined in. The auto-generated link to the class appears in the list of implementing classes. I just can't make an inline link in my description of the interface.

I only have two ts files in the repo right now so I can't try it with any other files. Not sure if this is related, but isolatedModules is enabled in my tsconfig as that was recommended in the react native template I'm using.

I also can't figure out how to link to a type declared by a dependency. This is a library project but apparently "library mode" is now deprecated so I am hoping the new defaults will work.

@Gerrit0 Gerrit0 added the question Question about functionality label Feb 9, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Feb 9, 2021

Do you have a project I could take a look at? I would expect that link to work from your description (though you probably don't need the quotes, and they might actually be causing the issue)

You can tell TypeDoc to tell you about broken links with --listInvalidSymbolLinks, which we should really default to true... but I haven't gotten around to making that one line change yet.

@elashpear
Copy link
Author

Unfortunately it's proprietary code I can't share, but I'll try that option and see if it helps diagnose the issue. If i'm still having an issue I'll see if I can isolate a simplified repro case, although I expect this is a PEBKAC I can't figure out the fix yet. Thanks for the quick response!

@elashpear
Copy link
Author

elashpear commented Feb 9, 2021

I was able to isolate a repro case here https://github.com/fadookie/tsdoc-linking-bug-repro

I can't get these absolute links to work at all. The links with no module prefix work sometimes, but I can't figure out how to disambiguate symbols with the same name, or reference default exports.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Feb 11, 2021

Thanks! I've sent a pull request with some fixed links. It looks like your issue is that you were trying to use a colon to separate parts of links instead of a period.

@fadookie
Copy link

fadookie commented Feb 11, 2021

Oh! Glad it was a simple error on my end. Thanks, I will try this out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about functionality
Projects
None yet
Development

No branches or pull requests

3 participants