Skip to content

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

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

Closed
ezzatron opened this issue May 14, 2025 · 1 comment

Comments

@ezzatron
Copy link

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

@Gerrit0
Copy link
Collaborator

Gerrit0 commented May 15, 2025

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants