import { EventEmitter } from '../eventemitter'; import { Backoff } from './backoff'; import { BackoffStrategy } from './strategy/strategy'; export interface FunctionCallEvents { abort: () => void; backoff: (number: number, delay: number, err?: Error) => void; } export declare class FunctionCall extends EventEmitter { private state_; protected retryPredicate_: (err: any) => boolean; protected backoff_?: Backoff; protected numRetries_: number; protected lastResult_: any[]; protected callback_: Function; protected arguments_: any[]; protected function_: Function; protected failAfter_: number; protected strategy_?: BackoffStrategy; constructor(fn: Function, args: any[], callback: Function); static DEFAULT_RETRY_PREDICATE_(err: Error): boolean; isPending(): boolean; isRunning(): boolean; isCompleted(): boolean; isAborted(): boolean; setStrategy(strategy: BackoffStrategy): this; retryIf(retryPredicate: (err: any) => boolean): this; getLastResult(): any[]; getNumRetries(): number; getMaxNumOfRetries(): number; failAfter(maxNumberOfRetry: number): this; abort(): void; start(backoffFactory?: (arg0: BackoffStrategy) => Backoff): void; protected doCall_(isRetry: boolean): void; protected doCallback_(): void; protected handleFunctionCallback_(): void; protected handleBackoff_(number: number, delay: number, err?: Error): void; } //# sourceMappingURL=function_call.d.ts.map