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

Unresolved externals go to a page called undefined, and unhelpful warnings are generated #2853

Closed
pjeby opened this issue Feb 15, 2025 · 1 comment
Milestone

Comments

@pjeby
Copy link
Contributor

pjeby commented Feb 15, 2025

Search terms

excludeExternals, Failed to resolve link in comment, undefined

Expected Behavior

When there is a {@link} to an reference from an external module, and excludeExternals is enabled, no link should be generated in the documentation, and ideally no warning should be output since there is nothing that can be done to stop the warning except remove the link (which is still useful to have within e.g. VSCode, even if it's not being put into the docs).

Actual Behavior

Typedoc generates the link with an href of "undefined", and outputs a warning that the reference can't be resolved.

Steps to reproduce the bug

As described above - {@link} to something exported from an external module.

Version 0.27.5 and up produces undefined links, 0.27.4 and earlier do not.

Versions prior to 0.26.7 do not output "[warning] Failed to resolve link to "whatever" in comment for whatever", while later versions do.

Environment

  • Typedoc version: 0.26.7 and up for the warning, 0.27.5 and up for the "undefined" hrefs
  • TypeScript version: 5.2.2
  • Node.js version: 18.20.2
  • OS: Windows 10
@pjeby
Copy link
Contributor Author

pjeby commented Feb 15, 2025

It looks like 0.27.5 removed validity checking for url (in MarkedPlugin.tsx), and the fix for #2681 in 0.26.7 doesn't take into account the excludeExternals flag. I'll work up a PR for both.

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

No branches or pull requests

2 participants