1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import { EventEmitter } from 'events';
|
10 | import Watcher = require('./Watcher');
|
11 |
|
12 | declare class Watchpack extends EventEmitter {
|
13 | aggregatedChanges: string[];
|
14 | aggregateTimeout: NodeJS.Timer;
|
15 | dirWatchers: Watcher[];
|
16 | fileWatchers: Watcher[];
|
17 | mtimes: {
|
18 | [path: string]: number;
|
19 | };
|
20 | options: Watchpack.WatchOptions;
|
21 | paused: boolean;
|
22 | watcherOptions: Watchpack.WatcherOptions;
|
23 |
|
24 | constructor(options: Watchpack.WatchOptions);
|
25 |
|
26 | watch(files: string[], directories: string[], startTime?: number): void;
|
27 |
|
28 | close(): void;
|
29 |
|
30 | pause(): void;
|
31 |
|
32 | getTimes(): {
|
33 | [path: string]: number;
|
34 | };
|
35 |
|
36 | _fileWatcher(file: string, watcher: Watcher): Watcher;
|
37 |
|
38 | _dirWatcher(item: string, watcher: Watcher): Watcher;
|
39 |
|
40 | _onChange(item: string, mtime: number, file?: string): void;
|
41 |
|
42 | _onTimeout(): void;
|
43 | }
|
44 |
|
45 | declare namespace Watchpack {
|
46 | interface WatcherOptions {
|
47 | ignored?: string[] | string | RegExp | ((path: string) => boolean);
|
48 | poll?: boolean | number;
|
49 | }
|
50 | interface WatchOptions extends WatcherOptions {
|
51 | aggregateTimeout?: number;
|
52 | }
|
53 | }
|
54 |
|
55 | export = Watchpack;
|
56 |
|
\ | No newline at end of file |