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,30 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [createPropertySetter](./plugin-tls.createpropertysetter.md)
|
|
4
|
+
|
|
5
|
+
## createPropertySetter() function
|
|
6
|
+
|
|
7
|
+
创建属性设置器
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function createPropertySetter(target: any, props: any): {
|
|
13
|
+
set: () => void;
|
|
14
|
+
unset: () => void;
|
|
15
|
+
};
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type | Description |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| target | any | |
|
|
23
|
+
| props | any | |
|
|
24
|
+
|
|
25
|
+
**Returns:**
|
|
26
|
+
|
|
27
|
+
{ set: () => void; unset: () => void; }
|
|
28
|
+
|
|
29
|
+
会返回一个 set 和 unset 方法,set 方法用户将 props 中描述的属性值设置到 target 中, unset 方法用于恢复成原来的值
|
|
30
|
+
|
|
@@ -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) > [createTargetExtend](./plugin-tls.createtargetextend.md)
|
|
4
|
+
|
|
5
|
+
## createTargetExtend() function
|
|
6
|
+
|
|
7
|
+
创建用于扩展目标的便捷函数
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function createTargetExtend<C extends ClassType>(cla: C): <E>(ext: E & ThisType<InstanceType<C> & E> & PrivateMemberOfExtend<C>) => E & ThisType<C & E>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| cla | C | 扩展的目标,也用作 this 的类型 |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
<E>(ext: E & ThisType<InstanceType<C> & E> & [PrivateMemberOfExtend](./plugin-tls.privatememberofextend.md)<!-- --><C>) => E & ThisType<C & E>
|
|
24
|
+
|
|
25
|
+
可以用于 扩展目标 的便利函数
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
它返回的便利函数的功能与 [targetExtend()](./plugin-tls.targetextend.md) 的功能一样,唯一区别是不再需要接收 cla 参数了
|
|
30
|
+
|
|
@@ -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) > [createTargetExtendWithInit](./plugin-tls.createtargetextendwithinit.md)
|
|
4
|
+
|
|
5
|
+
## createTargetExtendWithInit() function
|
|
6
|
+
|
|
7
|
+
创建用于扩展目标的便捷函数
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function createTargetExtendWithInit<C extends ClassType>(cla: C): <E>(ext: E & ThisType<InstanceType<C> & E> & PrivateMemberOfExtendWithInit<C, any>) => E & ThisType<C & E>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| cla | C | 扩展的目标,也用作 this 的类型 |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
<E>(ext: E & ThisType<InstanceType<C> & E> & [PrivateMemberOfExtendWithInit](./plugin-tls.privatememberofextendwithinit.md)<!-- --><C, any>) => E & ThisType<C & E>
|
|
24
|
+
|
|
25
|
+
可以用于 扩展目标 的便利函数
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
它返回的便利函数的功能与 [targetExtendWithInit()](./plugin-tls.targetextendwithinit.md) 的功能一样,唯一区别是不再需要接收 cla 参数了
|
|
30
|
+
|
|
@@ -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) > [createTargetMixin](./plugin-tls.createtargetmixin.md)
|
|
4
|
+
|
|
5
|
+
## createTargetMixin() function
|
|
6
|
+
|
|
7
|
+
创建用于混合目标的便捷函数
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function createTargetMixin<T>(target: T): <M>(m: M & ThisType<T & M>) => M & ThisType<T & M>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| target | T | 混合的目标,用作 this 的类型 |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
<M>(m: M & ThisType<T & M>) => M & ThisType<T & M>
|
|
24
|
+
|
|
25
|
+
可以用于 混合目标 的便利函数
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
它返回的便利函数的功能与 [targetMixin()](./plugin-tls.targetmixin.md) 的功能一样,唯一区别是不再需要接收 target 参数了
|
|
30
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [createTierModeOptionsPluginHost](./plugin-tls.createtiermodeoptionspluginhost.md)
|
|
4
|
+
|
|
5
|
+
## createTierModeOptionsPluginHost() function
|
|
6
|
+
|
|
7
|
+
创建带有选项机制的插件宿主类 比 直接使用 ModeOptionsPluginHost 提供了完善的类型推导
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function createTierModeOptionsPluginHost<HOST, Options extends {}, Mode extends string | number = string>(): {
|
|
13
|
+
new (options: Options): {
|
|
14
|
+
readonly modeOptions: TierModeOptions<Mode, Options>;
|
|
15
|
+
_modeOptions: TierModeOptions<Mode, Options>;
|
|
16
|
+
mode: Mode;
|
|
17
|
+
readonly options: Options;
|
|
18
|
+
readonly pluginManager: import("..").PluginManager<any, import("..").IPlugin<any, any>>;
|
|
19
|
+
use<P extends import("..").IPlugin<HOST, any>>(plugin: P, ...options: import("..").FormatUsePluginParameters<P>): void | import("..").PluginCreatedReturnType<P>;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
};
|
|
22
|
+
readonly modeOptions: TierModeOptions<string, Options>;
|
|
23
|
+
readonly pluginManager: import("..").PluginManager<typeof import("./PluginHost").PluginHost & HOST, import("..").IPlugin<HOST, any>>;
|
|
24
|
+
_pluginManager: import("..").PluginManager<typeof import("./PluginHost").PluginHost & HOST, import("..").IPlugin<HOST, any>>;
|
|
25
|
+
use<P_1 extends import("..").IPlugin<HOST, any>>(plugin: P_1, ...options: import("..").FormatUsePluginParameters<P_1>): void | ReturnType<P_1["used"]>;
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
**Returns:**
|
|
29
|
+
|
|
30
|
+
{ new (options: Options): { readonly modeOptions: [TierModeOptions](./plugin-tls.tiermodeoptions.md)<!-- --><Mode, Options>; \_modeOptions: [TierModeOptions](./plugin-tls.tiermodeoptions.md)<!-- --><Mode, Options>; mode: Mode; readonly options: Options; readonly pluginManager: import("..").[PluginManager](./plugin-tls.pluginmanager.md)<!-- --><any, import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><any, any>>; use<P extends import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>>(plugin: P, ...options: import("..").[FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><P>): void \| import("..").[PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md)<!-- --><P>; destroy(): void; }; readonly modeOptions: [TierModeOptions](./plugin-tls.tiermodeoptions.md)<!-- --><string, Options>; readonly pluginManager: import("..").[PluginManager](./plugin-tls.pluginmanager.md)<!-- --><typeof import("./PluginHost").[PluginHost](./plugin-tls.pluginhost.md) & HOST, import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>>; \_pluginManager: import("..").[PluginManager](./plugin-tls.pluginmanager.md)<!-- --><typeof import("./PluginHost").[PluginHost](./plugin-tls.pluginhost.md) & HOST, import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>>; use<P\_1 extends import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>>(plugin: P\_1, ...options: import("..").[FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><P\_1>): void \| ReturnType<P\_1\["used"\]>; }
|
|
31
|
+
|
|
32
|
+
|
|
@@ -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) > [createTierOptionsPluginHost](./plugin-tls.createtieroptionspluginhost.md)
|
|
4
|
+
|
|
5
|
+
## createTierOptionsPluginHost() function
|
|
6
|
+
|
|
7
|
+
创建带有选项机制的插件宿主类 比 直接使用 OptionsPluginHost 提供了完善的类型推导
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function createTierOptionsPluginHost<HOST, Options extends {}>(): {
|
|
13
|
+
new (options: Options): {
|
|
14
|
+
readonly defaultOptions: TierOptions<Options>;
|
|
15
|
+
_defaultOptions: TierOptions<Options>;
|
|
16
|
+
readonly pluginManager: import("..").PluginManager<any, import("..").IPlugin<any, any>>;
|
|
17
|
+
use<P extends import("..").IPlugin<HOST, any>>(plugin: P, ...options: import("..").FormatUsePluginParameters<P>): void | import("..").PluginCreatedReturnType<P>;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
};
|
|
20
|
+
readonly defaultOptions: TierOptions<Options>;
|
|
21
|
+
readonly pluginManager: import("..").PluginManager<typeof import("./PluginHost").PluginHost & HOST, import("..").IPlugin<HOST, any>>;
|
|
22
|
+
_pluginManager: import("..").PluginManager<typeof import("./PluginHost").PluginHost & HOST, import("..").IPlugin<HOST, any>>;
|
|
23
|
+
use<P_1 extends import("..").IPlugin<HOST, any>>(plugin: P_1, ...options: import("..").FormatUsePluginParameters<P_1>): void | ReturnType<P_1["used"]>;
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
**Returns:**
|
|
27
|
+
|
|
28
|
+
{ new (options: Options): { readonly defaultOptions: [TierOptions](./plugin-tls.tieroptions.md)<!-- --><Options>; \_defaultOptions: [TierOptions](./plugin-tls.tieroptions.md)<!-- --><Options>; readonly pluginManager: import("..").[PluginManager](./plugin-tls.pluginmanager.md)<!-- --><any, import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><any, any>>; use<P extends import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>>(plugin: P, ...options: import("..").[FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><P>): void \| import("..").[PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md)<!-- --><P>; destroy(): void; }; readonly defaultOptions: [TierOptions](./plugin-tls.tieroptions.md)<!-- --><Options>; readonly pluginManager: import("..").[PluginManager](./plugin-tls.pluginmanager.md)<!-- --><typeof import("./PluginHost").[PluginHost](./plugin-tls.pluginhost.md) & HOST, import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>>; \_pluginManager: import("..").[PluginManager](./plugin-tls.pluginmanager.md)<!-- --><typeof import("./PluginHost").[PluginHost](./plugin-tls.pluginhost.md) & HOST, import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>>; use<P\_1 extends import("..").[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>>(plugin: P\_1, ...options: import("..").[FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><P\_1>): void \| ReturnType<P\_1\["used"\]>; }
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [defineExtend](./plugin-tls.defineextend.md)
|
|
4
|
+
|
|
5
|
+
## defineExtend() function
|
|
6
|
+
|
|
7
|
+
定义扩展的类型便利函数
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function defineExtend<C extends ClassType, E>(cla: C, ext: E & ThisType<InstanceType<C> & E> & PrivateMemberOfExtend<C>): E & ThisType<C & E>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| cla | C | 扩展的目标,用作 this 的类型 |
|
|
20
|
+
| ext | E & ThisType<InstanceType<C> & E> & [PrivateMemberOfExtend](./plugin-tls.privatememberofextend.md)<!-- --><C> | 描述扩展内容的对象,会自动更改其this的类型 |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
E & ThisType<C & E>
|
|
25
|
+
|
|
26
|
+
返回注入了 this 类型的 ext 对象本身
|
|
27
|
+
|
|
28
|
+
## Remarks
|
|
29
|
+
|
|
30
|
+
它会更改 ext 中方法的this指向为 cla & ext,不会真的执行扩展操作。
|
|
31
|
+
|
|
32
|
+
其中 ext.\_constructor 会被保存在 cla.\_constructors 属性中,它是一个数组。
|
|
33
|
+
|
|
34
|
+
cla 需要在自己的构建函数中逐个调用 cla.\_constructors 中的函数
|
|
35
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [defineExtendWithInit](./plugin-tls.defineextendwithinit.md)
|
|
4
|
+
|
|
5
|
+
## defineExtendWithInit() function
|
|
6
|
+
|
|
7
|
+
定义扩展的类型便利函数
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function defineExtendWithInit<C extends ClassType, E>(cla: C, ext: E & ThisType<InstanceType<C> & E> & PrivateMemberOfExtendWithInit<C>): E & ThisType<C & E>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| cla | C | 扩展的目标,用作 this 的类型 |
|
|
20
|
+
| ext | E & ThisType<InstanceType<C> & E> & [PrivateMemberOfExtendWithInit](./plugin-tls.privatememberofextendwithinit.md)<!-- --><C> | 描述扩展内容的对象,会自动更改其this的类型 |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
E & ThisType<C & E>
|
|
25
|
+
|
|
26
|
+
返回注入了 this 类型的 ext 对象本身
|
|
27
|
+
|
|
28
|
+
## Remarks
|
|
29
|
+
|
|
30
|
+
它会更改 ext 中方法的this指向为 cla & ext,不会真的执行扩展操作。
|
|
31
|
+
|
|
32
|
+
其中: - ext.\_constructor 会被保存在 cla.\_constructors 属性中,它是一个数组。 - ext.\_init 会被保存在 cla.\_inits 属性中,它是一个数组。
|
|
33
|
+
|
|
34
|
+
cla 需要: - 在自己的构建函数中逐个调用 cla.\_constructors 中的函数 - 在自己的类似初始化`init()` 方法中逐个调用 cla.\_constructors 中的函数
|
|
35
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [defineMixin](./plugin-tls.definemixin.md)
|
|
4
|
+
|
|
5
|
+
## defineMixin() function
|
|
6
|
+
|
|
7
|
+
定义混合的类型便利函数
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function defineMixin<T, M>(target: T, mixin: M & ThisType<T & M>): M & ThisType<T & M>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| target | T | 混合的目标,用作 this 的类型 |
|
|
20
|
+
| mixin | M & ThisType<T & M> | 混合对象,会自动更改其this的类型 |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
M & ThisType<T & M>
|
|
25
|
+
|
|
26
|
+
返回注入了 this 类型的 mixin 对象本身
|
|
27
|
+
|
|
28
|
+
## Remarks
|
|
29
|
+
|
|
30
|
+
它会更改 mixin 中方法的this指向为 target & mixin,不会真的执行混合操作
|
|
31
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [extendTarget](./plugin-tls.extendtarget.md)
|
|
4
|
+
|
|
5
|
+
## extendTarget() function
|
|
6
|
+
|
|
7
|
+
扩展目标
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function extendTarget<C extends ClassType, E>(cla: C, ext: E & ThisType<InstanceType<C> & E> & PrivateMemberOfExtend<C>): ClassType<ConstructorParameters<C>, E & ThisType<InstanceType<C> & E>>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| cla | C | 扩展的目标,也用作 this 的类型 |
|
|
20
|
+
| ext | E & ThisType<InstanceType<C> & E> & [PrivateMemberOfExtend](./plugin-tls.privatememberofextend.md)<!-- --><C> | 扩展对象,会自动更改其this的类型 |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
[ClassType](./plugin-tls.classtype.md)<!-- --><ConstructorParameters<C>, E & ThisType<InstanceType<C> & E>>
|
|
25
|
+
|
|
26
|
+
返回扩展后的 cla 对象
|
|
27
|
+
|
|
28
|
+
## Remarks
|
|
29
|
+
|
|
30
|
+
会执行对 CEarth 类的扩展操作。 与 [targetExtend()](./plugin-tls.targetextend.md) 的区别仅仅是返回类型不一样。
|
|
31
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [extendTargetWithInit](./plugin-tls.extendtargetwithinit.md)
|
|
4
|
+
|
|
5
|
+
## extendTargetWithInit() function
|
|
6
|
+
|
|
7
|
+
扩展目标
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function extendTargetWithInit<C extends ClassType, E>(cla: C, ext: E & ThisType<InstanceType<C> & E> & PrivateMemberOfExtendWithInit<C>): ClassType<ConstructorParameters<C>, E & ThisType<InstanceType<C> & E>>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| cla | C | 扩展的目标,也用作 this 的类型 |
|
|
20
|
+
| ext | E & ThisType<InstanceType<C> & E> & [PrivateMemberOfExtendWithInit](./plugin-tls.privatememberofextendwithinit.md)<!-- --><C> | 扩展对象,会自动更改其this的类型 |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
[ClassType](./plugin-tls.classtype.md)<!-- --><ConstructorParameters<C>, E & ThisType<InstanceType<C> & E>>
|
|
25
|
+
|
|
26
|
+
返回扩展后的 cla 对象
|
|
27
|
+
|
|
28
|
+
## Remarks
|
|
29
|
+
|
|
30
|
+
会执行对 CEarth 类的扩展操作。 与 [targetExtendWithInit()](./plugin-tls.targetextendwithinit.md) 的区别仅仅是返回类型不一样。
|
|
31
|
+
|
|
@@ -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) > [FormatUseParameters](./plugin-tls.formatuseparameters.md)
|
|
4
|
+
|
|
5
|
+
## FormatUseParameters type
|
|
6
|
+
|
|
7
|
+
格式化 use 方法的参数列表
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type FormatUseParameters<Options> = Options extends never | void | undefined ? [] : [Options];
|
|
13
|
+
```
|
|
@@ -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) > [FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)
|
|
4
|
+
|
|
5
|
+
## FormatUsePluginParameters type
|
|
6
|
+
|
|
7
|
+
格式化 use 方法的参数列表
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type FormatUsePluginParameters<Plugin> = GetPluginOptions<Plugin> extends never | void | undefined ? [] : [GetPluginOptions<Plugin>];
|
|
13
|
+
```
|
|
14
|
+
**References:** [GetPluginOptions](./plugin-tls.getpluginoptions.md)
|
|
15
|
+
|
|
@@ -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) > [GetNormalizePluginOptions](./plugin-tls.getnormalizepluginoptions.md)
|
|
4
|
+
|
|
5
|
+
## GetNormalizePluginOptions type
|
|
6
|
+
|
|
7
|
+
获取规范化的插件选项
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type GetNormalizePluginOptions<Plugin> = NormalizePluginOptions<GetPluginOptions<Plugin>>;
|
|
13
|
+
```
|
|
14
|
+
**References:** [NormalizePluginOptions](./plugin-tls.normalizepluginoptions.md)<!-- -->, [GetPluginOptions](./plugin-tls.getpluginoptions.md)
|
|
15
|
+
|
|
@@ -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) > [GetPluginOptions](./plugin-tls.getpluginoptions.md)
|
|
4
|
+
|
|
5
|
+
## GetPluginOptions type
|
|
6
|
+
|
|
7
|
+
获取插件的选项类型
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type GetPluginOptions<Plugin> = Plugin extends IPlugin<any, infer Options> ? Options : never;
|
|
13
|
+
```
|
|
14
|
+
**References:** [IPlugin](./plugin-tls.iplugin.md)
|
|
15
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [getPropertyValue](./plugin-tls.getpropertyvalue.md)
|
|
4
|
+
|
|
5
|
+
## getPropertyValue() function
|
|
6
|
+
|
|
7
|
+
通过key列表获取对象中对应属性的值
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getPropertyValue(obj: any, props: string[]): any;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| obj | any | |
|
|
20
|
+
| props | string\[\] | |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
any
|
|
25
|
+
|
|
26
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [getPropertyValueByPath](./plugin-tls.getpropertyvaluebypath.md)
|
|
4
|
+
|
|
5
|
+
## getPropertyValueByPath() function
|
|
6
|
+
|
|
7
|
+
获取对象的属性路径对应的属性值
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getPropertyValueByPath(obj: any, propPath: string): any;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| obj | any | |
|
|
20
|
+
| propPath | string | |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
any
|
|
25
|
+
|
|
26
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [getTargetProperties](./plugin-tls.gettargetproperties.md)
|
|
4
|
+
|
|
5
|
+
## getTargetProperties() function
|
|
6
|
+
|
|
7
|
+
按照 props 的结构,获取 target 的 属性对象 - props 中所有 纯对象 都会被作为 props 进行递归地获取
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getTargetProperties<Props>(target: any, props: Props): Props;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| target | any | |
|
|
20
|
+
| props | Props | |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
Props
|
|
25
|
+
|
|
26
|
+
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
插件宿主的实例类型
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export
|
|
12
|
+
export type HostInst<H> = H extends new (...args: any) => any ? InstanceType<H> : H;
|
|
13
13
|
```
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
当宿主实例被创建时调用
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
created?(host: HostInst<HOST>, options
|
|
12
|
+
created?(host: HostInst<HOST>, ...options: FormatUseParameters<Options>): any;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -17,9 +17,9 @@ created?(host: HostInst<HOST>, options?: Options): any;
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
19
|
| host | [HostInst](./plugin-tls.hostinst.md)<!-- --><HOST> | 新建的宿主实例 |
|
|
20
|
-
| options | Options |
|
|
20
|
+
| options | [FormatUseParameters](./plugin-tls.formatuseparameters.md)<!-- --><Options> | 注册插件时的选项 |
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
**Returns:**
|
|
23
23
|
|
|
24
24
|
any
|
|
25
25
|
|
|
@@ -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) > [IPlugin](./plugin-tls.iplugin.md) > [destroyed](./plugin-tls.iplugin.destroyed.md)
|
|
4
|
+
|
|
5
|
+
## IPlugin.destroyed() method
|
|
6
|
+
|
|
7
|
+
当宿主实例被销毁时调用
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
destroyed?(host: HostInst<HOST>, ...options: FormatUseParameters<Options>): any;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| host | [HostInst](./plugin-tls.hostinst.md)<!-- --><HOST> | 被销毁的宿主实例 |
|
|
20
|
+
| options | [FormatUseParameters](./plugin-tls.formatuseparameters.md)<!-- --><Options> | 注册插件时的选项 |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
any
|
|
25
|
+
|
|
@@ -6,16 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
插件的接口
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface IPlugin<HOST, Options =
|
|
12
|
+
export interface IPlugin<HOST, Options = void>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
17
|
| Method | Description |
|
|
18
18
|
| --- | --- |
|
|
19
|
-
| [created(host, options)?](./plugin-tls.iplugin.created.md) |
|
|
19
|
+
| [created(host, options)?](./plugin-tls.iplugin.created.md) | _(Optional)_ 当宿主实例被创建时调用 |
|
|
20
|
+
| [destroyed(host, options)?](./plugin-tls.iplugin.destroyed.md) | _(Optional)_ 当宿主实例被销毁时调用 |
|
|
20
21
|
| [used(Host, options)](./plugin-tls.iplugin.used.md) | 当插件被注册时调用 |
|
|
21
22
|
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
当插件被注册时调用
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
used(Host: HOST, options
|
|
12
|
+
used(Host: HOST, ...options: FormatUseParameters<Options>): any;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -17,9 +17,9 @@ used(Host: HOST, options?: Options): any;
|
|
|
17
17
|
| Parameter | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
19
|
| Host | HOST | 宿主的类型 |
|
|
20
|
-
| options | Options |
|
|
20
|
+
| options | [FormatUseParameters](./plugin-tls.formatuseparameters.md)<!-- --><Options> | 注册插件时的选项 |
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
**Returns:**
|
|
23
23
|
|
|
24
24
|
any
|
|
25
25
|
|