import type { CircuitBreakerOptions, CircuitBreakerHandle } from '../types.js'; /** * Creates a circuit breaker policy that prevents calls to a failing service. * * Returns an object with `execute` (the policy function) and `handle` * (an interface to inspect / reset the breaker state). * * @example * ```ts * const cb = circuitBreaker({ failureThreshold: 3, resetTimeout: 10_000 }); * const result = await cb.execute(() => callApi()); * console.log(cb.handle.state); // 'closed' * ``` */ export declare function circuitBreaker(options?: CircuitBreakerOptions): { execute: (fn: () => Promise) => Promise; handle: CircuitBreakerHandle; }; //# sourceMappingURL=circuit-breaker.d.ts.map