UNPKG

plugin-tls

Version:

plugin-tls 是插件系统相应的工具,可快速地让任何模块具备插件机制

215 lines (95 loc) 2.33 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [PluginManager](./plugin-tls.pluginmanager.md) ## PluginManager class 插件管理者 **Signature:** ```typescript export declare class PluginManager<HostClassType, Plugin extends IPlugin<HostClassType, any> = IPlugin<HostClassType, any>> ``` ## Remarks 负责管理插件的注册、应用 等 ## Constructors <table><thead><tr><th> Constructor </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [(constructor)(host)](./plugin-tls.pluginmanager._constructor_.md) </td><td> </td><td> Constructs a new instance of the `PluginManager` class </td></tr> </tbody></table> ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> [host](./plugin-tls.pluginmanager.host.md) </td><td> </td><td> HostClassType </td><td> 插件的宿主 </td></tr> <tr><td> [pluginOptsMap](./plugin-tls.pluginmanager.pluginoptsmap.md) </td><td> `readonly` </td><td> Map&lt;Plugin, any&gt; </td><td> 插件与插件选项的映射 </td></tr> <tr><td> [plugins](./plugin-tls.pluginmanager.plugins.md) </td><td> `readonly` </td><td> Plugin\[\] </td><td> 注册的插件 </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [created(hostInst)](./plugin-tls.pluginmanager.created.md) </td><td> </td><td> 插件宿主创建实例时调用 </td></tr> <tr><td> [destroyed(hostInst)](./plugin-tls.pluginmanager.destroyed.md) </td><td> </td><td> 插件宿主被销毁时调用 </td></tr> <tr><td> [instUse(hostInst, plugin, options)](./plugin-tls.pluginmanager.instuse.md) </td><td> </td><td> 插件宿主实例的注册插件的方法 </td></tr> <tr><td> [use(plugin, options)](./plugin-tls.pluginmanager.use.md) </td><td> </td><td> 使用插件、注册插件 </td></tr> </tbody></table>