@anycli/example-plugin-ts
Version:
example dxcli plugin in typescript
28 lines (27 loc) • 1.08 kB
TypeScript
import { Command, flags } from '@anycli/command';
export default class Hello extends Command {
static title: string;
static description: string;
static examples: string[];
static flags: {
name: flags.IOptionFlag<string | undefined>;
force: {
name: string;
char?: "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "c" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "n" | "o" | "r" | "t" | "v" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "X" | "Y" | "Z" | undefined;
description?: string | undefined;
hidden?: boolean | undefined;
required?: boolean | undefined;
env?: string | undefined;
parse(input: boolean, context: any): boolean;
} & {
type: "boolean";
allowNo: boolean;
};
};
static args: {
name: string;
required: boolean;
description: string;
}[];
run(): Promise<void>;
}