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