UNPKG

typedoc-plugin-merge-modules

Version:
61 lines (60 loc) 2.29 kB
import { Application, type Context, type DeclarationReflection, type ProjectReflection } from "typedoc"; /** * The "Merge Modules" plugin. * * # What does it do? * * This plugin merges the content of modules. */ export declare class Plugin { /** The options of the plugin. */ private readonly _options; /** * This is set to "true" if the merging logic of the plugin is executed after TypeDoc * has already categorized the DeclarationReflections. */ private _runsAfterCategorization; /** * Returns if the plugin is enabled. * @returns True if the plugin is enabled, otherwise false. */ get isEnabled(): boolean; /** * Returns if the merging logic of the plugin is executed after TypeDoc has categorized the DeclarationReflections. * @returns True if the plugin is executed after categorization, otherwise false. */ get runsAfterCategorization(): boolean; /** * Initializes the plugin. * @param typedoc The TypeDoc application. */ initialize(typedoc: Readonly<Application>): void; /** * Subscribes to events of the application so that the plugin can do its work * in the particular doc generation phases. * @param typedoc The TypeDoc application. */ private subscribeToApplicationEvents; /** * Triggered after plugins have been loaded and options have been read. * @param typedoc The TypeDoc application. */ onApplicationBootstrapEnd(typedoc: Readonly<Application>): void; /** * Triggered when the converter has created a declaration reflection. * @param context Describes the current state the converter is in. * @param reflection The reflection that has been created. */ onConverterCreateDeclaration(context: Readonly<Context>, reflection: DeclarationReflection): void; /** * Triggered after all converters are done. * @param project The project on which the event is triggered. */ onConvertersDone(project: ProjectReflection): void; /** * Creates a merger object for the given project. * @param project The project on which the merger should operate. * @returns The merger object, or undefined if the plugin is turned off. */ private createMerger; }