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