///
import { EventEmitter } from 'events';
export declare type PossibleFunctions = (() => void) | (() => Promise);
export declare type ConditionRunnerOptions = {
/** Functions that are run periodically and must
* return true or resolve true for runner to continue working */
runConditions?: Array;
/** Time in milliseconds. Default 10 sec. */
rate?: number;
/** The function to call when runConditions all become true */
startHandle: PossibleFunctions;
/** The function to call when runConditions all become false */
stopHandle: PossibleFunctions;
};
export default class ConditionRunner extends EventEmitter {
stopped: boolean;
rate: number;
runConditions: Array;
passes: boolean;
startHandle: PossibleFunctions;
stopHandle: PossibleFunctions;
private loopTimeout;
constructor(options: ConditionRunnerOptions);
private isPassingChecks;
private keepRunningChecks;
start(): Promise;
stop(): void;
}