UNPKG

642 BTypeScriptView Raw
1declare module 'command-line-args' {
2 module commandLineArgs {
3 interface ArgDescriptor {
4 name: string;
5 alias?: string;
6 description?: string;
7 defaultValue?: any;
8 type?: Object;
9 multiple?: boolean;
10 defaultOption?: boolean;
11 group?: string;
12 }
13 }
14
15 /**
16 * @param descriptors An array of objects that describe the arguments that
17 * we want to parse.
18 * @param args Optional arguments to parse. If not given, process.argv is
19 * used.
20 */
21 function commandLineArgs(
22 descriptors: commandLineArgs.ArgDescriptor[], args?: string[]): any;
23
24 export = commandLineArgs;
25}