@ckeditor/typedoc-plugins

中文文档
63.1.3发布于 2026/11/09MITTypeScriptES Module近 30 天下载 7924

Various TypeDoc plugins developed by the CKEditor 5 team.

原始使用文档
文档目录4 节
  1. Overview
  2. Usage
  3. Available plugins
  4. Changelog

TypeDoc plugins overview

npm version CircleCI

Overview

This repository consists of a few plugins which extend the capabilities of TypeDoc.

[!WARNING] The @ckeditor/typedoc-plugins requires [email protected].

Before enabling plugins from the package, you need to install it first.

npm install @ckeditor/typedoc-plugins

Below you can find the detailed overview of available plugins.

Usage

To use the typedoc-plugins, you need to create an instance of the Typedoc application.

import { Application } from 'typedoc';
import { typeDocSymbolFixer } from '@ckeditor/typedoc-plugins';

const app = await Application.bootstrapWithPlugins( { /* Typedoc options. */ } );

// It is essential to execute a plugin before converting the project.
typeDocSymbolFixer( app );

const conversionResult = await typeDoc.convert();

Available plugins

  • Module fixer — typeDocModuleFixer()

    The plugin reads the module name specified in the @module annotation.

    import type { TypeDefinition } from '...';
    
    /**
     * @module package/file
     */
    

    For the example specified above, the name of the parsed module should be equal to package/file.

    The import statements may be specified above the "@module" block code. In such a case, the default module parser from typedoc returns the module name based on a path relative to the project root.

  • Symbol fixer — typeDocSymbolFixer()

    The plugin renames Symbol.* definitions with the JSDoc style.

    • Typedoc: [iterator]() → Iterator
    • JSDoc: Symbol.iterator() → Iterator
  • Interface augmentation fixer — typeDocInterfaceAugmentationFixer()

    The plugin tries to fix an interface, that has been extended (augmented) from the outside (from another module) in the re-exported index.ts file. When the extending "declare module ..." declaration contains the full package name, it points to the index.ts file instead of the actual source file. The goal is to add missing properties from interfaces to their source locations.

  • Event parameter fixer — typeDocEventParamFixer()

    The plugin injects the eventInfo parameter (an instance of the EventInfo class) as the first parameter for each event reflection.

  • Events inheritance fixer — typeDocEventInheritanceFixer()

    The plugin takes care of inheriting events, which are created manually via the @eventName annotation.

  • Hierarchy fixer — typeDocHierarchyFixer()

    The plugin restores the class hierarchy broken by extending an intermediate mixin constant, e.g. const ClassicEditorBase = ElementApiMixin( Editor ). It replaces the unresolvable base class reference with the actual base class, restores the "Subclasses" relation on the base class, and lists the mixin interfaces as implemented by the extending class. It also removes references pointing to reflections purged from private packages.

    The plugin must be executed after typeDocEventInheritanceFixer(), because inheriting events resolves the original (broken) references replaced by this plugin.

  • Purge private API — typeDocPurgePrivateApiDocs()

    The plugin removes reflections collected from private packages (marked as "private": true in their package.json). To disable the mechanism, add the @publicApi annotation at the beginning of a file.

  • Tag @error — typeDocTagError()

    The plugin collects error definitions from the @error annotation.

  • Tag @eventName — typeDocTagEvent()

    The plugin collects event definitions from the @eventName annotation and assigns them as the children of the class or the Observable interface.

    We are not using the @event annotation, known from the JSDoc specification, because it has a special meaning in the TypeDoc, and it would be difficult to get it to work as we expect.

  • Tag @observable — typeDocTagObservable()

    Adds support for creating CKEditor 5 events from properties marked as @observable.

  • Restore program after conversion — typeDocRestoreProgramAfterConversion()

    The plugin restores the TypeScript program used for the source conversion. TypeDoc deletes the context.program property once the conversion is finished, which prevents other plugins listening to the EVENT_END event from using the TypeScript API.

  • Reference fixer — typeDocReferenceFixer()

    The plugin fixes reflections that are re-exported from another file as a default export. In such a case TypeDoc adds the reflection declaration to the file containing the re-export, while the actual source file contains only a reference. The plugin moves the declarations back to their source locations.

  • Output clean-up — typeDocOutputCleanUp()

    The plugin removes unnecessary properties from reflections to decrease the size of the generated output.

  • Validators — validate()

    Validates the CKEditor 5 documentation. It verifies the @see and @link references and the events specified in the @fires annotation. Optionally, when the enableOverloadValidator option is enabled, it also verifies whether overloaded signatures use the @label annotation.


Changelog

See the CHANGELOG.md file.

版本与发布记录

@ckeditor/typedoc-plugins 共发布 219 个版本,首次发布于 2023/01/18;过去 12 个月发布了 80 个版本。

版本发布日期距今
63.1.3latest2026/11/09今天
63.1.22026/11/063 天前
54.11.0latest-v542026/11/036 天前
63.1.12026/11/027 天前
61.4.0latest-v612026/10/2812 天前
54.10.02026/10/2812 天前

其他发布通道:next → 54.2.1,alpha → 57.0.0-alpha.1,latest-v61 → 61.4.0,latest-v54 → 54.11.0。

关于 @ckeditor/typedoc-plugins 的常见问题

@ckeditor/typedoc-plugins 是什么?

Various TypeDoc plugins developed by the CKEditor 5 team.

如何安装 @ckeditor/typedoc-plugins?

在项目目录运行 npm install @ckeditor/typedoc-plugins,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typedoc(^0.28.20)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ckeditor/typedoc-plugins 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ckeditor/typedoc-plugins 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ckeditor/typedoc-plugins 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=26.10.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ckeditor/typedoc-plugins 可以商用吗?

@ckeditor/typedoc-plugins 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ckeditor/typedoc-plugins 的下载量有多少?

根据 npm 官方下载统计,@ckeditor/typedoc-plugins 在 2026/10/10 – 2026/11/08 这 30 天内被下载 7,924 次,日均约 264 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ckeditor/typedoc-plugins 还在维护吗?

最新版本 63.1.3 发布于 2026/11/09(今天);至今共发布 219 个版本,其中过去 12 个月发布了 80 个;首次发布于 2023/01/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。