Command โ€บ callback

Command.callback property

Simple callback, triggered globally.

Signature:

callback?: () => any;

Example

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