forked from microsoft/rushstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPluginFeature.ts
More file actions
59 lines (53 loc) · 1.49 KB
/
PluginFeature.ts
File metadata and controls
59 lines (53 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
/**
* This is an internal part of the plugin infrastructure.
*
* @remarks
* This object is the constructor parameter for API Documenter plugin features.
*
* @public
*/
export class PluginFeatureInitialization {
/** @internal */
public constructor() {
// reserved for future use
}
/** @internal */
public _context: PluginFeatureContext;
}
/**
* Context object for {@link PluginFeature}.
* Exposes various services that can be used by a plugin.
*
* @public
*/
export class PluginFeatureContext {
}
/**
* The abstract base class for all API Documenter plugin features.
* @public
*/
export abstract class PluginFeature {
/**
* Exposes various services that can be used by a plugin.
*/
public context: PluginFeatureContext;
/**
* The subclass should pass the `initialization` through to the base class.
* Do not put custom initialization code in the constructor. Instead perform your initialization in the
* `onInitialized()` event function.
* @internal
*/
public constructor(initialization: PluginFeatureInitialization) {
// reserved for future expansion
this.context = initialization._context;
}
/**
* This event function is called after the feature is initialized, but before any processing occurs.
* @virtual
*/
public onInitialized(): void {
// (implemented by child class)
}
}