UNPKG

1.08 kBTypeScriptView Raw
1declare let _args: string[];
2declare let _baseArgs: string[];
3declare let _optionArgs: string[];
4/**
5 * Is Flag
6 * Checks if value is type of flag param.
7 *
8 * @param flag the value to inspect to detect if is flag.
9 */
10export declare function isFlag(flag: string): false | "value" | "boolean";
11/**
12 * Parse Element
13 * Inspects value parses value as command or flag.
14 *
15 * @param val the value to inspect/convert to flag.
16 * @param idx the current index position of the value.
17 * @param args the array of argv params.
18 */
19export declare function parseElement(val: string, idx: number, args: any[]): {};
20export declare function parse(args?: any[]): {
21 flags: {
22 [key: string]: any;
23 };
24 cmds: any[];
25 cmd: string;
26};
27/**
28 * Find
29 * Iterates expected or valid values stopping if matching value is found in provided args.
30 *
31 * @param valid array of expected valid values.
32 * @param args array of params to inspect.
33 */
34export declare function find(valid: string[], args?: string[]): any;
35export { _args as args, _baseArgs as normalized, _optionArgs as options };