Skip to main content

Function: executeCommand()

executeCommand<T>(command, ...rest): PromiseLike<T>

Execute a command, previously registered with commands.registerCommand.

For an example, see commands.

Type Parameters

T = unknown

the type of the value returned by the command

Parameters

command

string

the name used for registering the command

rest

...any[]

the parameters to pass to the command

Returns

PromiseLike<T>

the value returned by the command

Throws

if the command is not registered

Throws

if the command throws an exception

Defined in

packages/extension-api/src/extension-api.d.ts:753