JSPM

  • Created
  • Published
  • Downloads 2803
  • Score
    100M100P100Q117875F
  • License MIT

Various TypeDoc plugins developed by the CKEditor 5 team.

Package Exports

  • @ckeditor/typedoc-plugins
  • @ckeditor/typedoc-plugins/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ckeditor/typedoc-plugins) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 typedoc@0.28.

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 fixertypeDocModuleFixer()

    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 fixertypeDocSymbolFixer()

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

    • Typedoc: [iterator]() → Iterator
    • JSDoc: Symbol.iterator() → Iterator
  • Interface augmentation fixertypeDocInterfaceAugmentationFixer()

    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 fixertypeDocEventParamFixer()

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

  • Events inheritance fixertypeDocEventInheritanceFixer()

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

  • Purge private APItypeDocPurgePrivateApiDocs()

    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 @errortypeDocTagError()

    The plugin collects error definitions from the @error annotation.

  • Tag @eventNametypeDocTagEvent()

    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 @observabletypeDocTagObservable()

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


Changelog

See the CHANGELOG.md file.