Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CommandService

The command service should be used to execute commands.

Hierarchy

  • CommandService

Implemented by

Index

Properties

Readonly onDidExecuteCommand

onDidExecuteCommand: Event<CommandEvent>

An event is emitted when a command was executed.

Readonly onWillExecuteCommand

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

executeCommand

  • executeCommand<T>(command: string, ...args: any[]): Promise<T | undefined>
  • Execute the active handler for the given command and arguments.

    Reject if a command cannot be executed.

    Type parameters

    • T

    Parameters

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

    Returns Promise<T | undefined>