-
Notifications
You must be signed in to change notification settings - Fork 93
/
optimist.d.ts
77 lines (48 loc) · 1.88 KB
/
optimist.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// https://github.com/substack/node-optimist
declare module "optimist" {
import optimist = module("optimist");
export class Optimist {
default(name: string, value: any): Optimist;
default(args: any): Optimist;
boolean(name: string): Optimist;
boolean(names: string[]): Optimist;
string(name: string): Optimist;
string(names: string[]): Optimist;
wrap(columns): Optimist;
help(): Optimist;
showHelp(fn: Function): Optimist;
usage(message: string): Optimist;
demand(key: string): Optimist;
demand(key: number): Optimist;
demand(key: string[]): Optimist;
alias(key: string, alias: string): Optimist;
describe(key: string, desc: string): Optimist;
options(key: string, opt: any): Optimist;
check(fn: Function);
parse(args: string[]): Optimist;
argv: Argv;
}
export function default(name: string, value: any): Optimist;
export function default(args: any): Optimist;
export function boolean(name: string): Optimist;
export function boolean(names: string[]): Optimist;
export function string(name: string): Optimist;
export function string(names: string[]): Optimist;
export function wrap(columns): Optimist;
export function help(): Optimist;
export function showHelp(fn: Function): Optimist;
export function usage(message: string): Optimist;
export function demand(key: string): Optimist;
export function demand(key: number): Optimist;
export function demand(key: string[]): Optimist;
export function alias(key: string, alias: string): Optimist;
export function describe(key: string, desc: string): Optimist;
export function options(key: string, opt: any): Optimist;
export function check(fn: Function);
export function parse(args: string[]): Optimist;
export var argv: Argv;
export function(args: string[]): Optimist;
export interface Argv {
_: string[];
}
}