forked from jbaroudi/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-nodemon.d.ts
88 lines (79 loc) · 2.81 KB
/
gulp-nodemon.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
78
79
80
81
82
83
84
85
86
87
// Type definitions for gulp-nodemon
// Project: https://github.com/JacksonGariety/gulp-nodemon
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "gulp-nodemon" {
namespace nodemon {
interface Nodemon {
(option?: Option): EventEmitter;
}
interface Option extends _Option {
tasks?: string[]|((changedFiles: string[]) => string[]);
}
// TODO: Properties may be insufficient
// TODO: In future this interface should be moved to nodemon.d.ts
interface _Option {
env?: { [key: string]: string|boolean|number; };
script?: string;
/**
* Extensions to look for, ie. js,jade,hbs.
*/
ext?: string;
/**
* Execute script with "app", ie. -x "python -v".
*/
exec?: string;
/**
* Watch directory "dir" or files. use once for each directory or file to watch.
*/
watch?: string[];
/**
* Ignore specific files or directories.
*/
ignore?: string[];
/**
* Minimise nodemon messages to start/stop only.
*/
quiet?: boolean;
/**
* Show detail on what is causing restarts.
*/
verbose?: boolean;
/**
* Try to read from stdin.
*/
stdin?: boolean;
stdout?: boolean;
/**
* Execute script on change only, not startup
*/
runOnChangeOnly?: boolean;
/**
* Debounce restart in seconds.
*/
delay?: number;
/**
* Forces node to use the most compatible version for watching file changes.
*/
legacyWatch?: boolean;
/**
* Exit on crash, allows use of nodemon with daemon tools like forever.js.
*/
exitcrash?: boolean;
execMap?: { [key: string]: string|boolean|number; };
events?: { [key: string]: string; };
restartable?: string;
}
interface EventEmitter extends NodeJS.EventEmitter {
addListener(event: string, listener: Function): EventEmitter;
addListener(event: string, tasks: string[]): EventEmitter;
on(event: string, listener: Function): EventEmitter;
on(event: string, tasks: string[]): EventEmitter;
once(event: string, listener: Function): EventEmitter;
once(event: string, tasks: string[]): EventEmitter;
}
}
var nodemon: nodemon.Nodemon;
export = nodemon;
}