import { Five } from "@realsee/five"; /** * 获取插件实例(非 hook,可在任意位置调用) */ export declare function getPlugin(workCode: string, pluginName: string): T | undefined; /** * 手动设置插件实例到缓存(非 hook,可在任意位置调用) */ export declare function setPlugin(workCode: string, pluginName: string, plugin: any): void; export interface UseFivePluginOptions { /** 缓存未命中时自动创建插件实例 */ createPlugin?: (five: Five) => T; /** Five 实例变化时是否重新创建(而非同步引用),默认 false */ reCreateOnFiveChange?: boolean; } export interface UseFivePluginOptionsWithCreate extends UseFivePluginOptions { createPlugin: (five: Five) => T; } /** 传了 createPlugin 时保证返回 T */ export declare function useFivePlugin(pluginName: string, options: UseFivePluginOptionsWithCreate): T; /** 未传 createPlugin 时返回 T | undefined */ export declare function useFivePlugin(pluginName: string, options?: UseFivePluginOptions): T | undefined;