jsdoc, typedoc, and esdoc are tools designed to generate documentation from source code comments. jsdoc is the long-standing standard for plain JavaScript, using JSDoc comments to describe types and behavior. typedoc is built specifically for TypeScript, leveraging the compiler's type system to produce accurate API references. esdoc focused on ES6 features and static analysis but has seen significantly less maintenance activity in recent years compared to the other two. All three output HTML documentation, but they differ in configuration, type inference, and ecosystem support.
All three tools aim to turn code comments into readable websites, but they handle types, configuration, and modern syntax very differently. jsdoc is the battle-tested standard for JavaScript. typedoc is the native choice for TypeScript. esdoc offered a unique approach to ES6 but has fallen behind in maintenance. Let's compare how they handle real-world documentation tasks.
jsdoc uses a dedicated JSON configuration file.
jsdoc.conf.json.// jsdoc: jsdoc.conf.json
{
"source": { "include": ["src"] },
"opts": { "destination": "./docs" }
}
typedoc integrates with your TypeScript config.
tsconfig.json by default, reducing duplicate setup.typedoc.json for specific overrides.// typedoc: typedoc.json
{
"entryPoints": ["src/index.ts"],
"out": "docs"
}
esdoc uses its own JSON config file.
// esdoc: .esdoc.json
{
"source": "./src",
"destination": "./doc"
}
jsdoc relies entirely on comments for type information.
@param and @returns tags manually.// jsdoc: Manual type comments
/**
* @param {string} name - The user name
* @returns {number} The user ID
*/
function getUser(name) { return 1; }
typedoc infers types from TypeScript code directly.
// typedoc: TypeScript inference
function getUser(name: string): number {
return 1;
}
esdoc uses JSDoc-style comments with ES6 focus.
@interface and @typedef similar to JSDoc.// esdoc: ES6 focused comments
/**
* @interface User
* @property {string} name
*/
jsdoc supports TypeScript via type comments in JS files.
.ts files natively without plugins.// jsdoc: TS support via JSDoc in JS
/** @typedef {import('./types').User} User */
typedoc is built for TypeScript first.
.ts and .tsx files out of the box.// typedoc: Native TS generics
function wrap<T>(value: T): T {
return value;
}
esdoc has limited TypeScript support.
// esdoc: TS via plugin
// Requires esdoc-typescript-plugin in config
jsdoc offers many community templates.
template config option.minami and clean-jsdoc-theme.// jsdoc: Setting a template
{
"opts": { "template": "node_modules/minami" }
}
typedoc has a default theme with plugin options.
typedoc-plugin-markdown allow non-HTML output.// typedoc: Markdown plugin
{
"plugin": ["typedoc-plugin-markdown"]
}
esdoc comes with a built-in modern theme.
// esdoc: Theme config
{
"theme": "esdoc-standard-theme"
}
jsdoc has the largest plugin library.
// jsdoc: Using a plugin
{
"plugins": ["plugins/markdown"]
}
typedoc has a growing, high-quality ecosystem.
// typedoc: Reflection plugin
{
"plugin": ["typedoc-plugin-external-module-name"]
}
esdoc has a stagnant plugin ecosystem.
// esdoc: Plugin risk
// Many plugins haven't been updated in years
While they differ in focus, all three tools share core documentation goals.
/** ... */ to define docs.@description and @example.// Common to all
/**
* @description Calculates sum
* @example sum(1, 2)
*/
# Common command
npm run docs
<!-- All outputs include -->
<input type="text" id="search" />
| Feature | jsdoc | typedoc | esdoc |
|---|---|---|---|
| Primary Language | JavaScript | TypeScript | JavaScript (ES6) |
| Type Inference | Manual via comments | Automatic via compiler | Manual via comments |
| Config Source | jsdoc.conf.json | tsconfig.json / typedoc.json | .esdoc.json |
| Maintenance | ✅ Active | ✅ Active | ⚠️ Low Activity |
| Plugin Ecosystem | 🟢 Large | 🟢 Growing | 🔴 Stagnant |
jsdoc is the safe, universal choice 🛡️ for JavaScript libraries. It works everywhere, supports all editors, and has a plugin for everything. Use it when you want stability and broad compatibility.
typedoc is the precision tool 🎯 for TypeScript projects. It saves time by reading your types automatically and keeps docs in sync with code. Use it for any modern TS codebase.
esdoc is a legacy option 🕰️ that introduced nice ES6 features early but has since been overtaken. Unless you have a specific reason to stick with it, jsdoc or typedoc are better investments for long-term maintenance.
Final Thought: Documentation tools should reduce friction, not add it. For most teams today, typedoc (for TS) or jsdoc (for JS) provides the best balance of features, support, and future-proofing.
Choose esdoc only if you are maintaining a legacy project that already depends on its specific static analysis features. For new projects, it is generally recommended to avoid it due to lower maintenance activity and slower adoption of modern JavaScript features compared to jsdoc and typedoc.
Choose jsdoc for pure JavaScript projects where broad IDE support and community stability are priorities. It is the industry standard for JSDoc comments, ensuring your annotations work seamlessly with VS Code and other editors. Its plugin ecosystem is mature, allowing for custom tags and output formats.
Choose typedoc if your project is written in TypeScript or uses heavy JSDoc typing in JavaScript. It reads your tsconfig.json and understands complex types, interfaces, and generics without needing duplicate type definitions in comments. It is the best fit for modern type-safe codebases.
ESDoc is a documentation generator for JavaScript.
Please try it out!
And more.
# Move to a your project directory.
cd your-project/
# Install ESDoc and standard plugin.
npm install --save-dev esdoc esdoc-standard-plugin
# Create a configuration file.
echo '{
"source": "./src",
"destination": "./docs",
"plugins": [{"name": "esdoc-standard-plugin"}]
}' > .esdoc.json
# Run ESDoc.
./node_modules/.bin/esdoc
# View a documentation
open ./docs/index.html
please visit esdoc.org to see more documentation.
MIT