-
-
Notifications
You must be signed in to change notification settings - Fork 750
Description
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):
- Only a single entry appears for overloaded functions with no indication that multiple signatures exist
- 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 docsObserved Results
Module summary page (docs/modules.html):
- Shows single
getValueentry 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:
- Source:
src/logger/facade.ts:57-136(5
overloads oflogfunction) - Module summary: docs/modules/logger.html (only first overload
shown) - Function detail: docs/functions/logger.log.html (all
overloads shown)
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)