Theia API Documentation v1.77.0
    Preparing search index...

    Interface CommandService

    The command service should be used to execute commands.

    interface CommandService {
        onDidExecuteCommand: Event<CommandEvent>;
        onWillExecuteCommand: Event<WillExecuteCommandEvent>;
        executeCommand<T>(command: string, ...args: any[]): Promise<T | undefined>;
    }

    Implemented by

    Index
    onDidExecuteCommand: Event<CommandEvent>

    An event is emitted when a command was executed.

    onWillExecuteCommand: Event<WillExecuteCommandEvent>

    An event is emitted when a command is about to be executed.

    It can be used to install or activate a command handler.

    • eslint-disable-next-line @typescript-eslint/no-explicit-any

      Type Parameters

      • T

      Parameters

      • command: string
      • ...args: any[]

      Returns Promise<T | undefined>