import { Syringe } from 'mana-syringe'; import type { IRegisterHookFn, IRegisterHookHubFn, IHookService } from '../hooks/interface'; import { IHookContribution } from '../hooks/interface'; import type { ICmdHooks, ICommandContributionConfig } from './interface'; export interface IConfig { createModule?: (...args: any[]) => Syringe.Module; } export declare const CONFIG_TYPE = "CommandConfig"; export declare const getDefaultContributions: () => ICommandContributionConfig[]; export interface IRegisterCommandContribution { (): ICommandContributionConfig[]; } export declare class CommandConfig implements IHookContribution { private getContributions; constructor(); setCommandContributions: (fn: IRegisterCommandContribution) => void; getCommandContributions: () => ICommandContributionConfig[]; registerHook: (hooks: ICmdHooks) => Promise; registerHookHub: (registry: IHookService) => Promise; /** 设置CONFIG类型 */ readonly CONFIG_TYPE = "CommandConfig"; /** 注册 command hook */ private registerHookFn; /** set command hook fn */ setRegisterHookFn: (fn: IRegisterHookFn) => void; /** 注册 command hook hub */ private registerHookHubFn; /** 注册 command hook hub */ setRegisterHookHubFn: (fn: IRegisterHookHubFn) => void; /** 获取config的所有配置*/ getConfig: () => Promise<{ registerHookFn: IRegisterHookFn; getContributions: IRegisterCommandContribution; CONFIG_TYPE: string; }>; } /** 提供一个工厂方法 */ export declare const createCommandConfig: () => CommandConfig; export declare const registerCommandConfig: (register: Syringe.Register, commandConfig: CommandConfig) => void;