export type AsyncTtlCacheEntry<T> = Readonly<{
    kind: 'success';
    updatedAt: number;
    expiresAt: number;
    value: T;
}> | Readonly<{
    kind: 'error';
    updatedAt: number;
    expiresAt: number;
}>;
export declare class AsyncTtlCache<T> {
    #private;
    constructor(params: Readonly<{
        successTtlMs: number;
        errorTtlMs: number;
    }>);
    get(key: string): AsyncTtlCacheEntry<T> | null;
    keys(): IterableIterator<string>;
    delete(key: string): void;
    clear(): void;
    isFresh(entry: AsyncTtlCacheEntry<T>, nowMs?: number): boolean;
    setSuccess(key: string, value: T, params?: Readonly<{
        nowMs?: number;
        ttlMs?: number;
    }>): void;
    setError(key: string, params?: Readonly<{
        nowMs?: number;
        ttlMs?: number;
    }>): void;
    runDedupe<R>(key: string, run: () => Promise<R>): Promise<R>;
}
//# sourceMappingURL=asyncTtlCache.d.ts.map