import { type CommandCallback } from "https://deno.land/x/enzastdlib@v0.0.4/commands/mod.ts";
Represents the typing of a command callback that can be registered.
Examples
Example 1
Example 1
import type { CommandCallback } from 'https://deno.land/x/enzastdlib/commands/mod.ts';
// **WARNING**: You need to use named functions instead of arrow syntax for
// registering commands. This example is for demonstration purposes only.
const mycommand = ((options) => {
// `options.msg` is equivalent `deno run ./mod.ts mycommand --msg ...`.
console.log(`Hello ${options.msg}!`);
}) satisfies CommandCallback;
definition: (options: OptionsType) => void | number | Promise<void | number>