effect-io-ai

Package: effect
Module: Schedule

Schedule.check

Filters schedule executions based on a custom condition.

Details

This function modifies a schedule by applying a custom test function to each input-output pair. The test function determines whether the schedule should continue or stop. If the function returns true, the schedule proceeds as usual; if it returns false, the schedule terminates.

This is useful for conditional retries, custom stop conditions, or dynamically controlling execution based on observed inputs and outputs.

See

Signature

declare const check: { <In, Out>(test: (input: In, output: Out) => boolean): <R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>; <Out, In, R>(self: Schedule<Out, In, R>, test: (input: In, output: Out) => boolean): Schedule<Out, In, R>; }

Source

Since v2.0.0