UNPKG

593 BTypeScriptView Raw
1import Command from "./command";
2import Option from "./option";
3import Argument from "./argument";
4export { CommandpostError, ErrorReason } from "./error";
5export { Command, Option, Argument };
6/**
7 * Create new top level command.
8 * @param cmdName
9 * @returns {Command<Opt, Arg>}
10 */
11export declare function create<Opt, Arg>(cmdName: string): Command<Opt, Arg>;
12/**
13 * exec parsing and call callback.
14 * @param cmd it created by create function.
15 * @param argv pass process.argv
16 * @returns {Promise<{}>}
17 */
18export declare function exec(cmd: Command<any, any>, argv: string[]): Promise<{}>;