Edit

Share via


CustomCommandRegistry Class

Caution

This class is still in pre-release. Its signature may change or it may be removed in future releases.

Provides the functionality for registering custom commands.

Methods

registerCommand

registerCommand(customCommand: CustomCommand, callback: (origin: CustomCommandOrigin, ...args: any[]) => CustomCommandResult | undefined): void

Registers a custom command that when executed triggers a script callback.

Parameters

  • customCommand: CustomCommand

  • callback: (origin: CustomCommandOrigin, ...args: any[]) => CustomCommandResult | undefined

    The callback triggered when the command executes.

Returns void

Notes:

registerEnum

registerEnum(name: string, values: string[]): void

Registers a custom command enum.

Parameters

  • name: string
  • values: string[]

Notes: