import { TypeConstraint } from '@vscode-alt/monaco-editor/esm/vs/base/common/types'; import { Event } from '@vscode-alt/monaco-editor/esm/vs/base/common/event'; import { IDisposable } from '@vscode-alt/monaco-editor/esm/vs/base/common/lifecycle'; export interface ICommandEvent { commandId: string; args: any[]; } export declare const ICommandsService: import("@vscode-alt/monaco-editor/esm/vs/platform/instantiation/common/instantiation").ServiceIdentifier; export interface ICommandService { onWillExecuteCommand: Event; executeCommand(commandId: string, ...args: any[]): Promise; } export type ICommandsMap = Map; export interface ICommandHandler { (accessor: any /** ServicesAccessor */, ...args: any[]): void; } export interface ICommand { id: string; handler: ICommandHandler; description?: ICommandHandlerDescription | null; } export interface ICommandHandlerDescription { description: string; args: { name: string; description?: string; constraint?: TypeConstraint; }[]; returns?: string; } export interface ICommandRegistry { onDidRegisterCommand: Event; registerCommand(id: string, command: ICommandHandler): IDisposable; registerCommand(command: ICommand): IDisposable; registerCommandAlias(oldId: string, newId: string): IDisposable; getCommand(id: string): ICommand | undefined; getCommands(): ICommandsMap; }