import watcher from '@parcel/watcher';
export type FileChangeHandler = (events: watcher.Event[]) => Promise<void>;
type FileWatcherOptions = watcher.Options & {
    debounceMs?: number;
};
/**
 * Wraps the Parcel file watcher to ensure errors can be catched in an async/await fashion
 */
export declare class FileWatcher {
    private _subscription;
    private _errorEmitter;
    static watch(dir: string, fn: FileChangeHandler, opt?: FileWatcherOptions): Promise<FileWatcher>;
    private constructor();
    close(): Promise<void>;
    wait: () => Promise<unknown>;
}
export {};
