Skip to content

@link not resolving across packages #2681

@KDean-Dolphin

Description

@KDean-Dolphin

Search terms

link url package resolve

Expected Behavior

This is typedoc.json for my documentation project:

{
  "$schema": "https://typedoc.org/schema.json",
  "plugin": [
    "typedoc-github-theme"
  ],
  "entryPoints": [
    "../core",
    "../utility",
    "../gs1"
  ],
  "entryPointStrategy": "packages",
  "includeVersion": true,
  "out": "api",
  "theme": "typedoc-github-theme",
  "sourceLinkExternal": true
}

Every package has a similar typedoc.json; this is the one for the "gs1" package:

{
  "$schema": "https://typedoc.org/schema.json",
  "sourceLinkExternal": true,
  "groupOrder": [
    "Enumerations",
    "Type Aliases",
    "Interfaces",
    "Classes",
    "Variables",
    "Enumeration Members",
    "Properties",
    "Constructors",
    "Accessors",
    "Methods",
    "*"
  ],
  "sort": [],
  "name": "GS1",
  "entryPoints": [
    "src/index.ts"
  ]
}

This is from variable documentation in the "gs1" package in my code:

/**
 * GS1 AI encodable character set 82 creator. Supports {@linkcode Exclusion.AllNumeric}.
 */

Exclusion is an enumeration in the "utility" package, of which AllNumeric is a member.

What I expect to see in the HTML is this:

<p>GS1 AI encodable character set 82 creator. Supports <a href="../enums/Utility.Exclusion.html#AllNumeric" class="tsd-kind-enum-member"><code>Exclusion.AllNumeric</code></a>.</p>

Actual Behavior

What I'm getting instead is no link at all:

<p>GS1 AI encodable character set 82 creator. Supports Exclusion.AllNumeric.</p>

Steps to reproduce the bug

As above. If I change the link target to something unresolvable, I get a warning message in the console:

[warning] Failed to resolve link to "ExclusionX.AllNumeric" in comment for GS1.AI82_CREATOR

It seems that TypeDoc is resolving the link, but not rendering it.

Environment

  • TypeDoc version: 0.26.5
  • TypeScript version: 5.5.4
  • Node.js version: 21.7.3
  • OS: macOS Sonoma 14.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions