effect-io-ai

Package: effect
Module: Schedule

Schedule.resetWhen

Resets the schedule when the specified predicate on the schedule output evaluates to true.

Details

This function modifies a schedule so that it resets to its initial state whenever the provided predicate f returns true for an output value.

See

Signature

declare const resetWhen: { <Out>(f: Predicate<Out>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>; <Out, In, R>(self: Schedule<Out, In, R>, f: Predicate<Out>): Schedule<Out, In, R>; }

Source

Since v2.0.0