@sinclair/hammer
Version:
Build Tool for Browser and Node Applications
19 lines (18 loc) • 755 B
TypeScript
export declare class Watcher {
private readonly watchers;
private readonly receiver;
private readonly sender;
private readonly debounce;
constructor(sourcePaths: string[]);
[Symbol.asyncIterator](): AsyncGenerator<string, void, unknown>;
/** Adds additional sourcePaths to watch. If the sourcePath already exists in this watchers set, then no action will be taken. */
add(sourcePaths: string[]): void;
/** Disposes of this watcher and terminates all internal watchers. */
dispose(): void;
private onChange;
private createLinuxDirectoryWatchers;
private createLinuxWatchers;
private createWindowsWatchers;
private createWatchers;
}
export declare function watch(sourcePaths: string[]): Watcher;