Skip to content

Packages entry point strategy: Cross-project links fail to resolve when dependency subproject's package.json's "types" points to a .d.ts file #2420

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

Closed
personalizedrefrigerator opened this issue Oct 24, 2023 · 1 comment

Comments

@personalizedrefrigerator
Copy link

personalizedrefrigerator commented Oct 24, 2023

Search terms

Module resolution, entryPointStrategy, packages, broken link, links, {@link }, return types, parameter types.

Expected Behavior

TypeDoc should resolve cross-project links or print a warning when the link cannot be resolved.

Actual Behavior

Cross-project {@link ...}, return types, and parameters are rendered as plain text and no warnings are logged while building.

Steps to reproduce the bug

Sample project.

The sample project above is a monorepo with two projects: main-project and lib-project.

main-project depends on lib-project and TypeScript uses "entryPointStrategy": "packages".

The cross-project link is created as expected when packages/lib-project/tsconfig.json has "types" point to the entrypoint (the .ts file).

The cross-project link is broken when packages/lib-project/tsconfig.json has "types" point to the generated .d.ts file (in packages/lib-project/dist/).

Environment

  • Typedoc version: 0.25.2
  • TypeScript version: 5.2.2
  • Node.js version: v18.13.0
  • OS: Ubuntu 23.10
@personalizedrefrigerator personalizedrefrigerator changed the title Packages entry point strategy: Cross-project links fail to resolve when package.json's "types" points to a .d.ts file Packages entry point strategy: Cross-project links fail to resolve when dependency subproject's package.json's "types" points to a .d.ts file Oct 24, 2023
@personalizedrefrigerator
Copy link
Author

Closing as a duplicate of #2416

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