1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import * as File from "vinyl";
|
9 | import { SrcOptions } from "vinyl-fs";
|
10 |
|
11 | interface IOptions extends SrcOptions {
|
12 | ignoreInitial?: boolean | undefined;
|
13 | events?: Array<string> | undefined;
|
14 | base?: string | undefined;
|
15 | name?: string | undefined;
|
16 | verbose?: boolean | undefined;
|
17 | readDelay?: number | undefined;
|
18 | }
|
19 |
|
20 | interface IWatchStream extends NodeJS.ReadWriteStream {
|
21 | add(path: string | Array<string>): NodeJS.ReadWriteStream;
|
22 | unwatch(path: string | Array<string>): NodeJS.ReadWriteStream;
|
23 | close(): NodeJS.ReadWriteStream;
|
24 | }
|
25 |
|
26 | type Cb = (file: File & { event: "add" | "change" | "unlink" }) => void;
|
27 |
|
28 | declare function watch(glob: string | Array<string>, callback?: Cb): IWatchStream;
|
29 | declare function watch(glob: string | Array<string>, options?: IOptions, callback?: Cb): IWatchStream;
|
30 | declare namespace watch { }
|
31 | export = watch;
|