import { type CommandRecord } from "https://deno.land/x/enzastdlib@v0.0.4/commands/command.ts";
Represents a record containing all registered commands.
Examples
Example 1
Example 1
import type { CommandRecord } from 'https://deno.land/x/enzastdlib/commands/mod.ts';
const MY_COMMANDS = {
mycommand(options) {
// `options.msg` is equivalent `deno run ./mod.ts mycommand --msg ...`.
console.log(`Hello ${options.msg}!`);
}
} satisfies CommandRecord;
definition: Record<string, CommandCallback | undefined>