1 | import type { MarkdownDocumenterFeature } from './MarkdownDocumenterFeature';
|
2 | import type { PluginFeatureInitialization } from './PluginFeature';
|
3 | /**
|
4 | * Defines a "feature" that is provided by an API Documenter plugin. A feature is a user-defined module
|
5 | * that customizes the behavior of API Documenter.
|
6 | *
|
7 | * @public
|
8 | */
|
9 | export interface IFeatureDefinition {
|
10 | /**
|
11 | * The name of this feature, as it will appear in the config file.
|
12 | *
|
13 | * The name should consist of one or more words separated by hyphens. Each word should consist of lower case
|
14 | * letters and numbers. Example: `my-feature`
|
15 | */
|
16 | featureName: string;
|
17 | /**
|
18 | * Determines the kind of feature. The specified value is the name of the base class that `subclass` inherits from.
|
19 | *
|
20 | * @remarks
|
21 | * For now, `MarkdownDocumenterFeature` is the only supported value.
|
22 | */
|
23 | kind: 'MarkdownDocumenterFeature';
|
24 | /**
|
25 | * Your subclass that extends from the base class.
|
26 | */
|
27 | subclass: {
|
28 | new (initialization: PluginFeatureInitialization): MarkdownDocumenterFeature;
|
29 | };
|
30 | }
|
31 | /**
|
32 | * The manifest for an API Documenter plugin.
|
33 | *
|
34 | * @remarks
|
35 | * An API documenter plugin is an NPM package. By convention, the NPM package name should have the prefix
|
36 | * `doc-plugin-`. Its main entry point should export an object named `apiDocumenterPluginManifest` which implements
|
37 | * the `IApiDocumenterPluginManifest` interface.
|
38 | *
|
39 | * For example:
|
40 | * ```ts
|
41 | * class MyMarkdownDocumenter extends MarkdownDocumenterFeature {
|
42 | * public onInitialized(): void {
|
43 | * console.log('MyMarkdownDocumenter: onInitialized()');
|
44 | * }
|
45 | * }
|
46 | *
|
47 | * export const apiDocumenterPluginManifest: IApiDocumenterPluginManifest = {
|
48 | * manifestVersion: 1000,
|
49 | * features: [
|
50 | * {
|
51 | * featureName: 'my-markdown-documenter',
|
52 | * kind: 'MarkdownDocumenterFeature',
|
53 | * subclass: MyMarkdownDocumenter
|
54 | * }
|
55 | * ]
|
56 | * };
|
57 | * ```
|
58 | * @public
|
59 | */
|
60 | export interface IApiDocumenterPluginManifest {
|
61 | /**
|
62 | * The manifest version number. For now, this must always be `1000`.
|
63 | */
|
64 | manifestVersion: 1000;
|
65 | /**
|
66 | * The list of features provided by this plugin.
|
67 | */
|
68 | features: IFeatureDefinition[];
|
69 | }
|
70 | //# sourceMappingURL=IApiDocumenterPluginManifest.d.ts.map |
\ | No newline at end of file |