@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
26 lines • 1.12 kB
TypeScript
import type { Discardable, SerialisedAbility } from '../../abilities';
import { Ability } from '../../abilities';
import type { Clock, DelayedCallback, Duration, RepeatUntilLimits } from '../models';
/**
* An [`Ability`](https://serenity-js.org/api/core/class/Ability/) that enables an [`Actor`](https://serenity-js.org/api/core/class/Actor/) to schedule a callback function
* to be executed with a delay, or until some condition is met.
*
* Used internally by the [interaction](https://serenity-js.org/api/core/class/Interaction/) to [`Wait`](https://serenity-js.org/api/core/class/Wait/).
*
* @experimental
*
* @group Time
*/
export declare class ScheduleWork extends Ability implements Discardable {
private readonly scheduler;
constructor(clock: Clock, interactionTimeout: Duration);
/**
* @param callback
* @param limits
*/
repeatUntil<Result>(callback: DelayedCallback<Result>, limits?: RepeatUntilLimits<Result>): Promise<Result>;
waitFor(delay: Duration): Promise<void>;
discard(): void;
toJSON(): SerialisedAbility;
}
//# sourceMappingURL=ScheduleWork.d.ts.map