import { type AnzenAnyResult, type AnzenResultFn } from '@daisugi/anzen';
interface WithCircuitBreakerOpts {
    windowDurationMs?: number;
    totalBuckets?: number;
    failureThresholdRate?: number;
    volumeThreshold?: number;
    returnToServiceAfterMs?: number;
    isFailureResponse?(response: AnzenAnyResult<any, any>): boolean;
}
export declare function isFailureResponse(response: AnzenAnyResult<any, any>): boolean;
export declare function withCircuitBreaker(fn: AnzenResultFn<any, any>, opts?: WithCircuitBreakerOpts): (this: unknown, ...args: any[]) => Promise<AnzenAnyResult<any, any>>;
export {};
//# sourceMappingURL=with_circuit_breaker.d.ts.map