Skip to content

Type alias to Readonly<Record<T,U>> is not linked to from referring symbols, documented only as Readonly #2954

@ezzatron

Description

@ezzatron

Search terms

  • Type alias
  • Broken link
  • Readonly

Expected Behavior

Given this code:

export type AliasA = Readonly<Record<string, string>>;

export interface InterfaceA {
  propertyA: AliasA;
}

I expect the documentation for propertyA to link to the documentation for AliasA.

Actual Behavior

The documentation for propertyA is documented as Readonly, with no link to anything. No combination of @expand, @inline, @expandType, or @inlineType seems to affect the output.

Steps to reproduce the bug

Please see my reproduction repo at https://github.com/ezzatron/typedoc-broken-type-alias-repro - the README includes reproduction steps.

You can see the repro output at https://ezzatron.com/typedoc-broken-type-alias-repro/interfaces/InterfaceA.html#propertya

Environment

  • Typedoc version: typedoc@0.28.4
  • TypeScript version: typescript@5.8.3
  • Node.js version: v24.0.0
  • OS: N/A (issue presents the same under macOS locally, and under CI)

Activity

added theissue type on May 14, 2025
Gerrit0

Gerrit0 commented on May 15, 2025

@Gerrit0
Collaborator

This is happening because TS will eagerly evaluate some mapped types, so TypeDoc doesn't get a symbol which points to the alias at any point. No type arguments are included because of a check to avoid including defaulted type arguments.

I don't like the fix, but don't see a way around it...

added a commit that references this issue on May 15, 2025
766fe9e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ezzatron@Gerrit0

        Issue actions

          Type alias to `Readonly<Record<T,U>>` is not linked to from referring symbols, documented only as `Readonly` · Issue #2954 · TypeStrong/typedoc