TypeStrong / TypeStrong/typedoc
Link tags in line comments are not resolved via TypeScript
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.5k
- Forks
- 775
- PR merge metrics
- No merged PRs in 30d
Description
Search terms
@link line comment useTsLinkResolution
Expected Behavior
If I use line comments for my doc comments, I'd expect TypeScript-driven resolution of @link targets to still work.
Actual Behavior
Only the old, built-in resolution is used in this case.
In fact, the machinery needed to do this seems to be entirely absent from lineLexer.ts. Is this intentional, or an oversight? (If you want, I can look into adding it. In that case, I'd like to know why these lexers exist as completely separate code, rather than being unified, since they seem very similar.)
Steps to reproduce the bug
Set commentStyle to "line", and use a @link that requires TypeScript to resolve (I ran across this trying to reference an import from a sibling package included in the build). TypeDoc will never call getSymbolAtLocation for it, and thus fail to resolve it.
Environment
- TypeDoc version: 0.28.19
- TypeScript version: 6.0.3
- Node.js version: 22.20.0
- OS: Debian Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lineLexer.ts and trace how commentStyle set to "line" handles @link targets. Compare that path with the existing TypeScript-driven resolution, including the expected getSymbolAtLocation call. Done means line comments resolve links that require TypeScript, such as imports from a sibling package included in the build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100