Skip to content

Documents section missing from modules.html when there are no public exports #2722

@mrfigg

Description

@mrfigg

Search terms

packageDocumentation document index missing

Expected Behavior

The 'Documents' section should appear on the index page (modules.html).

Actual Behavior

If a module includes a @packageDocumentation tag containing one or more @document tags and does not have any public exports, the 'Documents' section does not appear on the index page (modules.html).

Steps to reproduce the bug

src/index.ts:

/**
 * @packageDocumentation
 * Example
 *
 * @document ../CHANGELOG.md
 * @document ../LICENSE.md
 * @document ../README.md
 */

/** @private */
export function helloWorld() {
  return "Hello World";
}

typedoc.json:

{
  "entryPoints": ["./src/index.ts"],
  "out": "./docs",
}

docs/modules.html screenshot:
example

Environment

  • Typedoc version: 0.26.7
  • TypeScript version: 5.6.2
  • Node.js version: 20.11.1
  • OS: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions