Skip to content

@interface type references do not always link correctly. #2508

Closed
@Gerrit0

Description

@Gerrit0

TypeDoc's type convert doesn't appear to always capture symbols related to types when converting references.

Search terms

zod, type reference, inferred type

Expected Behavior

The produced Bar interface should have a member whose type is Color, which is linked to the enum.

Actual Behavior

The produced Bar interface contains a member whose type is Color, without a link to the Color enum.

Steps to reproduce the bug

export enum Color {
    BLUE = "Blue",
    RED = "Red",
}

type TypeOf<T> = {
    [K in keyof T]: T[K][keyof T[K]];
};

type Foo = {
    color: typeof Color;
};

/** @interface */
export type Bar = TypeOf<Foo>;
//   ^?

Environment

  • Typedoc version: 0.25.8
  • TypeScript version: 5.3.2
  • Node.js version: 20
  • OS: Fedora

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

    Issue actions