import { Observations, RecordingFs, WatchEvent } from "../../bundler/fs.js";
import { Context, ErrorReason } from "./context.js";
export declare class Watcher {
    private watch;
    private readyCb;
    private bufferedEvents;
    private waiters;
    constructor(observations: Observations);
    update(observations: Observations): void;
    isWatched(watchedDirs: Set<string>, observedPath: string): boolean;
    ready(): Promise<void>;
    waitForEvent(): Promise<void>;
    drainEvents(): WatchEvent[];
    close(): Promise<void>;
}
export declare class FatalError extends Error {
    reason?: ErrorReason;
    constructor(reason?: ErrorReason, err?: any);
}
export declare class WatchContext implements Context {
    fs: RecordingFs;
    deprecationMessagePrinted: boolean;
    constructor(traceEvents: boolean);
    fatalError(_exitCode: number, reason?: ErrorReason, err?: any): Promise<never>;
}
//# sourceMappingURL=watch.d.ts.map