You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
380 B
TypeScript
18 lines
380 B
TypeScript
import type { Stats } from 'fs';
|
|
import type { EventEmitter } from 'events';
|
|
|
|
export default class CheapWatch extends EventEmitter {
|
|
dir: string;
|
|
filter?: Filter;
|
|
watch: boolean;
|
|
debounce: number;
|
|
paths: Map<string, Stats>;
|
|
constructor(data: object);
|
|
init(): Promise<void>;
|
|
close(): void;
|
|
}
|
|
|
|
interface Filter {
|
|
(file: { path: string; stats: Stats }): Promise<boolean>;
|
|
}
|