* @zh 卸载插件 * @en Uninstall plugin * * @param name - @zh 插件名称 @en Plugin name * @throws @zh 如果Core实例未创建或插件卸载失败 @en If Core instance not created or plugin uninstallation fails * * @example * ```typescript * await Core.uninstallPlugin('my-plugin'); * ```
(name: string)
| 586 | * ``` |
| 587 | */ |
| 588 | public static async uninstallPlugin(name: string): Promise<void> { |
| 589 | if (!this._instance) { |
| 590 | throw new Error('Core实例未创建,请先调用Core.create()'); |
| 591 | } |
| 592 | |
| 593 | await this._instance._pluginManager.uninstall(name); |
| 594 | } |
| 595 | |
| 596 | /** |
| 597 | * @zh 获取插件实例 |
no test coverage detected