Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Commands

Hierarchy

  • Commands

Index

Methods

executeCommand

  • executeCommand<T>(name: string, args: any): Promise<T> | null
  • Execute a command by name.

    Type parameters

    • T

    Parameters

    • name: string

      the full name of the command.

    • args: any

      arguments for the command.

    Returns Promise<T> | null

    an optional return value.

getCommands

  • getCommands(): string[]
  • Get a list of all available commands.

    Returns string[]

registerCommand

  • registerCommand(name: string, commandFunc: (args: any) => any, customizer?: () => CustomizedCommand): void
  • Register the function to handle a command.

    Parameters

    • name: string

      the name of the command as specified in the package.json contributes/commands section.

    • commandFunc: (args: any) => any

      the function to execute when the command is selected.

        • (args: any): any
        • Parameters

          • args: any

          Returns any

    • Optional customizer: () => CustomizedCommand

      an optional function to customize the title or state of the command.

    Returns void

Generated using TypeDoc