export type ProbedResourcePhase = 'idle' | 'loading' | 'refreshing';
export type ProbedResourceSnapshot<T> = Readonly<{
    phase: ProbedResourcePhase;
    data: T | null;
    dataUpdatedAt: number | null;
    error: unknown | null;
    errorUpdatedAt: number | null;
    isStale: boolean;
}>;
export declare class ProbedResourceCache<T> {
    #private;
    constructor(params: Readonly<{
        staleTimeMs: number;
        errorCooldownMs: number;
        nowMs?: () => number;
    }>);
    keys(): IterableIterator<string>;
    clear(): void;
    delete(key: string): void;
    read(key: string): Readonly<{
        data: T | null;
        dataUpdatedAt: number | null;
        error: unknown | null;
        errorUpdatedAt: number | null;
        inflight: Promise<T | null> | null;
    }> | null;
    getSnapshot(key: string, nowMs?: number): ProbedResourceSnapshot<T>;
    setSuccess(key: string, data: T, nowMs?: number): void;
    setError(key: string, error: unknown, nowMs?: number): void;
    subscribe(key: string, listener: () => void): () => void;
    ensure(key: string, fetcher: () => Promise<T>, opts?: Readonly<{
        force?: boolean;
        nowMs?: number;
    }>): Promise<T | null>;
}
//# sourceMappingURL=probedResourceCache.d.ts.map