Skip to content

Command.callback?

Command › callback?

Official

Type: () => any

Simple callback, triggered globally.

Example:

this.addCommand({
id: 'print-greeting-to-console',
name: 'Print greeting to console',
callback: () => {
console.log('Hey, you!');
},
});