Skip to content

Conversation

@knoan
Copy link

@knoan knoan commented Nov 12, 2025

Fixes #3037

This commit comprehensively addresses the issue where module summary pages only displayed the first function overload, hiding additional variants and providing incomplete API documentation.

Changes Made

1. Module Summary Pages (moduleReflection.tsx)

  • Functions with multiple overloads now display ALL signatures in the module summary, not just the first one
  • Each overload signature is individually clickable and links to its specific anchor on the detail page (e.g., #getvalue, #getvalue-1)
  • Maintains fallback to original behavior for single-signature functions

2. Function Detail Pages (reflection.tsx)

  • Added an "Overloads" summary section at the top of function detail pages when 2+ overloads exist
  • Provides quick table-of-contents style navigation to jump to any specific overload
  • Includes short descriptions when available

3. CHANGELOG.md

  • Documented the feature addition and bug fixes

Impact

Before: Users had no way to discover additional function overloads from module summaries, requiring navigation to each function's detail page.

After: Complete API surface is visible at a glance with direct links to detailed documentation for each overload.

Files Modified

  • src/lib/output/themes/default/partials/moduleReflection.tsx
  • src/lib/output/themes/default/templates/reflection.tsx
  • CHANGELOG.md

Fixes TypeStrong#3037

This commit comprehensively addresses the issue where module summary
pages only displayed the first function overload, hiding additional
variants and providing incomplete API documentation.

## Changes Made

### 1. Module Summary Pages (moduleReflection.tsx)
- Functions with multiple overloads now display ALL signatures in the
  module summary, not just the first one
- Each overload signature is individually clickable and links to its
  specific anchor on the detail page (e.g., #getvalue, #getvalue-1)
- Maintains fallback to original behavior for single-signature functions

### 2. Function Detail Pages (reflection.tsx)
- Added an "Overloads" summary section at the top of function detail
  pages when 2+ overloads exist
- Provides quick table-of-contents style navigation to jump to any
  specific overload
- Includes short descriptions when available

### 3. CHANGELOG.md
- Documented the feature addition and bug fixes

## Impact

Before: Users had no way to discover additional function overloads from
module summaries, requiring navigation to each function's detail page.

After: Complete API surface is visible at a glance with direct links to
detailed documentation for each overload.

## Files Modified
- src/lib/output/themes/default/partials/moduleReflection.tsx
- src/lib/output/themes/default/templates/reflection.tsx
- CHANGELOG.md
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

Successfully merging this pull request may close these issues.

Overloaded functions only show first signature in module summaries

2 participants