plugin-tls
Version:
plugin-tls 是插件系统相应的工具,可快速地让任何模块具备插件机制
73 lines (43 loc) • 3.06 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [becomePluginHost\_Extends](./plugin-tls.becomepluginhost_extends.md)
## becomePluginHost\_Extends() function
插件缩主类的装饰器(继承版)
**Signature:**
```typescript
export declare function becomePluginHost_Extends<HOST extends new (...args: any) => Object>(target: HOST): {
new (...args: any): {
get pluginManager(): PluginManager</*elided*/ any & HOST, IPlugin</*elided*/ any & HOST, any>>;
use<Plugin extends IPlugin</*elided*/ any & HOST, any>>(plugin: Plugin, ...options: FormatUsePluginParameters<Plugin>): void | PluginCreatedReturnType<Plugin>;
destroy(): void;
constructor: Function;
toString(): string;
toLocaleString(): string;
valueOf(): Object;
hasOwnProperty(v: PropertyKey): boolean;
isPrototypeOf(v: Object): boolean;
propertyIsEnumerable(v: PropertyKey): boolean;
};
get pluginManager(): PluginManager</*elided*/ any & HOST, IPlugin</*elided*/ any & HOST, any>>;
_pluginManager: PluginManager</*elided*/ any & HOST>;
use<Plugin extends IPlugin</*elided*/ any & HOST, any>>(plugin: Plugin, ...options: FormatUsePluginParameters<Plugin>): void | ReturnType<Plugin["used"]>;
} & HOST;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
target
</td><td>
HOST
</td><td>
</td></tr>
</tbody></table>
**Returns:**
{ new (...args: any): { get pluginManager(): [PluginManager](./plugin-tls.pluginmanager.md)<!-- --></\*elided\*/ any & HOST, [IPlugin](./plugin-tls.iplugin.md)<!-- --></\*elided\*/ any & HOST, any>>; use<Plugin extends [IPlugin](./plugin-tls.iplugin.md)<!-- --></\*elided\*/ any & HOST, any>>(plugin: Plugin, ...options: [FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><Plugin>): void \| [PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md)<!-- --><Plugin>; destroy(): void; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: PropertyKey): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: PropertyKey): boolean; }; get pluginManager(): [PluginManager](./plugin-tls.pluginmanager.md)<!-- --></\*elided\*/ any & HOST, [IPlugin](./plugin-tls.iplugin.md)<!-- --></\*elided\*/ any & HOST, any>>; \_pluginManager: [PluginManager](./plugin-tls.pluginmanager.md)<!-- --></\*elided\*/ any & HOST>; use<Plugin extends [IPlugin](./plugin-tls.iplugin.md)<!-- --></\*elided\*/ any & HOST, any>>(plugin: Plugin, ...options: [FormatUsePluginParameters](./plugin-tls.formatusepluginparameters.md)<!-- --><Plugin>): void \| ReturnType<Plugin\["used"\]>; } & HOST
## Remarks
通过继承实现