Skip to content

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.

const request = ctx.commands.core.tasks.setTask({ id: row.id, on: true });
await ctx.dispatch(request);
// the id of the command, to compare with
const id = ctx.commands.core.tasks.setTask.command;
Type Parameter Description
A the type of the arguments of the command
Command(args): BuiltIntent;

Builds the request for the change.

Parameter Type Description
args A the arguments of the command

BuiltIntent

the request

readonly command: string;

The id of the command.