From 09bff119b1e447c01f5cddb74f9a0d3c5b21dbd2 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 12 Nov 2025 22:02:23 +0000 Subject: [PATCH] Fix module summary pages to display all function overloads 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 --- CHANGELOG.md | 964 ++++++++++-------- .../default/partials/moduleReflection.tsx | 36 +- .../themes/default/templates/reflection.tsx | 34 +- 3 files changed, 618 insertions(+), 416 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e769444be..59ec574eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,22 @@ title: Changelog ## Unreleased +### Features + +- Function detail pages now display an "Overloads" summary section at the top when multiple overloads exist, providing + quick navigation to each overload's documentation, #3037. + +### Bug Fixes + +- Fixed module summary pages to display all function overloads instead of only the first one, #3037. +- Each overload in module summaries is now individually linked to its specific anchor on the detail page, #3037. + ## v0.28.14 (2025-10-11) ### Features -- Introduced the `preservedTypeAnnotationTags` option to specify tags whose type annotations should - be copied to the output documentation, #3020. - API: Introduced `typeAnnotation` on `CommentTag` +- Introduced the `preservedTypeAnnotationTags` option to specify tags whose type annotations should be copied to the + output documentation, #3020. API: Introduced `typeAnnotation` on `CommentTag` - Added `excludePrivateClassFields` option to hide `#private` members while allowing `private` members, #3017. - Added support for TypeScript's `@this` tag for JS files which describe `this` parameters, #3026. @@ -24,15 +33,16 @@ title: Changelog ### Features -- The `basePath` option now also affects relative link resolution, TypeDoc will also check for - paths relative to the provided base path. If you instead want TypeDoc to only change the rendered - base path for sources, use the `displayBasePath` option, #3009. +- The `basePath` option now also affects relative link resolution, TypeDoc will also check for paths relative to the + provided base path. If you instead want TypeDoc to only change the rendered base path for sources, use the + `displayBasePath` option, #3009. ### Bug Fixes - Fixed bug introduced in 0.28.8 where TypeDoc could not render docs with some mixin classes, #3007. - `@inheritDoc` will now correctly overwrite `@remarks` and `@returns` blocks on the target comment, #3012. -- The `externalSymbolLinkMappings` option now works properly on links pointing to inherited/overwritten signatures, #3014. +- The `externalSymbolLinkMappings` option now works properly on links pointing to inherited/overwritten signatures, + #3014. ## v0.28.12 (2025-09-01) @@ -42,15 +52,15 @@ title: Changelog - Improved magic introduced with #2999 to work with imported symbols, #3003. - Fixed relative link resolution to file names containing percent encoded URLs, #3006. - Linking to the project's README file with a relative link will now behave as expected, #3006. -- Reduced unnecessary HTML element rendering in default theme. - API: `Reflection.hasComment` and `Comment.hasVisibleComponent` now accepts an optional `notRenderedTags` parameter. +- Reduced unnecessary HTML element rendering in default theme. API: `Reflection.hasComment` and + `Comment.hasVisibleComponent` now accepts an optional `notRenderedTags` parameter. ## v0.28.11 (2025-08-25) ### Features -- Object properties declared with shorthand property assignment will now use the variable's comment - if they do not have their own comment, #2999. +- Object properties declared with shorthand property assignment will now use the variable's comment if they do not have + their own comment, #2999. ### Bug Fixes @@ -75,7 +85,8 @@ title: Changelog ### Bug Fixes -- Fixed bug introduced in 0.28.8 where TypeDoc could not render docs when members inherited from a complex type alias, #2982. +- Fixed bug introduced in 0.28.8 where TypeDoc could not render docs when members inherited from a complex type alias, + #2982. - Fixed automatic discovery of entry points when not running in packages mode, #2988. - Fixed discovery of package.json file when running with entry points containing a glob, #2985. @@ -121,9 +132,12 @@ title: Changelog - Attempting to highlight a supported language which is not enabled is now a warning, not an error, #2956. - Improved compatibility with CommonMark's link parsing, #2959. -- Classes, variables, and functions exported with `export { type X }` are now detected and converted as interfaces/type aliases, #2962. -- Improved warning messaging for links to symbols which were resolved, but the symbols were not included in the documentation, #2967. -- Fixed an issue preventing nested documents from being deserialized from TypeDoc's JSON output or used in packages mode, #2969. +- Classes, variables, and functions exported with `export { type X }` are now detected and converted as interfaces/type + aliases, #2962. +- Improved warning messaging for links to symbols which were resolved, but the symbols were not included in the + documentation, #2967. +- Fixed an issue preventing nested documents from being deserialized from TypeDoc's JSON output or used in packages + mode, #2969. ### Thanks! @@ -134,8 +148,8 @@ title: Changelog ### Bug Fixes - References to type aliases defined as mapped types will now correctly create a reference to the type alias, #2954. -- `ignoredHighlightLanguages` can now be used to prevent warnings for codeblocks containing languages - which are supported by Shiki but are not loaded, #2956. +- `ignoredHighlightLanguages` can now be used to prevent warnings for codeblocks containing languages which are + supported by Shiki but are not loaded, #2956. ## v0.28.4 (2025-05-04) @@ -146,8 +160,8 @@ title: Changelog ### Bug Fixes -- TypeDoc's default theme now uses the same chevron for all collapsible elements, #2924 - The `chevronSmall` helper is now deprecated and will be removed with v0.29.0. +- TypeDoc's default theme now uses the same chevron for all collapsible elements, #2924 The `chevronSmall` helper is now + deprecated and will be removed with v0.29.0. - Classes/interfaces marked with `@hidden` will no longer appear in the "Hierarchy" section of the docs. - TypeDoc now handles wildcard JSDoc types, #2949. @@ -171,17 +185,16 @@ title: Changelog ### Features -- `@group none` and `@category none` will now render their children without a section - heading in the default theme, #2922. -- Added `@disableGroups` tag to completely disable the grouping mechanism for a - given reflection, #2922. +- `@group none` and `@category none` will now render their children without a section heading in the default theme, + #2922. +- Added `@disableGroups` tag to completely disable the grouping mechanism for a given reflection, #2922. ### Bug Fixes - Variables using `@class` now correctly handle `@category`, #2914. - Variables using `@class` now include constructor parameters, #2914. -- Variables using `@class` with a generic first constructor function now adopt - that function's type parameters as the class type parameters, #2914. +- Variables using `@class` with a generic first constructor function now adopt that function's type parameters as the + class type parameters, #2914. - When printing entry point globs which fail to match any paths, TypeDoc will no longer normalize the glob, #2918. - Inlining types can now handle more type variants, #2920. - Fixed behavior of `externalSymbolLinkMappings` option when URL is set to `#`, #2921. @@ -219,31 +232,33 @@ title: Changelog - TypeDoc now expects all input globs paths to be specified with `/` path separators, #2825. - TypeDoc's `--entryPointStrategy merge` mode now requires JSON from at least version 0.28.0. - Removed `jp` translations from `lang`, to migrate switch to `ja`. -- File name references in `intentionallyNotExported` now use a package name/package relative path instead of an absolute path for matching. -- The `source-order` sort ordering now considers package names / package relative paths instead of using the absolute paths to a file. +- File name references in `intentionallyNotExported` now use a package name/package relative path instead of an absolute + path for matching. +- The `source-order` sort ordering now considers package names / package relative paths instead of using the absolute + paths to a file. - TypeDoc will only check for a project README file next to the discovered `package.json` file if `--readme` is not set this change improves handling of monorepo setups where some packages have readme files and others do not, #2875. -- Function-like variable exports will now only be automatically converted as function types if - they are initialized with a function expression. TypeDoc can be instructed to convert them as functions - with the `@function` tag, #2881. -- Object literal type alias types will now be converted in a way which causes them to be rendered more similarly - to how interfaces are rendered, #2817. +- Function-like variable exports will now only be automatically converted as function types if they are initialized with + a function expression. TypeDoc can be instructed to convert them as functions with the `@function` tag, #2881. +- Object literal type alias types will now be converted in a way which causes them to be rendered more similarly to how + interfaces are rendered, #2817. ### API Breaking Changes -- `ProjectReflection.getReflectionFromSymbol` and `ProjectReflection.getSymbolFromReflection` have been moved to `Context` +- `ProjectReflection.getReflectionFromSymbol` and `ProjectReflection.getSymbolFromReflection` have been moved to + `Context` - `Path` and `PathArray` parameter types now always contain normalized paths. - Introduced a `Router` which is used for URL creation. `Reflection.url`, `Reflection.anchor`, and `Reflection.hasOwnDocument` have been removed. - `Deserializer.reviveProject(s)` no longer accepts an option to add project documents. - `Deserializer.reviveProjects` now requires an `alwaysCreateEntryPointModule` option. - `Comment.serializeDisplayParts` no longer requires a serializer argument. -- `ReflectionSymbolId.fileName` is now optional, TypeDoc now stores a combination of a package name and package relative path instead. - The `fileName` property will be present when initially created, but is not serialized. +- `ReflectionSymbolId.fileName` is now optional, TypeDoc now stores a combination of a package name and package relative + path instead. The `fileName` property will be present when initially created, but is not serialized. - Removed `DeclarationReflection.relevanceBoost` attribute which was added for plugins, but never used. - `i18n` proxy is no longer passed to many functions, instead, reference `i18n` exported from the module directly. -- `ReflectionKind.singularString` and `ReflectionKind.pluralString` now returns translated strings. - The methods on `Internationalization` to do this previously have been removed. +- `ReflectionKind.singularString` and `ReflectionKind.pluralString` now returns translated strings. The methods on + `Internationalization` to do this previously have been removed. - The HTML output structure for the search box has changed to support the new modal. - `DefaultThemeRenderContext`'s `typeDeclaration` and `typeDetailsIfUseful` methods now require both a reflection and a type in order to support @@ -253,16 +268,18 @@ title: Changelog - Add support for TypeScript 5.8.x - The search modal in the HTML output has been rewritten to provide better mobile support -- Added a `--router` option which can be used to modify TypeDoc's output folder - structure. This can be extended with plugins, #2111. -- Introduced the `@primaryExport` modifier tag to provide more fine grained - control over export conversion order, #2856 -- Introduced `packagesRequiringDocumentation` option for `validation.notDocumented`, TypeDoc will expect comments to be present for symbols in the specified packages. +- Added a `--router` option which can be used to modify TypeDoc's output folder structure. This can be extended with + plugins, #2111. +- Introduced the `@primaryExport` modifier tag to provide more fine grained control over export conversion order, #2856 +- Introduced `packagesRequiringDocumentation` option for `validation.notDocumented`, TypeDoc will expect comments to be + present for symbols in the specified packages. - TypeDoc now exports a `typedoc/browser` entrypoint for parsing and using serialized JSON files, #2528. - Type `packageOptions` as `Partial`, #2878. - TypeDoc will now warn if an option which should only be set at the root level is set in `packageOptions`, #2878. -- Introduced `@function` tag to force TypeDoc to convert variable declarations with a type annotation as functions, #2881. -- Exposed a `TypeDoc` global object in the HTML theme which can be used to prevent TypeDoc from using `localStorage`, #2872. +- Introduced `@function` tag to force TypeDoc to convert variable declarations with a type annotation as functions, + #2881. +- Exposed a `TypeDoc` global object in the HTML theme which can be used to prevent TypeDoc from using `localStorage`, + #2872. - Introduced `@preventInline` and `@inlineType` tags for further control extending the `@inline` tag, #2862. - Introduced `@preventExpand` and `@expandType` tags for further control extending the `@expand` tag, #2862. - API: Introduced `DefaultThemeRenderContext.reflectionIcon` for more granular control over displayed reflection icons. @@ -297,11 +314,13 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta - The `visibilityFilter` option now supports individual signatures, #2846. - The `favicon` option may now be given a link starting with `https?://` instead of a path, #2851. -- TypeDoc now supports specifying `#` as the link in `externalSymbolLinkMappings` to indicate the type should not be linked to, #2853. +- TypeDoc now supports specifying `#` as the link in `externalSymbolLinkMappings` to indicate the type should not be + linked to, #2853. ### Bug Fixes -- Fixed an issue where unrecognized languages would incorrectly be listed in the list of languages with translations, #2852. +- Fixed an issue where unrecognized languages would incorrectly be listed in the list of languages with translations, + #2852. - Unresolved external type references will no longer incorrectly linked to `undefined`, #2854. ### Thanks! @@ -313,11 +332,9 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Features -- `@includeCode` and `@inline` can now inject parts of files using region - names or line numbers, #2816. +- `@includeCode` and `@inline` can now inject parts of files using region names or line numbers, #2816. - Introduced `ja` translation options, deprecated `jp` in favor of `ja`, #2843. -- Improved TypeDoc's `--watch` option to support watching files not caught by - TypeScript's watch mode, #2675. +- Improved TypeDoc's `--watch` option to support watching files not caught by TypeScript's watch mode, #2675. - The `@inline` tag now works in more places for generic types. - Visibility filters now consider individual signatures, #2846. @@ -326,8 +343,8 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta - Fixed an issue where TypeDoc would incorrectly ignore type arguments in references, #2823. - Improved narrator support for labeling icons, #2832. - Fixed an issue with `@class` incorrectly handling mapped types, #2842. -- TypeDoc will now consider symbols to be external only if all of their declarations are external - so that declaration merged members with global symbols can be documented, #2844. +- TypeDoc will now consider symbols to be external only if all of their declarations are external so that declaration + merged members with global symbols can be documented, #2844. - Fixed an issue where TypeDoc would constantly rebuild, #2844. - Fixed an issue where the dropdown arrow in the index group would not respect the state of the dropdown, #2845. @@ -342,8 +359,8 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Features -- Added `ignoredHighlightLanguages` option to specify languages which will be - allowed in code blocks but not highlighted, #2819. +- Added `ignoredHighlightLanguages` option to specify languages which will be allowed in code blocks but not + highlighted, #2819. ### Bug Fixes @@ -352,28 +369,24 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta - Fixed output specific option specification, #2818. - Improved type reference conversion to avoid including defaulted type arguments, #2820. - Fixed parsing of declaration references which include a module and a local reference, #2810. -- Improved link resolution logic to prioritize type alias properties with the - same symbol over type literal properties within function parameters. +- Improved link resolution logic to prioritize type alias properties with the same symbol over type literal properties + within function parameters. ## v0.27.5 (2024-12-14) ### Bug Fixes -- Possibly Breaking: TypeDoc will no longer render anchors within the page for - deeply nested properties. This only affects links to properties of - properties of types, which did not have a clickable link exposed so are - unlikely to have been linked to. Furthermore, these links were not always - created by TypeDoc, only being created if all parent properties contained - comments, #2808. -- TypeDoc will now warn if a property which does not have a URL within the - rendered document and the parent property/page will be linked to instead, - #2808. These warnings can be disabled with the `validation.rewrittenLink` +- Possibly Breaking: TypeDoc will no longer render anchors within the page for deeply nested properties. This only + affects links to properties of properties of types, which did not have a clickable link exposed so are unlikely to + have been linked to. Furthermore, these links were not always created by TypeDoc, only being created if all parent + properties contained comments, #2808. +- TypeDoc will now warn if a property which does not have a URL within the rendered document and the parent + property/page will be linked to instead, #2808. These warnings can be disabled with the `validation.rewrittenLink` option. - Fix restoration of groups/categories including documents, #2801. - Fixed missed relative paths within markdown link references in documents. - Improved handling of incomplete inline code blocks within markdown. -- Direct `https://` links under the `hostedBaseUrl` option's URL will no - longer be treated as external, #2809. +- Direct `https://` links under the `hostedBaseUrl` option's URL will no longer be treated as external, #2809. ### Thanks! @@ -383,11 +396,13 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Features -- API: Introduced new `Converter.EVENT_CREATE_PROJECT` event which fires when a project is created by the converter, #2800. +- API: Introduced new `Converter.EVENT_CREATE_PROJECT` event which fires when a project is created by the converter, + #2800. ### Bug Fixes -- Switch from gzip to deflate for compressing assets to make output consistent across different operating systems, #2796. +- Switch from gzip to deflate for compressing assets to make output consistent across different operating systems, + #2796. - `@include` and `@includeCode` now work for comments on the entry point for projects with a single entry point, #2800. - Cascaded modifier tags will no longer be copied into type literals, #2802. - `@summary` now works to describe functions within modules, #2803. @@ -433,17 +448,14 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta - Convert to ESM to enable easier use of ESM-only dependencies. - Drop support for TypeScript <5.0, no longer supported by DefinitelyTyped -- Relaxed requirements for file names and generated url fragments. This may - result in a different file name structure, #2714. -- Anchors to document headings and reflections within a HTML generated pages - have changed. They can be partially restored to the previous format by - setting `--sluggerConfiguration.lowercase false`. This change was made to - more closely match the default behavior of GitHub's markdown rendering and - VSCode's autocomplete when creating a relative link to an external markdown - file. -- Removed the `hideParameterTypesInTitle` option, this was originally added as - a workaround for many signatures overflowing the available horizontal space - in rendered pages. TypeDoc now has logic to wrap types/signatures smartly, +- Relaxed requirements for file names and generated url fragments. This may result in a different file name structure, + #2714. +- Anchors to document headings and reflections within a HTML generated pages have changed. They can be partially + restored to the previous format by setting `--sluggerConfiguration.lowercase false`. This change was made to more + closely match the default behavior of GitHub's markdown rendering and VSCode's autocomplete when creating a relative + link to an external markdown file. +- Removed the `hideParameterTypesInTitle` option, this was originally added as a workaround for many signatures + overflowing the available horizontal space in rendered pages. TypeDoc now has logic to wrap types/signatures smartly, so this option is no longer necessary. - Changed the default `kindSortOrder` to put references last. - Changed the default `sort` order to use `alphabetical-ignoring-documents` @@ -452,89 +464,70 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta - API: Constructor signatures now use the parent class name as their name (e.g. `X`, not `new X`) - API: `@group`, `@category`, `@groupDescription` and `@categoryDescription` - will no longer be removed from the reflections they are present on. They are - skipped during rendering with the `notRenderedTags` option. + will no longer be removed from the reflections they are present on. They are skipped during rendering with the + `notRenderedTags` option. ### Features - Add support for TypeScript 5.7 -- TypeDoc will now discover entry points from `package.json` exports if they - are not provided manually, #1937. -- Relative links to markdown files may now include `#anchor` links to - reference a heading within them. +- TypeDoc will now discover entry points from `package.json` exports if they are not provided manually, #1937. +- Relative links to markdown files may now include `#anchor` links to reference a heading within them. - Improved support for `@param` comments with nested object types, #2555. -- Improved support for `@param` comments which reference a type - alias/interface. Important properties on the referenced type can now be - highlighted with `@param options.foo`, which will result in the additional - note being included under the documentation for that parameter, #2147. Note: - This feature is limited to references. It is not supported on other types of - types. -- Added a new `outputs` option which is an array of outputs. This can be used - to render the documentation multiple times with different rendering options - or output types, #2597. +- Improved support for `@param` comments which reference a type alias/interface. Important properties on the referenced + type can now be highlighted with `@param options.foo`, which will result in the additional note being included under + the documentation for that parameter, #2147. Note: + This feature is limited to references. It is not supported on other types of types. +- Added a new `outputs` option which is an array of outputs. This can be used to render the documentation multiple times + with different rendering options or output types, #2597. - Added support for rendering alerts (or callouts) in markdown. -- Add support for an `@expand` tag which can be placed on type aliases and - interfaces. When a type with `@expand` is referenced and TypeDoc has a place - to include additional details about the type, the properties of the type - will be included in the page where `@expand` is found. Note that use of this - tag can _significantly_ increase the size of your generated documentation if - it is applied to commonly used types as it will result in inlining the - comments for those types everywhere they are referenced, #2303. -- Add support for an `@inline` tag which can be placed on type aliases and - interfaces. When a type with `@inline` is referenced, TypeDoc will resolve - the referenced type and convert the type as if it was included directly - within the referencing type. Note that use of this tag can _significantly_ - increase the size of your generated documentation if it is applied to - commonly used types as it will result in inlining the comments for those +- Add support for an `@expand` tag which can be placed on type aliases and interfaces. When a type with `@expand` is + referenced and TypeDoc has a place to include additional details about the type, the properties of the type will be + included in the page where `@expand` is found. Note that use of this tag can _significantly_ increase the size of your + generated documentation if it is applied to commonly used types as it will result in inlining the comments for those types everywhere they are referenced, #2303. -- Introduced a new `@useDeclaredType` tag for type aliases which can sometimes - improve their documentation, #2654. -- Added a new `@mergeModuleWith` tag which can be used to tell TypeDoc to - place a module/namespace's children under a different module/namespace and - remove the real parent, #2281. -- Added new `@include` and `@includeCode` inline tags to include files within - comments/documents. +- Add support for an `@inline` tag which can be placed on type aliases and interfaces. When a type with `@inline` is + referenced, TypeDoc will resolve the referenced type and convert the type as if it was included directly within the + referencing type. Note that use of this tag can _significantly_ + increase the size of your generated documentation if it is applied to commonly used types as it will result in + inlining the comments for those types everywhere they are referenced, #2303. +- Introduced a new `@useDeclaredType` tag for type aliases which can sometimes improve their documentation, #2654. +- Added a new `@mergeModuleWith` tag which can be used to tell TypeDoc to place a module/namespace's children under a + different module/namespace and remove the real parent, #2281. +- Added new `@include` and `@includeCode` inline tags to include files within comments/documents. - Add `notRenderedTags` option. This option is similar to the `excludeTags` - option, but while `excludeTags` will result in the tag being completely - removed from the documentation, `notRenderedTags` only prevents it from - being included when rendering. + option, but while `excludeTags` will result in the tag being completely removed from the documentation, + `notRenderedTags` only prevents it from being included when rendering. - Added `groupReferencesByType` option. - Added `navigation.excludeReferences` option -- Added `useFirstParagraphOfCommentAsSummary` option to configure how TypeDoc - handles comments for module members without the `@summary` tag. +- Added `useFirstParagraphOfCommentAsSummary` option to configure how TypeDoc handles comments for module members + without the `@summary` tag. - Introduced `favicon` option to specify a `.ico` or `.svg` favicon to reference. -- Sections within the page and in the "On This Page" navigation are now tied - together and will expand/collapse together, #2335. +- Sections within the page and in the "On This Page" navigation are now tied together and will expand/collapse together, + #2335. - API: Introduced a new `app.outputs` object for defining new output strategies. - API: TypeDoc's CSS is now wrapped in `@layer typedoc`, #2782. ### Bug Fixes - TypeDoc now properly flags `readonly` index signatures. -- TypeDoc will now use the first signature's comment for later signatures in - overloads if present, #2718. +- TypeDoc will now use the first signature's comment for later signatures in overloads if present, #2718. - Fixed handling of `@enum` if the type was declared before the variable, #2719. - Fixed empty top level modules page in packages mode, #2753. - TypeDoc can now link to type alias properties, #2524. -- TypeDoc will now document the merged symbol type when considering globals - declared inside `declare global`, #2774 +- TypeDoc will now document the merged symbol type when considering globals declared inside `declare global`, #2774 - TypeDoc now converts `declare module "foo"` as a module rather than a namespace, #2778. - Import types in type aliases now use module member references if present, #2779. -- Fixed an issue where properties were not properly marked optional in some - cases. This primarily affected destructured parameters. +- Fixed an issue where properties were not properly marked optional in some cases. This primarily affected destructured + parameters. - Added `yaml` to the highlight languages supported by default. -- TypeDoc now recognizes `txt` as an alias of `text` to indicate a code block - should not be highlighted. -- Items which are hidden with `@ignore` or `@hidden` but still referenced by - other types will no longer produce warnings about not being exported. -- If a project only has one module within it, TypeDoc will now consider that - module when resolving `@link` tags. -- The arrows to indicate whether or not a section is open now work when - JavaScript is disabled. -- Group/category search boosts are now applied when writing the search index - rather than when converting. This prevents issues where boosts used by just - one package were incorrectly reported as unused when running with - entryPointStrategy set to packages. +- TypeDoc now recognizes `txt` as an alias of `text` to indicate a code block should not be highlighted. +- Items which are hidden with `@ignore` or `@hidden` but still referenced by other types will no longer produce warnings + about not being exported. +- If a project only has one module within it, TypeDoc will now consider that module when resolving `@link` tags. +- The arrows to indicate whether or not a section is open now work when JavaScript is disabled. +- Group/category search boosts are now applied when writing the search index rather than when converting. This prevents + issues where boosts used by just one package were incorrectly reported as unused when running with entryPointStrategy + set to packages. ### Thanks! @@ -596,8 +589,8 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta - Big integer literals are now supported as default values, #2721. - Corrected handling of `@link` tags present in comments at the start of source files. - The index will now display when a module only contains documents, #2722. -- `ReflectionSymbolId.pos` no longer references the position _before_ any doc comments for a symbol. - This could cause typedoc-plugin-dt-links to produce links which didn't go to the expected location in a file. +- `ReflectionSymbolId.pos` no longer references the position _before_ any doc comments for a symbol. This could cause + typedoc-plugin-dt-links to produce links which didn't go to the expected location in a file. ### Thanks! @@ -611,7 +604,8 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta - Support TypeScript 5.6, #2699. - Added `customJs` option to include a script tag in generated HTML output, #2650. -- Added `markdownLinkExternal` option to treat `http[s]://` links in markdown documents and comments as external to be opened in a new tab, #2679. +- Added `markdownLinkExternal` option to treat `http[s]://` links in markdown documents and comments as external to be + opened in a new tab, #2679. - Added `navigation.excludeReferences` option to prevent re-exports from appearing in the left hand navigation, #2685. - Added support for the `@abstract` tag, #2692. @@ -632,16 +626,20 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Features -- Use of the `@extends` block tag no longer produces warnings, #2659. - This tag should only be used in JavaScript projects to specify the type parameters used when extending a parent class. It will not be rendered. -- Added new `navigation.compactFolders` option to prevent TypeDoc from compacting folders, similar to the VSCode option. #2667. +- Use of the `@extends` block tag no longer produces warnings, #2659. This tag should only be used in JavaScript + projects to specify the type parameters used when extending a parent class. It will not be rendered. +- Added new `navigation.compactFolders` option to prevent TypeDoc from compacting folders, similar to the VSCode option. + #2667. ### Bug Fixes -- The `suppressCommentWarningsInDeclarationFiles` option now correctly ignores warnings in `.d.cts` and `.d.mts` files, #2647. +- The `suppressCommentWarningsInDeclarationFiles` option now correctly ignores warnings in `.d.cts` and `.d.mts` files, + #2647. - Restored re-exports in the page navigation menu, #2671. -- JSON serialized projects will no longer contain reflection IDs for other projects created in the same run. Gerrit0/typedoc-plugin-zod#6. -- In packages mode the reflection ID counter will no longer be reset when converting projects. This previously could result in links to files not working as expected. +- JSON serialized projects will no longer contain reflection IDs for other projects created in the same run. + Gerrit0/typedoc-plugin-zod#6. +- In packages mode the reflection ID counter will no longer be reset when converting projects. This previously could + result in links to files not working as expected. ## v0.26.5 (2024-07-21) @@ -651,7 +649,8 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Bug Fixes -- Constructor parameters which share a name with a property on a parent class will no longer inherit the comment on the parent class, #2636. +- Constructor parameters which share a name with a property on a parent class will no longer inherit the comment on the + parent class, #2636. - Packages mode will now attempt to use the comment declared in the comment class for inherited members, #2622. - TypeDoc no longer crashes when `@document` includes an empty file, #2638. - API: Event listeners added later with the same priority will be called later, #2643. @@ -664,9 +663,11 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Bug Fixes -- The page navigation sidebar no longer incorrectly includes re-exports if the same member is exported with multiple names #2625. +- The page navigation sidebar no longer incorrectly includes re-exports if the same member is exported with multiple + names #2625. - Page navigation now ensures the current page is visible when the page is first loaded, #2626. -- If a relative linked image is referenced multiple times, TypeDoc will no longer sometimes produce invalid links to the image #2627. +- If a relative linked image is referenced multiple times, TypeDoc will no longer sometimes produce invalid links to the + image #2627. - `@link` tags will now be validated in referenced markdown documents, #2629. - `@link` tags are now resolved in project documents, #2629. - HTML/JSON output generated by TypeDoc now contains a trailing newline, #2632. @@ -695,16 +696,16 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Features -- Added a `--suppressCommentWarningsInDeclarationFiles` option to disable warnings from - parsing comments in declaration files, #2611. -- Improved comment discovery to more closely match TypeScript's discovery when getting comments - for members of interfaces/classes, #2084, #2545. +- Added a `--suppressCommentWarningsInDeclarationFiles` option to disable warnings from parsing comments in declaration + files, #2611. +- Improved comment discovery to more closely match TypeScript's discovery when getting comments for members of + interfaces/classes, #2084, #2545. ### Bug Fixes - The `text` non-highlighted language no longer causes warnings when rendering, #2610. -- If a comment on a method is inherited from a parent class, and the child class does not - use an `@param` tag from the parent, TypeDoc will no longer warn about the `@param` tag. +- If a comment on a method is inherited from a parent class, and the child class does not use an `@param` tag from the + parent, TypeDoc will no longer warn about the `@param` tag. ## v0.26.1 (2024-06-22) @@ -734,31 +735,36 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Breaking Changes - Drop support for Node 16. -- Moved from `marked` to `markdown-it` for parsing as marked has moved to an async model which supporting would significantly complicate TypeDoc's rendering code. - This means that any projects setting `markedOptions` needs to be updated to use `markdownItOptions`. - Unlike `marked@4`, `markdown-it` pushes lots of functionality to plugins. To use plugins, a JavaScript config file must be used with the `markdownItLoader` option. -- Updated Shiki from 0.14 to 1.x. This should mostly be a transparent update which adds another 23 supported languages and 13 supported themes. - As Shiki adds additional languages, the time it takes to load the highlighter increases linearly. To avoid rendering taking longer than necessary, - TypeDoc now only loads a few common languages. Additional languages can be loaded by setting the `--highlightLanguages` option. +- Moved from `marked` to `markdown-it` for parsing as marked has moved to an async model which supporting would + significantly complicate TypeDoc's rendering code. This means that any projects setting `markedOptions` needs to be + updated to use `markdownItOptions`. Unlike `marked@4`, `markdown-it` pushes lots of functionality to plugins. To use + plugins, a JavaScript config file must be used with the `markdownItLoader` option. +- Updated Shiki from 0.14 to 1.x. This should mostly be a transparent update which adds another 23 supported languages + and 13 supported themes. As Shiki adds additional languages, the time it takes to load the highlighter increases + linearly. To avoid rendering taking longer than necessary, TypeDoc now only loads a few common languages. Additional + languages can be loaded by setting the `--highlightLanguages` option. - Changed default of `--excludePrivate` to `true`. - Renamed `--sitemapBaseUrl` to `--hostedBaseUrl` to reflect that it can be used for more than just the sitemap. - Removed deprecated `navigation.fullTree` option. -- Removed `--media` option, TypeDoc will now detect image links within your comments and markdown documents and automatically copy them to the site. +- Removed `--media` option, TypeDoc will now detect image links within your comments and markdown documents and + automatically copy them to the site. - Removed `--includes` option, use the `@document` tag instead. - Removed `--stripYamlFrontmatter` option, TypeDoc will always do this now. - Renamed the `--htmlLang` option to `--lang`. - Removed the `--gaId` option for Google Analytics integration and corresponding `analytics` theme member, #2600. -- All function-likes may now have comments directly attached to them. This is a change from previous versions of TypeDoc where functions comments - were always moved down to the signature level. This mostly worked, but caused problems with type aliases, so was partially changed in 0.25.13. - This change was extended to apply not only to type aliases, but also other function-likes declared with variables and callable properties. - As a part of this change, comments on the implementation signature of overloaded functions will now be added to the function reflection, and will - not be inherited by signatures of that function, #2521. -- API: TypeDoc now uses a typed event emitter to provide improved type safety, this found a bug where `Converter.EVENT_CREATE_DECLARATION` +- All function-likes may now have comments directly attached to them. This is a change from previous versions of TypeDoc + where functions comments were always moved down to the signature level. This mostly worked, but caused problems with + type aliases, so was partially changed in 0.25.13. This change was extended to apply not only to type aliases, but + also other function-likes declared with variables and callable properties. As a part of this change, comments on the + implementation signature of overloaded functions will now be added to the function reflection, and will not be + inherited by signatures of that function, #2521. +- API: TypeDoc now uses a typed event emitter to provide improved type safety, this found a bug where + `Converter.EVENT_CREATE_DECLARATION` was emitted for `ProjectReflection` in some circumstances. - API: `MapOptionDeclaration.mapError` has been removed. - API: Deprecated `BindOption` decorator has been removed. -- API: `DeclarationReflection.indexSignature` has been renamed to `DeclarationReflection.indexSignatures`. - Note: This also affects JSON serialization. TypeDoc will support JSON output from 0.25 through at least 0.26. +- API: `DeclarationReflection.indexSignature` has been renamed to `DeclarationReflection.indexSignatures`. Note: This + also affects JSON serialization. TypeDoc will support JSON output from 0.25 through at least 0.26. - API: `JSONOutput.SignatureReflection.typeParameter` has been renamed to `typeParameters` to match the JS API. - API: `DefaultThemeRenderContext.iconsCache` has been removed as it is no longer needed. - API: `DefaultThemeRenderContext.hook` must now be passed `context` if required by the hook. @@ -766,34 +772,43 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Features - Added support for TypeScript 5.5. -- Added new `--projectDocuments` option to specify additional Markdown documents to be included in the generated site #247, #1870, #2288, #2565. -- TypeDoc now has the architecture in place to support localization. No languages besides English - are currently shipped in the package, but it is now possible to add support for additional languages, #2475. -- Added support for a `packageOptions` object which specifies options that should be applied to each entry point when running with `--entryPointStrategy packages`, #2523. +- Added new `--projectDocuments` option to specify additional Markdown documents to be included in the generated site + #247, #1870, #2288, #2565. +- TypeDoc now has the architecture in place to support localization. No languages besides English are currently shipped + in the package, but it is now possible to add support for additional languages, #2475. +- Added support for a `packageOptions` object which specifies options that should be applied to each entry point when + running with `--entryPointStrategy packages`, #2523. - `--hostedBaseUrl` will now be used to generate a `` element in the project root page, #2550. -- Added support for documenting individual elements of a union type, #2585. - Note: This feature is only available on type aliases directly containing unions. +- Added support for documenting individual elements of a union type, #2585. Note: This feature is only available on type + aliases directly containing unions. - TypeDoc will now log the number of errors/warnings errors encountered, if any, after a run, #2581. - New option, `--customFooterHtml` to add custom HTML to the generated page footer, #2559. - TypeDoc will now copy modifier tags to children if specified in the `--cascadedModifierTags` option, #2056. -- TypeDoc will now warn if mutually exclusive modifier tags are specified for a comment (e.g. both `@alpha` and `@beta`), #2056. +- TypeDoc will now warn if mutually exclusive modifier tags are specified for a comment (e.g. both `@alpha` and + `@beta`), #2056. - Groups and categories can now be collapsed in the page body, #2330. -- Added support for JSDoc `@hideconstructor` tag. - This tag should only be used to work around TypeScript#58653, prefer the more general `@hidden`/`@ignore` tag to hide members normally, #2577. -- Added `--useHostedBaseUrlForAbsoluteLinks` option to use the `--hostedBaseUrl` option to produce absolute links to pages on a site, #940. +- Added support for JSDoc `@hideconstructor` tag. This tag should only be used to work around TypeScript#58653, prefer + the more general `@hidden`/`@ignore` tag to hide members normally, #2577. +- Added `--useHostedBaseUrlForAbsoluteLinks` option to use the `--hostedBaseUrl` option to produce absolute links to + pages on a site, #940. - Tag headers now generate permalinks in the default theme, #2308. -- TypeDoc now attempts to use the "most likely name" for a symbol if the symbol is not present in the documentation, #2574. -- Fixed an issue where the "On This Page" section would include markdown if the page contained headings which contained markdown. +- TypeDoc now attempts to use the "most likely name" for a symbol if the symbol is not present in the documentation, + #2574. +- Fixed an issue where the "On This Page" section would include markdown if the page contained headings which contained + markdown. - TypeDoc will now warn if a block tag is used which is not defined by the `--blockTags` option. -- Added three new sort strategies `documents-first`, `documents-last`, and `alphabetical-ignoring-documents` to order markdown documents. -- Added new `--alwaysCreateEntryPointModule` option. When set, TypeDoc will always create a `Module` for entry points, even if only one is provided. - If `--projectDocuments` is used to add documents, this option defaults to `true`, otherwise, defaults to `false`. +- Added three new sort strategies `documents-first`, `documents-last`, and `alphabetical-ignoring-documents` to order + markdown documents. +- Added new `--alwaysCreateEntryPointModule` option. When set, TypeDoc will always create a `Module` for entry points, + even if only one is provided. If `--projectDocuments` is used to add documents, this option defaults to `true`, + otherwise, defaults to `false`. - Added new `--highlightLanguages` option to control what Shiki language packages are loaded. - TypeDoc will now render union elements on new lines if there are more than 3 items in the union. -- TypeDoc will now only render the "Type Declaration" section if it will provide additional information not already presented in the page. - This results in significantly smaller documentation pages in many cases where that section would just repeat what has already been presented in the rendered type. -- Added `comment.beforeTags` and `comment.afterTags` hooks for plugin use. - Combined with `CommentTag.skipRendering` this can be used to provide custom tag handling at render time. +- TypeDoc will now only render the "Type Declaration" section if it will provide additional information not already + presented in the page. This results in significantly smaller documentation pages in many cases where that section + would just repeat what has already been presented in the rendered type. +- Added `comment.beforeTags` and `comment.afterTags` hooks for plugin use. Combined with `CommentTag.skipRendering` this + can be used to provide custom tag handling at render time. ### Bug Fixes @@ -802,19 +817,22 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta - Types rendered in the `Returns` header are now properly colored, #2546. - Links added with the `navigationLinks` option are now moved into the pull out navigation on mobile displays, #2548. - `@license` and `@import` comments will be ignored at the top of files, #2552. -- Fixed issue in documentation validation where constructor signatures where improperly considered not documented, #2553. +- Fixed issue in documentation validation where constructor signatures where improperly considered not documented, + #2553. - Keyboard focus is now visible on dropdowns and checkboxes in the default theme, #2556. - The color theme label in the default theme now has an accessible name, #2557. - Fixed issue where search results could not be navigated while Windows Narrator was on, #2563. - `charset` is now correctly cased in `` tag generated by the default theme, #2568. - Fixed very slow conversion on Windows where Msys git was used by typedoc to discover repository links, #2586. - Validation will now be run in watch mode, #2584. -- Fixed an issue where custom themes which added dependencies in the `` element could result in broken icons, #2589. +- Fixed an issue where custom themes which added dependencies in the `` element could result in broken icons, + #2589. - `@default` and `@defaultValue` blocks are now recognized as regular blocks if they include inline tags, #2601. - Navigation folders sharing a name will no longer be saved with a shared key to `localStorage`. - The `--hideParameterTypesInTitle` option no longer applies when rendering function types. - Broken `@link` tags in readme files will now cause a warning when link validation is enabled. -- Fixed `externalSymbolLinkMappings` option's support for [meanings](https://typedoc.org/guides/declaration-references/#meaning) in declaration references. +- Fixed `externalSymbolLinkMappings` option's support + for [meanings](https://typedoc.org/guides/declaration-references/#meaning) in declaration references. - Buttons to copy code now have the `type=button` attribute set to avoid being treated as submit buttons. - `--hostedBaseUrl` will now implicitly add a trailing slash to the generated URL. @@ -833,8 +851,8 @@ This will be the last v0.27.x release, see #2868 for discussion on the 0.28 beta ### Features -- Added `gitRevision:short` placeholder option to `--sourceLinkTemplate` option, #2529. - Links generated by TypeDoc will now default to using the non-short git revision. +- Added `gitRevision:short` placeholder option to `--sourceLinkTemplate` option, #2529. Links generated by TypeDoc will + now default to using the non-short git revision. - Moved "Generated by TypeDoc" footer into a `