frontpage/lib/commands/types.tsx

20 lines
395 B
TypeScript
Raw Normal View History

2021-12-17 18:55:00 +01:00
export interface Flag {
2021-12-16 00:21:14 +01:00
short: string;
long: string;
desc: string;
}
interface SubCommand {
name: string;
desc: string;
}
export interface Command {
name: string;
hidden?: boolean;
desc: string;
2021-12-17 20:02:42 +01:00
flags?: Record<string,Flag>;
subcommands?: Record<string,SubCommand>;
2021-12-17 18:55:00 +01:00
execute: (flags: string[], args: string[], raw: string, extra?: any) => string[];
2021-12-16 00:21:14 +01:00
}