1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export = nodemon;
|
9 |
|
10 | declare function nodemon(options: nodemon.Settings | string): typeof nodemon;
|
11 |
|
12 | declare namespace nodemon {
|
13 | function restart(): void;
|
14 |
|
15 | function addListener(event: string | symbol, listener: (...args: any[]) => void): typeof nodemon;
|
16 | function addListener(
|
17 | event: 'start' | 'exit' | 'crash' | 'config:update' | 'readable',
|
18 | listener: () => void,
|
19 | ): typeof nodemon;
|
20 | function addListener(event: 'restart', listener: (files?: string[]) => void): typeof nodemon;
|
21 | function addListener(event: 'quit', listener: (code?: number) => void): typeof nodemon;
|
22 | function addListener(event: 'watching', listener: (file: string) => void): typeof nodemon;
|
23 | function addListener(event: 'log', listener: (msg: LogMessage) => void): typeof nodemon;
|
24 | function addListener(event: 'stdout' | 'stderr', listener: (data: Buffer) => void): typeof nodemon;
|
25 |
|
26 | function on(event: string | symbol, listener: (...args: any[]) => void): typeof nodemon;
|
27 | function on(event: 'start' | 'exit' | 'crash' | 'config:update' | 'readable', listener: () => void): typeof nodemon;
|
28 | function on(event: 'restart', listener: (files?: string[]) => void): typeof nodemon;
|
29 | function on(event: 'quit', listener: (code?: number) => void): typeof nodemon;
|
30 | function on(event: 'watching', listener: (file: string) => void): typeof nodemon;
|
31 | function on(event: 'log', listener: (msg: LogMessage) => void): typeof nodemon;
|
32 | function on(event: 'stdout' | 'stderr', listener: (data: Buffer) => void): typeof nodemon;
|
33 |
|
34 | function once(event: string | symbol, listener: (...args: any[]) => void): typeof nodemon;
|
35 | function once(
|
36 | event: 'start' | 'exit' | 'crash' | 'config:update' | 'readable',
|
37 | listener: () => void,
|
38 | ): typeof nodemon;
|
39 | function once(event: 'quit', listener: (code?: number) => void): typeof nodemon;
|
40 | function once(event: 'restart', listener: (files?: string[]) => void): typeof nodemon;
|
41 | function once(event: 'watching', listener: (file: string) => void): typeof nodemon;
|
42 | function once(event: 'log', listener: (msg: LogMessage) => void): typeof nodemon;
|
43 | function once(event: 'stdout' | 'stderr', listener: (data: Buffer) => void): typeof nodemon;
|
44 |
|
45 | function removeAllListeners(event?: string | symbol): typeof nodemon;
|
46 |
|
47 | function emit(event: string | symbol, ...args: any[]): boolean;
|
48 | function emit(event: 'start' | 'exit' | 'crash' | 'config:update' | 'readable'): boolean;
|
49 | function emit(event: 'quit', code?: number): boolean;
|
50 | function emit(event: 'restart', files?: string[]): boolean;
|
51 | function emit(event: 'watching', listener: (file: string) => void): boolean;
|
52 | function emit(event: 'log', msg: LogMessage): boolean;
|
53 | function emit(event: 'stdout' | 'stderr', data: Buffer): boolean;
|
54 |
|
55 | function reset(done?: () => void): void;
|
56 |
|
57 | interface Settings {
|
58 | env?: { [key: string]: string | boolean | number } | undefined;
|
59 | script?: string | undefined;
|
60 | |
61 |
|
62 |
|
63 | ext?: string | undefined;
|
64 | |
65 |
|
66 |
|
67 | exec?: string | undefined;
|
68 | |
69 |
|
70 |
|
71 | watch?: ReadonlyArray<string | { re: string }> | undefined;
|
72 | |
73 |
|
74 |
|
75 | ignore?: ReadonlyArray<string | { re: string }> | undefined;
|
76 | |
77 |
|
78 |
|
79 | quiet?: boolean | undefined;
|
80 | |
81 |
|
82 |
|
83 | verbose?: boolean | undefined;
|
84 | |
85 |
|
86 |
|
87 | stdin?: boolean | undefined;
|
88 | stdout?: boolean | undefined;
|
89 | |
90 |
|
91 |
|
92 | runOnChangeOnly?: boolean | undefined;
|
93 | |
94 |
|
95 |
|
96 | delay?: number | undefined;
|
97 | |
98 |
|
99 |
|
100 |
|
101 |
|
102 | legacyWatch?: boolean | undefined;
|
103 | |
104 |
|
105 |
|
106 | exitcrash?: boolean | undefined;
|
107 | |
108 |
|
109 |
|
110 | execMap?: {
|
111 | [k: string]: any;
|
112 | } | undefined;
|
113 | events?: { [key: string]: string } | undefined;
|
114 | restartable?: string | undefined;
|
115 | args?: ReadonlyArray<string> | undefined;
|
116 | |
117 |
|
118 |
|
119 | nodeArgs?: ReadonlyArray<string> | undefined;
|
120 | scriptPosition?: number | undefined;
|
121 | |
122 |
|
123 |
|
124 | colours?: boolean | undefined;
|
125 | |
126 |
|
127 |
|
128 | cwd?: string | undefined;
|
129 | |
130 |
|
131 |
|
132 | dump?: boolean | undefined;
|
133 | |
134 |
|
135 |
|
136 | ignoreRoot?: string[] | undefined;
|
137 | |
138 |
|
139 |
|
140 | noUpdateNotifier?: boolean | undefined;
|
141 | |
142 |
|
143 |
|
144 | pollingInterval?: number | undefined;
|
145 | |
146 |
|
147 |
|
148 | signal?: string | undefined;
|
149 | |
150 |
|
151 |
|
152 | spawn?: boolean | undefined;
|
153 | [k: string]: any;
|
154 | }
|
155 |
|
156 | interface LogMessage {
|
157 | type: string;
|
158 | message: string;
|
159 | colour: string;
|
160 | }
|
161 | }
|