This plugin provides JSDoc tag completions and displays detailed documentation for each tag.
- Using the Preset API, you can define documentation and syntax for each JSDoc
tag.
These definitions will appear in the completion details shown by your editor.
$ npm i --save-dev typescript typescript-jsdoctag-completions-pluginNext, configure the plugin in your tsconfig.json:
Then launch Visual Studio Code or your preferred TypeScript editor.
The plugin supports two types of presets:
-
Built-in presets:
Preset name Details default TypeScript built-in JSDoc tags and Inline JSDoc tags closure Closure Compiler JSDoc tags -
Custom presets:
To create your own preset, implement
TJSDocTagRawPresetas defined in preset-api.d.ts:
The priority for resolving the locale setting is:
-
Project configuration (tsconfig.json, etc.)
- VSCode settings (vscode extension vscode-typescript-jsdoctag-completions)
-
OS locale
- Set the TypeScript version in VSCode: ensure that the TypeScript version in VSCode is set to the version installed in your project.
- Include your source files in tsconfig.json: The plugin only applies to files listed in the "include" section.
This project is licensed under the MIT License. See the LICENSE file for details.
{ "compilerOptions": { "target": "es2019", "module": "esnext", "strict": true, // In TypeScript 5.x, compilerOptions/locale was removed, // so Moved locale to plugin settings. // However, for older versions of TypeScript, // this value is still read by the plugin as before. // "locale": "ja", "plugins": [ { "name": "typescript-jsdoctag-completions-plugin", // Plugin specific configuration // builtin preset is "default" and "closure". // If you want to use a jsdoc tag preset that you have defined yourself based on the preset API, // specify the path of that module. "preset": "closure", "verbose": true, // enable/disable plugin logging // plugin refers to the value of `@compilerOptions/plugins[@name=typescript-jsdoctag-completions-plugin]/locale` // If not set, use the OS locale "locale": "ja" } ] } }