typedoc vs jsdoc vs documentation vs esdoc
JavaScript Documentation Generators Comparison
1 Year
typedocjsdocdocumentationesdocSimilar Packages:
What's JavaScript Documentation Generators?

JavaScript documentation generators are tools that help developers create and maintain documentation for their codebases. These packages parse source code comments and generate structured documentation in various formats, making it easier for developers to understand, use, and contribute to code. They enhance code readability and provide a way to communicate the purpose and usage of functions, classes, and modules effectively. Each tool has its unique features and strengths, catering to different needs and preferences in the documentation process.

Package Weekly Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
typedoc2,191,3858,0452.1 MB210 days agoApache-2.0
jsdoc2,069,49615,2191.53 MB4487 months agoApache-2.0
documentation88,7175,7901.88 MB210a year agoISC
esdoc46,5872,743-1667 years agoMIT
Feature Comparison: typedoc vs jsdoc vs documentation vs esdoc

Language Support

  • typedoc:

    Designed specifically for TypeScript, it fully supports TypeScript's type annotations and features, providing detailed type information in the generated documentation.

  • jsdoc:

    Supports all versions of JavaScript, making it versatile for legacy and modern codebases alike, with a focus on JSDoc comment syntax.

  • documentation:

    Supports JavaScript and Markdown, allowing for flexible documentation formats and easy integration with existing documentation styles.

  • esdoc:

    Primarily focused on ES6+ syntax, making it ideal for modern JavaScript projects that leverage the latest language features.

Output Formats

  • typedoc:

    Generates HTML documentation that includes rich type information and class diagrams, tailored specifically for TypeScript projects.

  • jsdoc:

    Outputs documentation primarily in HTML, with options for additional formats through plugins, making it adaptable for various needs.

  • documentation:

    Generates documentation in HTML, Markdown, and JSON formats, allowing for diverse presentation options and easy integration into websites or other platforms.

  • esdoc:

    Produces HTML documentation with a focus on a clean and modern design, but with limited output format options compared to others.

Customization

  • typedoc:

    Allows for some customization, particularly in terms of theme and layout, but is primarily focused on providing accurate type documentation.

  • jsdoc:

    Provides basic customization through templates and styles, but may require additional effort for extensive customization.

  • documentation:

    Highly customizable with themes and templates, allowing developers to tailor the look and feel of their documentation to match their project's branding.

  • esdoc:

    Offers some customization options but is more limited compared to Documentation, focusing on a standardized output.

Community and Ecosystem

  • typedoc:

    Growing community support, especially among TypeScript developers, with a focus on improving TypeScript documentation practices.

  • jsdoc:

    One of the most established documentation generators with a large community, extensive resources, and numerous plugins available.

  • documentation:

    Has a growing community with active contributions and support, making it easier to find resources and plugins.

  • esdoc:

    Has a smaller community compared to JSDoc but is gaining traction, particularly among modern JavaScript developers.

Ease of Use

  • typedoc:

    Easy to set up for TypeScript projects, leveraging TypeScript's existing structure to generate documentation with minimal configuration.

  • jsdoc:

    Relatively easy to use, especially for those familiar with JSDoc syntax, but may require additional configuration for advanced features.

  • documentation:

    User-friendly setup with straightforward configuration, making it accessible for developers of all skill levels.

  • esdoc:

    Requires some familiarity with ES6 features, but offers a simple setup for modern JavaScript projects.

How to Choose: typedoc vs jsdoc vs documentation vs esdoc
  • typedoc:

    Choose TypeDoc if your project is written in TypeScript and you want to generate documentation that takes full advantage of TypeScript's type system. It is the best option for TypeScript projects that require in-depth type information and class hierarchies in their documentation.

  • jsdoc:

    Opt for JSDoc if you want a widely-used and well-supported tool that has a large community and extensive documentation. It is perfect for projects that require compatibility with various JavaScript versions and need a straightforward setup for generating documentation from comments.

  • documentation:

    Choose Documentation if you need a modern tool that supports markdown and offers a clean, customizable output. It is ideal for projects that prioritize a user-friendly documentation experience and require integration with various documentation formats.

  • esdoc:

    Select ESDoc if you are looking for a documentation generator that focuses on ES6+ features and provides a rich set of plugins for extended functionality. It is suitable for projects that heavily utilize modern JavaScript syntax and require detailed API documentation.

README for typedoc

TypeDoc

Documentation generator for TypeScript projects.

Documentation

For more detailed documentation, the changelog, and TypeDoc documentation rendered with TypeDoc, see https://typedoc.org.

Installation

TypeDoc runs on Node.js and is available as a NPM package.

npm install typedoc --save-dev

Usage

To generate documentation TypeDoc needs to know your project entry point and TypeScript compiler options. It will automatically try to find your tsconfig.json file, so you can just specify the entry point of your library:

typedoc src/index.ts

If you have multiple entry points, specify each of them.

typedoc package1/index.ts package2/index.ts

If you specify a directory, TypeDoc will use the entryPointStrategy option to determine how to resolve it. By default, TypeDoc will search for a file called index under the directory.

Monorepos / Workspaces

If your codebase is comprised of one or more npm packages, you can build documentation for each of them individually and merge the results together into a single site by setting entryPointStrategy to packages. In this mode TypeDoc requires configuration to be present in each directory to specify the entry points. For an example setup, see https://github.com/Gerrit0/typedoc-packages-example

Arguments

For a complete list of the command line arguments run typedoc --help or visit our website.

  • --out <path/to/documentation/>
    Specifies the location the documentation should be written to. Defaults to ./docs
  • --json <path/to/output.json>
    Specifies the location and file name a json file describing the project is written to. When specified no documentation will be generated unless --out is also specified.
  • --options
    Specify a json option file that should be loaded. If not specified TypeDoc will look for 'typedoc.json' in the current directory.
  • --tsconfig <path/to/tsconfig.json>
    Specify a typescript config file that should be loaded. If not specified TypeDoc will look for 'tsconfig.json' in the current directory.
  • --exclude <pattern>
    Exclude files by the given pattern when a path is provided as source. Supports standard minimatch patterns.

Theming

  • --theme <default|plugin defined theme>
    Specify the theme that should be used.
  • --name <Documentation title>
    Set the name of the project that will be used in the header of the template.
  • --readme <path/to/readme|none>
    Path to the readme file that should be displayed on the index page. Pass none to disable the index page and start the documentation on the globals page.

Miscellaneous

  • --version
    Display the version number of TypeDoc.
  • --help
    Display all TypeDoc options.

Contributing

This project is maintained by a community of developers. Contributions are welcome and appreciated. You can find TypeDoc on GitHub; feel free to open an issue or create a pull request: https://github.com/TypeStrong/typedoc

For more information, read the contribution guide.