| [9af201e] | 1 | /// <reference types="node" />
|
|---|
| 2 | import { EventEmitter } from 'events';
|
|---|
| 3 | interface WatchFileSystemOptions {
|
|---|
| 4 | aggregateTimeout: number;
|
|---|
| 5 | poll: boolean;
|
|---|
| 6 | followSymlinks: boolean;
|
|---|
| 7 | ignored: string | RegExp | Function | (string | RegExp | Function)[];
|
|---|
| 8 | }
|
|---|
| 9 | interface Watchpack extends EventEmitter {
|
|---|
| 10 | _onChange(item: string, mtime: number, file: string, type?: string): void;
|
|---|
| 11 | _onRemove(item: string, file: string, type?: string): void;
|
|---|
| 12 | }
|
|---|
| 13 | interface WatcherV4 {
|
|---|
| 14 | close(): void;
|
|---|
| 15 | pause(): void;
|
|---|
| 16 | getFileTimestamps(): Map<string, number>;
|
|---|
| 17 | getContextTimestamps(): Map<string, number>;
|
|---|
| 18 | }
|
|---|
| 19 | interface WatcherV5 {
|
|---|
| 20 | close(): void;
|
|---|
| 21 | pause(): void;
|
|---|
| 22 | getFileTimeInfoEntries(): Map<string, number>;
|
|---|
| 23 | getContextTimeInfoEntries(): Map<string, number>;
|
|---|
| 24 | }
|
|---|
| 25 | declare type Watcher = WatcherV4 | WatcherV5;
|
|---|
| 26 | interface WatchFileSystem {
|
|---|
| 27 | watcher: Watchpack;
|
|---|
| 28 | wfs?: {
|
|---|
| 29 | watcher: Watchpack;
|
|---|
| 30 | };
|
|---|
| 31 | watch(files: Iterable<string>, dirs: Iterable<string>, missing: Iterable<string>, startTime?: number, options?: Partial<WatchFileSystemOptions>, callback?: Function, callbackUndelayed?: Function): Watcher;
|
|---|
| 32 | }
|
|---|
| 33 | export { WatchFileSystem, WatchFileSystemOptions, Watchpack, WatcherV4, WatcherV5, Watcher };
|
|---|