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

cross-package re-export fails to resolve definition #2428

Closed
teidesu opened this issue Oct 27, 2023 · 1 comment
Closed

cross-package re-export fails to resolve definition #2428

teidesu opened this issue Oct 27, 2023 · 1 comment
Labels
bug Functionality does not match expectation duplicate This duplicates another issue

Comments

@teidesu
Copy link

teidesu commented Oct 27, 2023

Search terms

When using "entryPointStrategy": "packages" in a monorepo where one package re-exports something from another one, links to definition are not correctly resolved:
image

Additionally, the extends clause links to the re-exported definition instead of the imported one (idk if this is expected, though):
image

Expected Behavior

Links to definition are correctly resolved, and extends links to the original definition

Actual Behavior

Links to definition are not correctly resolved, and extends links to re-exported definition

Steps to reproduce the bug

TypeStrong/typedoc-repros#33

Environment

  • Typedoc version: 0.25.2
  • TypeScript version: 5.2.2
  • Node.js version: 18.12.1
  • OS: macOS 13.5
@teidesu teidesu added the bug Functionality does not match expectation label Oct 27, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Oct 28, 2023

Thanks for the repro! This appears to be the same issue as #2416 for your first issue, so I'm going to track that over there.

The cross-package re-export issue unfortunately I do consider to be working as intended. There isn't a good way for TypeDoc to track that a symbol has been exported from another package, particularly since packages mode is really designed to be a thin wrapper around rendering each package to JSON and then merging the packages.

I'd recommend changing the configuration for packages/outer to be:

{
  "entryPoints": ["./index.ts"],
  "excludeExternals": true,
  "externalPattern": ["**/dist/**"]
}

And then, once #2416 is fixed, that should link between packages as expected.

@Gerrit0 Gerrit0 added the duplicate This duplicates another issue label Oct 28, 2023
@Gerrit0 Gerrit0 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation duplicate This duplicates another issue
Projects
None yet
Development

No branches or pull requests

2 participants