API reference@evolu/commonSchedule › repetitions

function repetitions<Output, Input>(
  schedule: Schedule<Output, Input>,
): Schedule<number, Input>;

Defined in: packages/common/src/Schedule.ts:1095

Wraps a schedule to output the number of repetitions instead of original output.

Outputs 0, 1, 2, ... while preserving the underlying schedule's timing and termination behavior.

Example

// Track how many retries occurred
const counted = repetitions(exponential("100ms"));
// Outputs: 0, 1, 2, ... with exponential delays