TypeDoc Plugin for Vue and Pinia
typedoc-plugin-vue is a TypeDoc plugin designed to enhance the generated documentation for projects utilizing Vue 3's `defineComponent` and Pinia's `defineStore` constructs. It specifically improves how these framework-specific patterns are parsed and displayed, making the documentation more accurate and readable. Additionally, it attempts to recognize `FunctionalComponent` variables and convert them into a class-like representation within the documentation output. The current stable version is 1.5.1, released in October 2025. The plugin maintains an active release cadence, frequently updating to support new major versions of TypeDoc, with recent updates for TypeDoc 0.28. Its key differentiator is providing specialized parsing for Vue and Pinia, which vanilla TypeDoc does not natively optimize, ensuring that component properties, store actions, and getters are presented clearly.
Common errors
-
Error: The plugin 'typedoc-plugin-vue' could not be found.
cause The package was not installed, or TypeDoc cannot locate it (e.g., due to incorrect `plugin` path in configuration or `node_modules` resolution issues).fixEnsure `typedoc-plugin-vue` is installed as a `devDependency` (`npm install --save-dev typedoc-plugin-vue`) and that the `plugin` array in `typedoc.json` correctly lists its name: `"plugin": ["typedoc-plugin-vue"]`. -
Plugin typedoc-plugin-vue is not compatible with TypeDoc X.Y.Z
cause The installed version of `typedoc-plugin-vue` has a peer dependency requirement for TypeDoc that does not match your installed TypeDoc version.fixUpgrade `typedoc-plugin-vue` to its latest version (`npm update typedoc-plugin-vue`) or a specific version known to support your TypeDoc version. Alternatively, adjust your TypeDoc version to match the plugin's peer dependency range (e.g., `npm install typedoc@0.28.x`).
Warnings
- breaking Older versions of typedoc-plugin-vue may not be compatible with newer major versions of TypeDoc. Always ensure your plugin version supports your TypeDoc version to avoid parsing errors or incomplete documentation.
- gotcha The `excludeVueProperties` option was introduced in v1.4.0 and defaults to `true`. If you require properties like `$props`, `$watch`, or `$emit` to be documented for some reason, you must explicitly set this option to `false`.
- gotcha The plugin needs to be specified correctly in the `plugin` array within `typedoc.json`. Typos or incorrect configuration paths will prevent the plugin from loading.
Install
-
npm install typedoc-plugin-vue -
yarn add typedoc-plugin-vue -
pnpm add typedoc-plugin-vue
Imports
- plugin entry
import 'typedoc-plugin-vue';
{ "plugin": ["typedoc-plugin-vue"] } - excludeVueProperties option
{ "plugin": ["typedoc-plugin-vue"], "excludeVueProperties": true }
Quickstart
npm install --save-dev typedoc typedoc-plugin-vue
// typedoc.json
{
"entryPoints": ["./src/index.ts"],
"out": "docs",
"plugin": ["typedoc-plugin-vue"],
"excludeVueProperties": true,
"includeEntryPoint": false,
"tsconfig": "./tsconfig.json"
}