-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
27 lines (24 loc) 路 828 Bytes
/
Copy pathtypes.ts
File metadata and controls
27 lines (24 loc) 路 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Args } from "./deps.ts";
export type Environment = "dev" | "staging" | "production";
export type Command = {
/** The command's callable function. */
run: (args: Args) => Promise<unknown>;
/** A list of the command's aliases. */
aliases: string[];
/** A brief description of the command's purpose. */
description: string;
/** A list of the command's subcommands. */
subcommands?: Command[];
/** A list of the command's arguments. */
arguments?: Argument[];
/** A list of the command's optional arguments. */
optionalArguments?: Argument[];
};
export type Argument = {
/** The argument's callable function. */
run: (command: Command, args: Args) => void;
/** A brief description of the argument's purpose. */
description: string;
/** A list of accepted flags for the argument. */
flags: string[];
};