export type CircuitState = 'closed' | 'open' | 'half_open';
export type CircuitBreakerOptions = {
    failureThreshold: number;
    resetTimeoutMs: number;
};
export declare class CircuitBreaker {
    private failures;
    private state;
    private openedAt;
    private readonly options;
    constructor(options?: Partial<CircuitBreakerOptions>);
    getState(): CircuitState;
    execute<T>(fn: () => Promise<T>): Promise<T>;
    private onSuccess;
    private onFailure;
}
