Skip to content

Link tags in line comments are not resolved via TypeScript #3113

@marijnh

Description

@marijnh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions