import type { CommandModule } from './command_module'; import type { CommandPackage } from './command_package'; import type { ICommandRunner } from './command_runner'; import { CommandType } from './command_type'; import type { ICallExternalCommand, ICallExternalTabComplete } from '../callback_internal'; export declare class CommandRegistry { readonly callExternalCommand: ICallExternalCommand; readonly callExternalTabComplete: ICallExternalTabComplete; constructor(callExternalCommand: ICallExternalCommand, callExternalTabComplete: ICallExternalTabComplete); /** * Return sequence of all modules ordered by module name. */ allModules(): CommandModule[]; /** * Return sequence of command names, optionally filtered by commandType. */ commandNames(commandType?: CommandType): string[]; /** * Return the ICommandRunner for a particular named function, or null if no such name exists. * Note it does not load the module, that occurs when the command is run. */ get(name: string): ICommandRunner | null; match(start: string, commandType?: CommandType): string[]; registerBuiltinCommands(commands: any): void; registerCommandPackage(commandPackage: CommandPackage): void; registerExternalCommand(name: string, hasTabComplete: boolean): void; /** * Register a command runner under all of its names. */ private _register; /** * Return true if name is a valid command name. * CommandRegistry will not register a command with an invalid name and will report it via * console.warn. It will not raise an error as usually command registration occurs before a shell * is up and running. */ private _validName; private _map; commandPackageMap: Map; }