typedoc icon indicating copy to clipboard operation
typedoc copied to clipboard

type-only re-exports are grouped by their concrete implementation

Open runspired opened this issue 7 months ago • 0 comments

When only the type of a function, class, or variable is exported, type-doc should group the exported symbol appropriately under type aliases and or interfaces. However, the original grouping is maintained.

For example, in the following setup:

src/index.ts

export { type Greeting } from './-private/greeting.ts';

src/-private/greeting.ts

export class Greeting {
  msg: string;

  constructor(msg: string) {
    this.msg = msg;
  }
}

I would expect for the documentation for the index module to contain:

## Type Aliases

- [Greeting](type-aliases/greeting.md)

But instead it contains

## Classes

- [Greeting](classes/greeting.md)

This results in confusing documentation as no value is importable or instantiable.

runspired avatar Jun 04 '25 06:06 runspired