Command
A command that ships with the app, such as ctx.commands.core.tasks.setTask. Calling it with its arguments does not run anything: it builds the request for the change, which is then passed to ctx.dispatch or returned from a hook as a follow-up. Its command property holds the id of the command, so that code can recognize it.
Example
Section titled “Example”const request = ctx.commands.core.tasks.setTask({ id: row.id, on: true });await ctx.dispatch(request);
// the id of the command, to compare withconst id = ctx.commands.core.tasks.setTask.command;Type Parameters
Section titled “Type Parameters”| Type Parameter | Description |
|---|---|
A |
the type of the arguments of the command |
Command(args): BuiltIntent;Builds the request for the change.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
args |
A |
the arguments of the command |
Returns
Section titled “Returns”the request
Properties
Section titled “Properties”command
Section titled “command”readonly command: string;The id of the command.
