Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

typedoc-plugin-coverage

Gerrit025.8kMIT3.4.1

A plugin for TypeDoc to generate a documentation coverage badge.

typedoc-plugin

readme

typedoc-plugin-coverage

A plugin for TypeDoc to generate a documentation coverage badge.

This plugin will write a coverage.svg badge and/or coverage.json to your output directory when generating HTML documentation that includes the percentage of your API surface which is documented. It will respect TypeDoc's requiredToBeDocumented option, and only report missing documentation if reflections covered by that option are undocumented.

Options

  • coverageLabel - Define the label for the coverage badge. Defaults to 'document'.
  • coverageColor - Define the define the color of the coverage badge background. Defaults to a dynamic color depending on coverage percentage.
  • coverageOutputPath - Defines the path where the coverage badge will be written, defaults to <output directory>/coverage.svg.
  • coverageOutputType - Defines the type of the coverage file to be written ('svg', 'json', 'all'). Defaults to 'svg'.
  • coverageSvgWidth - Defines the width, in pixels, of the generated svg file.

Default colors/icon sourced from esdoc-coverage-plugin

If the numbers don't match what you expected, or don't match what TypeDoc implies should be documented, set --logLevel Verbose to see additional logging about what was considered documented/not documented.

changelog

v3.4.1 (2025-01-02)

  • Added coverageSvgWidth option to control the width of the generated badge, #11.

v3.4.0 (2024-11-24)

  • Added support for TypeDoc 0.27
  • Updated coverage calculation algorithm to use the same logic as TypeDoc 0.27.0 to determine what members ought to be documented, #9.

v3.3.0 (2024-06-22)

  • Added support for TypeDoc 0.26

v3.2.0 (2024-06-12)

  • Added coverageOutputType option to write coverage information as JSON, #7 (@bladerunner2020)

v3.1.1 (2024-04-27)

  • Updated coverage calculation algorithm to use the same logic as TypeDoc 0.25.14 to determine what members ought to be documented.

v3.1.0 (2024-02-09)

  • Added coverageOutputPath option to specify where the coverage file should be written, #6.

v3.0.0 (2024-02-06)

  • Updated coverage calculation algorithm to use the same logic as TypeDoc 0.25.7 to determine what members ought to be documented.
  • Updated build tooling, migrate to ESM.

v2.2.0 (2023-08-25)

  • Added support for TypeDoc 0.25.x

v2.1.0 (2022-04-20)

  • Added coverageLabel option.

v2.0.1 (2022-04-15)

  • Added support for TypeDoc 0.24.

v2.0.0 (2022-06-27)

  • Added support for TypeDoc 0.23.
  • Dropped support for Node 12.

v1.0.2 (2022-03-26)

  • Fixed handling of requiredToBeDocumented if "Accessor" was specified.

v1.0.1 (2022-03-26)

  • Remove redundant .0 in displayed percentage in badge.

v1.0.0 (2022-03-26)

  • Initial release