plugin-tls 0.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/extend/extend.d.ts +222 -0
- package/dist/extend/extend.d.ts.map +1 -0
- package/dist/extend/mixin.d.ts +105 -0
- package/dist/extend/mixin.d.ts.map +1 -0
- package/dist/index.d.ts +14 -4
- package/dist/index.d.ts.map +1 -0
- package/dist/options-manager/ModeOptions.d.ts +88 -0
- package/dist/options-manager/ModeOptions.d.ts.map +1 -0
- package/dist/options-manager/OptionsManager.d.ts +105 -0
- package/dist/options-manager/OptionsManager.d.ts.map +1 -0
- package/dist/options-manager/TierModeOptions.d.ts +69 -0
- package/dist/options-manager/TierModeOptions.d.ts.map +1 -0
- package/dist/options-manager/TierOptions.d.ts +48 -0
- package/dist/options-manager/TierOptions.d.ts.map +1 -0
- package/dist/{defaultOptions.d.ts → options-manager/defaultOptions.d.ts} +2 -1
- package/dist/options-manager/defaultOptions.d.ts.map +1 -0
- package/dist/options-manager/tools.d.ts +35 -0
- package/dist/options-manager/tools.d.ts.map +1 -0
- package/dist/plugin-host/PluginHost.d.ts +184 -0
- package/dist/plugin-host/PluginHost.d.ts.map +1 -0
- package/dist/plugin-host/TierModeOptionsPluginHost.d.ts +102 -0
- package/dist/plugin-host/TierModeOptionsPluginHost.d.ts.map +1 -0
- package/dist/plugin-host/TierOptionsPluginHost.d.ts +83 -0
- package/dist/plugin-host/TierOptionsPluginHost.d.ts.map +1 -0
- package/dist/plugin-manager/PluginManager.d.ts +119 -0
- package/dist/plugin-manager/PluginManager.d.ts.map +1 -0
- package/dist/plugin-manager/PluginManagerWithInit.d.ts +36 -0
- package/dist/plugin-manager/PluginManagerWithInit.d.ts.map +1 -0
- package/dist/plugin-tls.d.ts +1329 -0
- package/dist/plugin-tls.iife.js +1 -0
- package/dist/plugin-tls.mjs +1064 -0
- package/dist/plugin-tls.umd.js +1 -1
- package/dist/properties.d.ts +30 -0
- package/dist/properties.d.ts.map +1 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/doc/{plugin-tls.adddefaultoptions.md → api/plugin-tls.adddefaultoptions.md} +3 -3
- package/doc/{plugin-tls.addinstoptions.md → api/plugin-tls.addinstoptions.md} +2 -2
- package/doc/api/plugin-tls.allfunctionapply.md +26 -0
- package/doc/api/plugin-tls.becomepluginhost.md +15 -0
- package/doc/api/plugin-tls.becomepluginhost_extends.md +38 -0
- package/doc/api/plugin-tls.becomepluginhost_proxy.md +29 -0
- package/doc/api/plugin-tls.becometiermodeoptionshost.md +15 -0
- package/doc/api/plugin-tls.becometieroptionshost.md +15 -0
- package/doc/api/plugin-tls.classextender.md +15 -0
- package/doc/api/plugin-tls.classextenderprivatemember._constructors.md +13 -0
- package/doc/api/plugin-tls.classextenderprivatemember._destroys.md +13 -0
- package/doc/api/plugin-tls.classextenderprivatemember.md +21 -0
- package/doc/api/plugin-tls.classextenderprivatememberwithinit._inits.md +13 -0
- package/doc/api/plugin-tls.classextenderprivatememberwithinit.md +21 -0
- package/doc/api/plugin-tls.classextenderwithinit.md +15 -0
- package/doc/api/plugin-tls.classtype._new_.md +22 -0
- package/doc/api/plugin-tls.classtype.md +20 -0
- package/doc/api/plugin-tls.commonmodename.md +18 -0
- package/doc/api/plugin-tls.createcallerofprivatememberofextend.md +30 -0
- package/doc/api/plugin-tls.createdefinemixin.md +23 -0
- package/doc/api/plugin-tls.createextendtarget.md +30 -0
- package/doc/api/plugin-tls.createextendtargetwithinit.md +30 -0
- package/doc/api/plugin-tls.createmixintarget.md +30 -0
- package/doc/api/plugin-tls.createpluginhost.md +35 -0
- package/doc/api/plugin-tls.createpropertysetter.md +30 -0
- package/doc/api/plugin-tls.createtargetextend.md +30 -0
- package/doc/api/plugin-tls.createtargetextendwithinit.md +30 -0
- package/doc/api/plugin-tls.createtargetmixin.md +30 -0
- package/doc/api/plugin-tls.createtiermodeoptionspluginhost.md +32 -0
- package/doc/api/plugin-tls.createtieroptionspluginhost.md +30 -0
- package/doc/api/plugin-tls.defineextend.md +35 -0
- package/doc/api/plugin-tls.defineextendwithinit.md +35 -0
- package/doc/api/plugin-tls.definemixin.md +31 -0
- package/doc/api/plugin-tls.extendtarget.md +31 -0
- package/doc/api/plugin-tls.extendtargetwithinit.md +31 -0
- package/doc/api/plugin-tls.formatuseparameters.md +13 -0
- package/doc/api/plugin-tls.formatusepluginparameters.md +15 -0
- package/doc/api/plugin-tls.getnormalizepluginoptions.md +15 -0
- package/doc/api/plugin-tls.getpluginoptions.md +15 -0
- package/doc/api/plugin-tls.getpropertyvalue.md +26 -0
- package/doc/api/plugin-tls.getpropertyvaluebypath.md +26 -0
- package/doc/api/plugin-tls.gettargetproperties.md +26 -0
- package/doc/{plugin-tls.hostinst.md → api/plugin-tls.hostinst.md} +2 -2
- package/doc/{plugin-tls.idefaultoptionshost.defaultoptions.md → api/plugin-tls.idefaultoptionshost.defaultoptions.md} +1 -1
- package/doc/{plugin-tls.idefaultoptionshost.md → api/plugin-tls.idefaultoptionshost.md} +1 -1
- package/doc/{plugin-tls.iidefaultoptionshostconstructor.md → api/plugin-tls.iidefaultoptionshostconstructor.md} +1 -1
- package/doc/{plugin-tls.iplugin.created.md → api/plugin-tls.iplugin.created.md} +4 -4
- package/doc/api/plugin-tls.iplugin.destroyed.md +25 -0
- package/doc/{plugin-tls.iplugin.md → api/plugin-tls.iplugin.md} +4 -3
- package/doc/{plugin-tls.iplugin.used.md → api/plugin-tls.iplugin.used.md} +4 -4
- package/doc/{plugin-tls.ipluginhost.md → api/plugin-tls.ipluginhost.md} +2 -2
- package/doc/{plugin-tls.ipluginhost.use.md → api/plugin-tls.ipluginhost.use.md} +6 -6
- package/doc/{plugin-tls.ipluginhostconstructor.md → api/plugin-tls.ipluginhostconstructor.md} +2 -2
- package/doc/{plugin-tls.ipluginhostconstructor.use.md → api/plugin-tls.ipluginhostconstructor.use.md} +6 -6
- package/doc/api/plugin-tls.ipluginwithinit.inited.md +25 -0
- package/doc/api/plugin-tls.ipluginwithinit.md +21 -0
- package/doc/api/plugin-tls.itiermodeoptionshost.md +21 -0
- package/doc/api/plugin-tls.itiermodeoptionshost.mode.md +11 -0
- package/doc/api/plugin-tls.itiermodeoptionshost.modeoptions.md +11 -0
- package/doc/api/plugin-tls.itiermodeoptionshostconstructor.md +13 -0
- package/doc/api/plugin-tls.itiermodeoptionspluginhost.md +15 -0
- package/doc/api/plugin-tls.itiermodeoptionspluginhostconstructor.md +15 -0
- package/doc/api/plugin-tls.itieroptionshost.defaultoptions.md +11 -0
- package/doc/api/plugin-tls.itieroptionshost.md +20 -0
- package/doc/api/plugin-tls.itieroptionshostconstructor.md +13 -0
- package/doc/api/plugin-tls.itieroptionspluginhost.md +15 -0
- package/doc/api/plugin-tls.itieroptionspluginhostconstructor.md +15 -0
- package/doc/api/plugin-tls.md +121 -0
- package/doc/api/plugin-tls.mergeproperties.md +25 -0
- package/doc/api/plugin-tls.mixin_4.md +33 -0
- package/doc/api/plugin-tls.mixintarget.md +31 -0
- package/doc/api/plugin-tls.modeoptions._constructor_.md +20 -0
- package/doc/api/plugin-tls.modeoptions._constructor__1.md +21 -0
- package/doc/api/plugin-tls.modeoptions._mode.md +11 -0
- package/doc/api/plugin-tls.modeoptions._modenames.md +11 -0
- package/doc/api/plugin-tls.modeoptions._plainfulloption.md +11 -0
- package/doc/api/plugin-tls.modeoptions.getfullmodeoption.md +29 -0
- package/doc/api/plugin-tls.modeoptions.getmodenames.md +18 -0
- package/doc/api/plugin-tls.modeoptions.getmodeoption.md +29 -0
- package/doc/api/plugin-tls.modeoptions.hasmode.md +25 -0
- package/doc/api/plugin-tls.modeoptions.md +57 -0
- package/doc/api/plugin-tls.modeoptions.mode.md +15 -0
- package/doc/api/plugin-tls.modeoptions.modenames.md +13 -0
- package/doc/api/plugin-tls.modeoptions.modes.md +13 -0
- package/doc/api/plugin-tls.modeoptions.option.md +13 -0
- package/doc/api/plugin-tls.modeoptions.optionmanager.md +13 -0
- package/doc/api/plugin-tls.modeoptions.plainfulloption.md +11 -0
- package/doc/api/plugin-tls.modeoptions.setmodeoption.md +27 -0
- package/doc/api/plugin-tls.modeoptions.updatefulloption.md +17 -0
- package/doc/api/plugin-tls.normalizepluginoptions.md +18 -0
- package/doc/api/plugin-tls.parsepropertypath.md +25 -0
- package/doc/{plugin-tls.plugincreatedreturntype.md → api/plugin-tls.plugincreatedreturntype.md} +3 -3
- package/doc/{plugin-tls.pluginhost._pluginmanager.md → api/plugin-tls.pluginhost._pluginmanager.md} +2 -2
- package/doc/api/plugin-tls.pluginhost.destroy.md +18 -0
- package/doc/api/plugin-tls.pluginhost.md +38 -0
- package/doc/{plugin-tls.pluginhost.pluginmanager.md → api/plugin-tls.pluginhost.pluginmanager.md} +2 -2
- package/doc/{plugin-tls.pluginhost.use.md → api/plugin-tls.pluginhost.use.md} +5 -5
- package/doc/api/plugin-tls.pluginmanager._constructor_.md +20 -0
- package/doc/{plugin-tls.pluginmanager.created.md → api/plugin-tls.pluginmanager.created.md} +4 -4
- package/doc/api/plugin-tls.pluginmanager.destroyed.md +28 -0
- package/doc/{plugin-tls.pluginmanager.host.md → api/plugin-tls.pluginmanager.host.md} +2 -2
- package/doc/api/plugin-tls.pluginmanager.instuse.md +30 -0
- package/doc/{plugin-tls.pluginmanager.md → api/plugin-tls.pluginmanager.md} +12 -5
- package/doc/{plugin-tls.pluginmanager.pluginoptsmap.md → api/plugin-tls.pluginmanager.pluginoptsmap.md} +2 -2
- package/doc/{plugin-tls.pluginmanager.plugins.md → api/plugin-tls.pluginmanager.plugins.md} +2 -2
- package/doc/{plugin-tls.pluginmanager.use.md → api/plugin-tls.pluginmanager.use.md} +6 -6
- package/doc/api/plugin-tls.pluginmanagerwithinit.inited.md +28 -0
- package/doc/api/plugin-tls.pluginmanagerwithinit.md +25 -0
- package/doc/{plugin-tls.pluginusereturntype.md → api/plugin-tls.pluginusereturntype.md} +3 -3
- package/doc/api/plugin-tls.privatememberofextend._constructor.md +32 -0
- package/doc/api/plugin-tls.privatememberofextend._destroy.md +25 -0
- package/doc/api/plugin-tls.privatememberofextend.md +21 -0
- package/doc/api/plugin-tls.privatememberofextendwithinit._init.md +28 -0
- package/doc/api/plugin-tls.privatememberofextendwithinit.md +21 -0
- package/doc/api/plugin-tls.replaceconstructorparameters.md +13 -0
- package/doc/api/plugin-tls.replaceconstructorreturn.md +13 -0
- package/doc/api/plugin-tls.setpropertyvalue.md +27 -0
- package/doc/api/plugin-tls.setpropertyvaluebypath.md +27 -0
- package/doc/api/plugin-tls.targetextend.md +31 -0
- package/doc/api/plugin-tls.targetextendwithinit.md +31 -0
- package/doc/api/plugin-tls.targetmixin.md +31 -0
- package/doc/api/plugin-tls.tiermodeoptions._constructor_.md +20 -0
- package/doc/api/plugin-tls.tiermodeoptions._constructor__1.md +22 -0
- package/doc/api/plugin-tls.tiermodeoptions._extends.md +11 -0
- package/doc/api/plugin-tls.tiermodeoptions.extends.md +15 -0
- package/doc/api/plugin-tls.tiermodeoptions.getfullmodeoption.md +29 -0
- package/doc/api/plugin-tls.tiermodeoptions.getmember.md +25 -0
- package/doc/api/plugin-tls.tiermodeoptions.getmodenames.md +18 -0
- package/doc/api/plugin-tls.tiermodeoptions.getmodeoptionmanager.md +25 -0
- package/doc/api/plugin-tls.tiermodeoptions.getvalue.md +25 -0
- package/doc/api/plugin-tls.tiermodeoptions.hasmodeontier.md +25 -0
- package/doc/api/plugin-tls.tiermodeoptions.md +45 -0
- package/doc/api/plugin-tls.tiermodeoptions.optionmanager.md +13 -0
- package/doc/api/plugin-tls.tiermodeoptionsdecorator.md +30 -0
- package/doc/api/plugin-tls.tiermodeoptionspluginhost._constructor_.md +20 -0
- package/doc/api/plugin-tls.tiermodeoptionspluginhost._modeoptions.md +11 -0
- package/doc/api/plugin-tls.tiermodeoptionspluginhost.md +37 -0
- package/doc/api/plugin-tls.tiermodeoptionspluginhost.mode.md +13 -0
- package/doc/api/plugin-tls.tiermodeoptionspluginhost.modeoptions.md +13 -0
- package/doc/api/plugin-tls.tiermodeoptionspluginhost.options.md +11 -0
- package/doc/api/plugin-tls.tieroptions._constructor_.md +21 -0
- package/doc/api/plugin-tls.tieroptions._extends.md +11 -0
- package/doc/api/plugin-tls.tieroptions._plainfulloption.md +11 -0
- package/doc/api/plugin-tls.tieroptions.extends.md +15 -0
- package/doc/api/plugin-tls.tieroptions.getmember.md +25 -0
- package/doc/api/plugin-tls.tieroptions.getvalue.md +25 -0
- package/doc/api/plugin-tls.tieroptions.md +37 -0
- package/doc/api/plugin-tls.tieroptions.option.md +13 -0
- package/doc/api/plugin-tls.tieroptions.plainfulloption.md +18 -0
- package/doc/api/plugin-tls.tieroptions.updatefulloption.md +17 -0
- package/doc/api/plugin-tls.tieroptionsdecorator.md +30 -0
- package/doc/api/plugin-tls.tieroptionspluginhost._constructor_.md +20 -0
- package/doc/api/plugin-tls.tieroptionspluginhost._defaultoptions.md +11 -0
- package/doc/api/plugin-tls.tieroptionspluginhost.defaultoptions.md +13 -0
- package/doc/api/plugin-tls.tieroptionspluginhost.md +35 -0
- package/package.json +23 -15
- package/dist/OptionsPluginHost.d.ts +0 -49
- package/dist/PluginHost.d.ts +0 -96
- package/dist/PluginManager.d.ts +0 -76
- package/dist/plugin-tls.es.js +0 -170
- package/doc/plugin-tls.createoptionspluginhost.md +0 -29
- package/doc/plugin-tls.createpluginhost.md +0 -30
- package/doc/plugin-tls.ioptionspluginhost.defaultoptions.md +0 -11
- package/doc/plugin-tls.ioptionspluginhost.md +0 -21
- package/doc/plugin-tls.ioptionspluginhostconstructor.md +0 -15
- package/doc/plugin-tls.md +0 -53
- package/doc/plugin-tls.optionspluginhost._defaultoptions.md +0 -11
- package/doc/plugin-tls.optionspluginhost.defaultoptions.md +0 -13
- package/doc/plugin-tls.optionspluginhost.md +0 -21
- package/doc/plugin-tls.pluginhost._constructor_.md +0 -13
- package/doc/plugin-tls.pluginhost.md +0 -25
- package/doc/plugin-tls.pluginmanager.instuse.md +0 -30
- package/doc/plugin-tls.pluginoptions.md +0 -11
- /package/doc/{index.md → api/index.md} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [getModeNames](./plugin-tls.modeoptions.getmodenames.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.getModeNames() method
|
|
6
|
+
|
|
7
|
+
获取所有的模式名字
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getModeNames(): Mode[];
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
Mode\[\]
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [getModeOption](./plugin-tls.modeoptions.getmodeoption.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.getModeOption() method
|
|
6
|
+
|
|
7
|
+
返回已合并继承选项的选项
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getModeOption(mode: Mode): Option | null;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| mode | Mode | |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
Option \| null
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Remarks
|
|
27
|
+
|
|
28
|
+
与继承选项只是浅合并
|
|
29
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [hasMode](./plugin-tls.modeoptions.hasmode.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.hasMode() method
|
|
6
|
+
|
|
7
|
+
判断是否有某个模式
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
hasMode(mode: string | number): boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| mode | string \| number | |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
boolean
|
|
24
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions class
|
|
6
|
+
|
|
7
|
+
模式选项
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class ModeOptions<Mode extends string | number = string, Option extends {} = any> extends OptionsManager<Option>
|
|
13
|
+
```
|
|
14
|
+
**Extends:** OptionsManager<Option>
|
|
15
|
+
|
|
16
|
+
## Remarks
|
|
17
|
+
|
|
18
|
+
针对选项提供了模式和继承的功能;
|
|
19
|
+
|
|
20
|
+
适用以下场景: 你设计了一个支持许多选项的工具,不同场景下需要配置不同的选项值,比如有如下几个场景: - 性能模式:所有的配置项以性能为目标进行配置,关闭那些效果类的选项; - 特效模式:以高质量的渲染效果为目标进行配置,会开启所有的效果选项; - 平衡模式:兼顾性能和效果,取个折中;
|
|
21
|
+
|
|
22
|
+
并且这些模式也会一些共同的选项;
|
|
23
|
+
|
|
24
|
+
使用该类,你可以: - 设置一个基本模式:该模式提供的所有模式都会有的共用选项 - 设置 性能模式、特效模式、平衡模式 继承 基本模式;
|
|
25
|
+
|
|
26
|
+
## Constructors
|
|
27
|
+
|
|
28
|
+
| Constructor | Modifiers | Description |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| [(constructor)(mode)](./plugin-tls.modeoptions._constructor_.md) | | Constructs a new instance of the <code>ModeOptions</code> class |
|
|
31
|
+
| [(constructor)(mode, options)](./plugin-tls.modeoptions._constructor__1.md) | | Constructs a new instance of the <code>ModeOptions</code> class |
|
|
32
|
+
|
|
33
|
+
## Properties
|
|
34
|
+
|
|
35
|
+
| Property | Modifiers | Type | Description |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| [\_mode?](./plugin-tls.modeoptions._mode.md) | <code>protected</code> | Mode | _(Optional)_ |
|
|
38
|
+
| [\_modeNames](./plugin-tls.modeoptions._modenames.md) | <code>protected</code> | Mode\[\] \| null | |
|
|
39
|
+
| [\_plainFullOption](./plugin-tls.modeoptions._plainfulloption.md) | <code>protected</code> | Option \| null | |
|
|
40
|
+
| [mode](./plugin-tls.modeoptions.mode.md) | | Mode | 当前模式 |
|
|
41
|
+
| [modeNames](./plugin-tls.modeoptions.modenames.md) | <code>readonly</code> | Mode\[\] | 所有的模式名字 |
|
|
42
|
+
| [modes](./plugin-tls.modeoptions.modes.md) | | Record<Mode, [TierOptions](./plugin-tls.tieroptions.md)<!-- --><Option>> | 模式的配置 |
|
|
43
|
+
| [option](./plugin-tls.modeoptions.option.md) | <code>readonly</code> | Option | 当前模式对应的选项 |
|
|
44
|
+
| [optionManager](./plugin-tls.modeoptions.optionmanager.md) | <code>readonly</code> | [TierOptions](./plugin-tls.tieroptions.md)<!-- --><Option> | 当前模式的选项 |
|
|
45
|
+
| [plainFullOption](./plugin-tls.modeoptions.plainfulloption.md) | <code>readonly</code> | Option | |
|
|
46
|
+
|
|
47
|
+
## Methods
|
|
48
|
+
|
|
49
|
+
| Method | Modifiers | Description |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| [getFullModeOption(mode)](./plugin-tls.modeoptions.getfullmodeoption.md) | | 返回已合并继承选项的完整选项 |
|
|
52
|
+
| [getModeNames()](./plugin-tls.modeoptions.getmodenames.md) | | 获取所有的模式名字 |
|
|
53
|
+
| [getModeOption(mode)](./plugin-tls.modeoptions.getmodeoption.md) | | 返回已合并继承选项的选项 |
|
|
54
|
+
| [hasMode(mode)](./plugin-tls.modeoptions.hasmode.md) | | 判断是否有某个模式 |
|
|
55
|
+
| [setModeOption(mode, option, deep, extend)](./plugin-tls.modeoptions.setmodeoption.md) | | 给模式设置选项 |
|
|
56
|
+
| [updateFullOption()](./plugin-tls.modeoptions.updatefulloption.md) | | 更新 |
|
|
57
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [mode](./plugin-tls.modeoptions.mode.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.mode property
|
|
6
|
+
|
|
7
|
+
当前模式
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
get mode(): Mode;
|
|
13
|
+
|
|
14
|
+
set mode(value: Mode);
|
|
15
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [modeNames](./plugin-tls.modeoptions.modenames.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.modeNames property
|
|
6
|
+
|
|
7
|
+
所有的模式名字
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
get modeNames(): Mode[];
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [modes](./plugin-tls.modeoptions.modes.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.modes property
|
|
6
|
+
|
|
7
|
+
模式的配置
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
modes: Record<Mode, TierOptions<Option>>;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [option](./plugin-tls.modeoptions.option.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.option property
|
|
6
|
+
|
|
7
|
+
当前模式对应的选项
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
get option(): Option;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [optionManager](./plugin-tls.modeoptions.optionmanager.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.optionManager property
|
|
6
|
+
|
|
7
|
+
当前模式的选项
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
get optionManager(): TierOptions<Option>;
|
|
13
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [plainFullOption](./plugin-tls.modeoptions.plainfulloption.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.plainFullOption property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
get plainFullOption(): Option;
|
|
11
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [setModeOption](./plugin-tls.modeoptions.setmodeoption.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.setModeOption() method
|
|
6
|
+
|
|
7
|
+
给模式设置选项
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setModeOption(mode: Mode, option: Option, deep?: boolean, extend?: Mode): Record<Mode, TierOptions<Option>>[Mode];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| mode | Mode | |
|
|
20
|
+
| option | Option | |
|
|
21
|
+
| deep | boolean | _(Optional)_ 是否要进行深度合并 |
|
|
22
|
+
| extend | Mode | _(Optional)_ 继承哪个模式 |
|
|
23
|
+
|
|
24
|
+
**Returns:**
|
|
25
|
+
|
|
26
|
+
Record<Mode, [TierOptions](./plugin-tls.tieroptions.md)<!-- --><Option>>\[Mode\]
|
|
27
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [ModeOptions](./plugin-tls.modeoptions.md) > [updateFullOption](./plugin-tls.modeoptions.updatefulloption.md)
|
|
4
|
+
|
|
5
|
+
## ModeOptions.updateFullOption() method
|
|
6
|
+
|
|
7
|
+
更新
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
updateFullOption(): void;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
void
|
|
17
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [NormalizePluginOptions](./plugin-tls.normalizepluginoptions.md)
|
|
4
|
+
|
|
5
|
+
## NormalizePluginOptions type
|
|
6
|
+
|
|
7
|
+
将选项格式成方法的参数类型
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type NormalizePluginOptions<Options> = Options extends never | void | undefined ? void : Options;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
如果是 never\|void\|undefined 类型,则会被转为 void
|
|
18
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [parsePropertyPath](./plugin-tls.parsepropertypath.md)
|
|
4
|
+
|
|
5
|
+
## parsePropertyPath() function
|
|
6
|
+
|
|
7
|
+
解析属性路径为属性列表
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function parsePropertyPath(propPath: string): string[];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| propPath | string | |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
string\[\]
|
|
24
|
+
|
|
25
|
+
|
package/doc/{plugin-tls.plugincreatedreturntype.md → api/plugin-tls.plugincreatedreturntype.md}
RENAMED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
插件的 created 方法的返回值类型
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export
|
|
12
|
+
export type PluginCreatedReturnType<P extends IPlugin<any, any>> = P["created"] extends AnyFunction ? ReturnType<P["created"]> : void;
|
|
13
13
|
```
|
|
14
|
-
|
|
14
|
+
**References:** [IPlugin](./plugin-tls.iplugin.md)
|
|
15
15
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginHost](./plugin-tls.pluginhost.md) > [destroy](./plugin-tls.pluginhost.destroy.md)
|
|
4
|
+
|
|
5
|
+
## PluginHost.destroy() method
|
|
6
|
+
|
|
7
|
+
销毁实例
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
destroy(): void;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
void
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginHost](./plugin-tls.pluginhost.md)
|
|
4
|
+
|
|
5
|
+
## PluginHost class
|
|
6
|
+
|
|
7
|
+
插件的宿主
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class PluginHost<Plugin extends IPlugin<typeof PluginHost, any> = IPlugin<typeof PluginHost, any>>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
插件宿主 就是 拥有插件机制的宿主
|
|
18
|
+
|
|
19
|
+
子类需要在构建函数中调用 `this.pluginManager.created(this);`
|
|
20
|
+
|
|
21
|
+
之所以没写在该类中的函数中,是因为 `this.pluginManager.created(this)` 通常会在构建函数执行的最后时才调用; 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
|
|
22
|
+
|
|
23
|
+
## Properties
|
|
24
|
+
|
|
25
|
+
| Property | Modifiers | Type | Description |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| [\_pluginManager](./plugin-tls.pluginhost._pluginmanager.md) | <p><code>protected</code></p><p><code>static</code></p> | [PluginManager](./plugin-tls.pluginmanager.md)<!-- --><any> | |
|
|
28
|
+
| [pluginManager](./plugin-tls.pluginhost.pluginmanager.md) | <code>readonly</code> | [PluginManager](./plugin-tls.pluginmanager.md)<!-- --><any, [IPlugin](./plugin-tls.iplugin.md)<!-- --><any, any>> | 插件管理器 |
|
|
29
|
+
| [pluginManager](./plugin-tls.pluginhost.pluginmanager.md) | <p><code>static</code></p><p><code>readonly</code></p> | [PluginManager](./plugin-tls.pluginmanager.md)<!-- --><any, [IPlugin](./plugin-tls.iplugin.md)<!-- --><any, any>> | 插件管理器 |
|
|
30
|
+
|
|
31
|
+
## Methods
|
|
32
|
+
|
|
33
|
+
| Method | Modifiers | Description |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| [destroy()](./plugin-tls.pluginhost.destroy.md) | | 销毁实例 |
|
|
36
|
+
| [use(plugin, options)](./plugin-tls.pluginhost.use.md) | | 实例的注册插件的方法 |
|
|
37
|
+
| [use(plugin, options)](./plugin-tls.pluginhost.use.md) | <code>static</code> | 使用插件、注册插件 |
|
|
38
|
+
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
使用插件、注册插件
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
static use<Plugin extends IPlugin<
|
|
12
|
+
static use<Plugin extends IPlugin<typeof PluginHost, any>>(plugin: Plugin, ...options: FormatUsePluginParameters<Plugin>): void | ReturnType<Plugin["used"]>;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -17,9 +17,9 @@ static use<Plugin extends IPlugin<HOST, Options>, Options extends PluginOptions,
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
19
|
| plugin | Plugin | 插件 |
|
|
20
|
-
| options |
|
|
20
|
+
| options | [FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><Plugin> | 传递给插件的选项 |
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
**Returns:**
|
|
23
23
|
|
|
24
|
-
ReturnType<Plugin\["used"\]>
|
|
24
|
+
void \| ReturnType<Plugin\["used"\]>
|
|
25
25
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginManager](./plugin-tls.pluginmanager.md) > [(constructor)](./plugin-tls.pluginmanager._constructor_.md)
|
|
4
|
+
|
|
5
|
+
## PluginManager.(constructor)
|
|
6
|
+
|
|
7
|
+
Constructs a new instance of the `PluginManager` class
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
constructor(host?: HostClassType);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| host | HostClassType | _(Optional)_ 插件的宿主 |
|
|
20
|
+
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
插件宿主创建实例时调用
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
created(hostInst: HostInst<
|
|
12
|
+
created(hostInst: HostInst<HostClassType>): void;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| hostInst | [HostInst](./plugin-tls.hostinst.md)<!-- --><
|
|
19
|
+
| hostInst | [HostInst](./plugin-tls.hostinst.md)<!-- --><HostClassType> | 插件宿主的新实例 |
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
**Returns:**
|
|
22
22
|
|
|
23
23
|
void
|
|
24
24
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginManager](./plugin-tls.pluginmanager.md) > [destroyed](./plugin-tls.pluginmanager.destroyed.md)
|
|
4
|
+
|
|
5
|
+
## PluginManager.destroyed() method
|
|
6
|
+
|
|
7
|
+
插件宿主被销毁时调用
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
destroyed(hostInst: HostInst<HostClassType>): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| hostInst | [HostInst](./plugin-tls.hostinst.md)<!-- --><HostClassType> | 被销毁的插件实例 |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
25
|
+
## Remarks
|
|
26
|
+
|
|
27
|
+
会调用每个插件的 [IPlugin.destroyed()](./plugin-tls.iplugin.destroyed.md) 方法
|
|
28
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginManager](./plugin-tls.pluginmanager.md) > [instUse](./plugin-tls.pluginmanager.instuse.md)
|
|
4
|
+
|
|
5
|
+
## PluginManager.instUse() method
|
|
6
|
+
|
|
7
|
+
插件宿主实例的注册插件的方法
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
instUse<P extends Plugin>(hostInst: HostInst<HostClassType>, plugin: P, ...options: FormatUsePluginParameters<P>): PluginCreatedReturnType<P> | void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| hostInst | [HostInst](./plugin-tls.hostinst.md)<!-- --><HostClassType> | 插件宿主的新实例 |
|
|
20
|
+
| plugin | P | |
|
|
21
|
+
| options | [FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><P> | |
|
|
22
|
+
|
|
23
|
+
**Returns:**
|
|
24
|
+
|
|
25
|
+
[PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md)<!-- --><P> \| void
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
会调用每个插件的 方法
|
|
30
|
+
|
|
@@ -6,29 +6,36 @@
|
|
|
6
6
|
|
|
7
7
|
插件管理者
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export declare class PluginManager<
|
|
12
|
+
export declare class PluginManager<HostClassType, Plugin extends IPlugin<HostClassType, any> = IPlugin<HostClassType, any>>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Remarks
|
|
16
16
|
|
|
17
17
|
负责管理插件的注册、应用 等
|
|
18
18
|
|
|
19
|
+
## Constructors
|
|
20
|
+
|
|
21
|
+
| Constructor | Modifiers | Description |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| [(constructor)(host)](./plugin-tls.pluginmanager._constructor_.md) | | Constructs a new instance of the <code>PluginManager</code> class |
|
|
24
|
+
|
|
19
25
|
## Properties
|
|
20
26
|
|
|
21
27
|
| Property | Modifiers | Type | Description |
|
|
22
28
|
| --- | --- | --- | --- |
|
|
23
|
-
| [host](./plugin-tls.pluginmanager.host.md) | |
|
|
24
|
-
| [pluginOptsMap](./plugin-tls.pluginmanager.pluginoptsmap.md) |
|
|
25
|
-
| [plugins](./plugin-tls.pluginmanager.plugins.md) |
|
|
29
|
+
| [host](./plugin-tls.pluginmanager.host.md) | | HostClassType | 插件的宿主 |
|
|
30
|
+
| [pluginOptsMap](./plugin-tls.pluginmanager.pluginoptsmap.md) | <code>readonly</code> | Map<Plugin, any> | 插件与插件选项的映射 |
|
|
31
|
+
| [plugins](./plugin-tls.pluginmanager.plugins.md) | <code>readonly</code> | Plugin\[\] | 注册的插件 |
|
|
26
32
|
|
|
27
33
|
## Methods
|
|
28
34
|
|
|
29
35
|
| Method | Modifiers | Description |
|
|
30
36
|
| --- | --- | --- |
|
|
31
37
|
| [created(hostInst)](./plugin-tls.pluginmanager.created.md) | | 插件宿主创建实例时调用 |
|
|
38
|
+
| [destroyed(hostInst)](./plugin-tls.pluginmanager.destroyed.md) | | 插件宿主被销毁时调用 |
|
|
32
39
|
| [instUse(hostInst, plugin, options)](./plugin-tls.pluginmanager.instuse.md) | | 插件宿主实例的注册插件的方法 |
|
|
33
40
|
| [use(plugin, options)](./plugin-tls.pluginmanager.use.md) | | 使用插件、注册插件 |
|
|
34
41
|
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
|
|
7
7
|
使用插件、注册插件
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
use<
|
|
12
|
+
use<P extends Plugin>(plugin: P, ...options: FormatUsePluginParameters<P>): PluginUseReturnType<P> | void;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| plugin |
|
|
20
|
-
| options |
|
|
19
|
+
| plugin | P | 插件 |
|
|
20
|
+
| options | [FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><P> | 传递给插件的选项 |
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
**Returns:**
|
|
23
23
|
|
|
24
|
-
[PluginUseReturnType](./plugin-tls.pluginusereturntype.md)<!-- --><
|
|
24
|
+
[PluginUseReturnType](./plugin-tls.pluginusereturntype.md)<!-- --><P> \| void
|
|
25
25
|
|