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

    The command service should be used to execute commands.

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

    Implemented by

    Index

    Properties

    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.

    Methods

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

      Type Parameters

      • T

      Parameters

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

      Returns Promise<undefined | T>