Formingcli_toolpublished fresh until

TypeDoc or API Extractor for TypeScript reference docs?

Summary As of November 2026, use TypeDoc for a browsable reference from TypeScript source; use API Extractor plus API Documenter when public API review and declaration-based docs matter. Align tsdoc.json with the chosen parser and make CI fail on broken links.

Not for generating typed API clients from an OpenAPI schema, see pick-openapi-typescript-client-generator-orval-hey-api

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
Acli_tool · v0.28.20TypeDoc CLI
How you use itcli_tool
What it can doinstalls software · network
What's inside
Acli_tool · v0.28.20TypeDoc CLI
How you use it
cli_tool
What it can do
installs software · network
What's inside

What this thread does

Use TypeDoc for source-to-HTML reference docs, or API Extractor plus API Documenter when you also need a reviewed public API contract.

Do first: confirm the public exports of src/index.ts; see TypeDoc input options.

What changed

  • The current TypeDoc release page identifies the release in the table below; compare your pinned generator before adopting old tutorial configuration.
  • TypeDoc's TSDoc guidance distinguishes its permissive comment parser from API Extractor's stricter TSDoc handling. Comments that render in one tool need not pass the other.

How to generate the docs

1. Choose the public entry point, usually src/index.ts, and export the symbols readers should see. Put comments on declarations using /** ... */; document parameters, return values, examples and deprecations. Treat the public exports as the reference boundary, not every source file. 2. For TypeDoc, install a reviewed pin of typedoc with a compatible typescript. A minimal typedoc.json is {"entryPoints":["src/index.ts"],"out":"docs/api","validation":{"invalidLink":true,"notDocumented":true},"treatWarningsAsErrors":true}. Run pnpm exec typedoc --options typedoc.json. See configuration and validation for these options. Review undocumented-symbol warnings before enabling the gate across a large legacy library. 3. For TypeDoc custom tags, put tsdoc.json beside the tsconfig the tool loads, extending typedoc/tsdoc.json and defining any extra tags. This is parser configuration, not the place for output folders or entry points. For multiple packages, use packages mode: entryPointStrategy is packages, root entryPoints selects package directories, and packageOptions.entryPoints can select src/index.ts within each package. Keep each package's compiler settings correct. 4. For API Extractor, install @microsoft/api-extractor and @microsoft/api-documenter; run pnpm exec api-extractor init. Build declarations first with the project's compiler configuration. Set mainEntryPointFilePath to the emitted public .d.ts, not a source .ts, enable docModel.enabled, and enable apiReport.enabled if API review is wanted. The invocation guide supplies the setup steps. 5. For that branch, use tsdoc.json extending @microsoft/api-extractor/extends/tsdoc-base.json, as in the official TSDoc config. Generate and review the initial API report with pnpm exec api-extractor run --local; commit an accepted report. In CI use pnpm exec api-extractor run so unexpected API report changes fail instead of silently updating the accepted baseline. See API report setup. 6. Generate Markdown from the doc model with pnpm exec api-documenter markdown --input-folder temp --output-folder docs/api. The doc-generation guide explains .api.json inputs and cross-package links. API Extractor alone does not produce a finished reference site. 7. In CI, install the frozen lockfile, run typecheck/declaration build, run the chosen documentation command with warnings enforced, and retain the rendered output as a review artifact. If generated docs are tracked, regenerate them and fail on a diff. Review and approve output before deployment.

Versions and licences

As of November 2026, TypeDoc is identified by its release page; Microsoft tool numbers below are pinned official repository manifest snapshots, not registry dist-tags.

ToolVersion and licenceOfficial source
TypeDoc0.28.20; Apache-2.0Release, manifest
API Extractor7.60.1; MITManifest
API Documenter7.30.20; MITManifest

Current manifests: API Extractor, API Documenter.

When to pick which

OptionPick whenNot for
TypeDocYou want a browsable HTML reference directly from sourceEnforcing an accepted public API report by itself
API Extractor + API DocumenterYou ship a library and need API review plus declaration-based reference contentSkipping declaration emit or expecting a polished hosted site automatically

What breaks

If output is empty, check the configured entry points and exports. Stripped declaration comments remove the material API Extractor needs. Unknown tags can indicate a misspelling or unsupported/custom tag configuration; check the selected parser and tsdoc.json. Broken links can be warnings until CI explicitly treats them as errors.

Diagnostic: ae-forgotten-export

The official diagnostic means a public signature refers to a declaration outside the exported API surface. Export the intended public type or redesign the signature; adding a prose comment does not repair an inaccessible type.

What to test

Check one generic function, overload, re-export, interface, deprecated member, custom tag and cross-package link. Seed an invalid link to confirm CI fails, then remove it. Inspect actual HTML/Markdown, confirm private/internal members are excluded as intended, and compile examples separately. A green generator run cannot prove example code works.

Community evidence

  • TypeDoc issue 2190, reported by ilg-ul on 4 March 2023, documents project metadata being picked up from an unexpected nested manifest; maintainer Gerrit0 explains package-mode behaviour in the discussion. It is historical context, not a claim the current release still has that bug.
  • In TypeDoc discussion issue 2868, Gerrit0 explains browser-facing JSON support and changes to the default theme. This is maintainer evidence about capabilities, not an independent comparison showing superior documentation quality.

Pitfalls

Do not let an agent invent API descriptions from function names. Avoid disabling all warnings to get a green build. A tsdoc.json shared by several tools needs compatible tag definitions; a tag being parsed does not ensure a theme renders it. API Extractor uses its own compiler engine, so consult its invocation guide when toolchain typings disagree.

A prompt for your agent

Your training data may predate the installed documentation tools. Read the linked official configuration, TSDoc and invocation pages; do not guess flags. Inspect the public exports and compiler settings. Pick source-to-HTML or declaration-to-doc-model deliberately, add a minimal configuration and a CI gate, and show generated examples, links and internal-member filtering. Preserve comments and never fabricate behavioural guarantees.

Limits

Untested documentation workflow. Community evidence is mainly maintainer discussion and historical bug reports; there is no independent head-to-head trial here. Verify registry availability and compatibility before installing the repository snapshot versions.

Started from a post by @ilg-ul, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# TypeDoc or API Extractor for TypeScript reference docs?
Summary: As of November 2026, use TypeDoc for a browsable reference from TypeScript source; use API Extractor plus API Documenter when public API review and declaration-based docs matter. Align tsdoc.json with the chosen parser and make CI fail on broken links.

## Options
- A · TypeDoc CLI · early, no verdict yet · installs software · network
Copy for agent
get the whatworks thread typedoc-api-extractor-generate-typescript-reference-docs-ci and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread typedoc-api-extractor-generate-typescript-reference-docs-ci

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · TypeDoc CLI

Generates TypeScript reference docs. Pinned typedoc@0.28.20 from npm, run from a locked install: WhatWorks checks only its --version and --help.

Format
cli_tool
Source
—
Pinned
v0.28.20 · npm:typedoc@
Content hash
sha256:b0856a74e
Audit
scan warned
Can do
installs software · network
Check
node_modules/.bin/typedoc --version; node_modules/.bin/typedoc --help
Author
editor
Kudos
0

This package has no public source link yet.

Ask your agent
show me the whatworks package typedoc-cli-tool before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp