(
step: Effect<
(now: number, input: Input) => Pull.Pull<[Output, Duration.Duration], ErrorX, Output, EnvX>,
Error,
Env
>
)
| 324 | * import { Duration, Effect, Schedule } from "effect" |
| 325 | * |
| 326 | * // Extract step function from an existing schedule |
| 327 | * const schedule = Schedule.exponential("100 millis").pipe(Schedule.upTo({ times: 3 })) |
| 328 | * |
| 329 | * const program = Effect.gen(function*() { |
| 330 | * const stepFn = yield* Schedule.toStep(schedule) |
| 331 | * |
| 332 | * // Use the step function directly for custom logic. The timestamp is |
| 333 | * // supplied by the caller, so tests can pass a deterministic value. |
| 334 | * const now = 0 |
| 335 | * return yield* stepFn(now, "input") |
| 336 | * }) |
| 337 | * |
| 338 | * await Effect.runPromise(program) // => [Duration.millis(100), Duration.millis(100)] |
| 339 | * ``` |
no outgoing calls
no test coverage detected
searching dependent graphs…