Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CommandService

The command service should be used to execute commands.

Hierarchy

  • CommandService

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

  • executeCommand<T>(command: string, ...args: any[]): Promise<undefined | T>
  • 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<undefined | T>