Skip to content

Overloaded functions only show first signature in module summaries #3037

@knoan

Description

@knoan

Search terms

overload, function overload, module summary, missing overloads, function signatures

Expected Behavior

When a module contains overloaded functions, the module summary page should clearly list all available overloads with
their respective descriptions.

Each overload should appear as a separate function entry in the module summary, with its own description and link to its
documentation section on the detail page.

Actual Behavior

In module summary pages (e.g., modules.html or modules/module-name.html):

  1. Only a single entry appears for overloaded functions with no indication that multiple signatures exist
  2. Only the first overload's description is shown, presenting partial and potentially misleading information about the
    function's actual capabilities

This is problematic because users viewing the summary have no way to know:

  • That additional overloads exist with different parameter types/patterns
  • What the other overloads do or when to use them
  • That the shown description only applies to one specific usage pattern

All overload signatures and comments correctly appear on the detailed function page with linkable headings, but with
poor graphical evidence of sectioning between different overload signatures.

Steps to reproduce the bug

Minimal Reproduction

Create a file test.ts:

/**
 * Gets a value without parameters.
 */
export function getValue(): string;

/**
 * Gets a value with a string parameter.
 */
export function getValue(key: string): string;

/**
 * Gets a value with a number parameter.
 */
export function getValue(key: number): number;

export function getValue(key?: string | number): string | number {
	if ( typeof key === 'number' ) return key;
	return key || 'default';
}

Create typedoc.json:

{
  "useFirstParagraphOfCommentAsSummary": true
}

Run TypeDoc:

npx typedoc test.ts --out docs

Observed Results

Module summary page (docs/modules.html):

  • Shows single getValue entry with description from first overload: "Gets a value without parameters."
  • No indication that two additional overloads exist with different parameter types and behaviors

Function detail page (docs/functions/getValue.html):

  • Correctly shows all three overload signatures with their individual comments

Real-World Example

This issue affects any project using overloaded functions. As one example, the @metreeca/core package demonstrates the problem:

Configuration

Both default theme and typedoc-github-theme exhibit the same behavior.

Environment

  • TypeDoc version: 0.28.14
  • TypeScript version: 5.9.2
  • Node.js version: v24.11.0
  • OS: macOS (Darwin 24.6.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions