MCPcopy Create free account
hub / github.com/Effect-TS/effect / toStep

Function toStep

packages/effect/src/Schedule.ts:344–354  ·  view source on GitHub ↗
(
  schedule: Schedule<Output, Input, Error, Env>
)

Source from the content-addressed store, hash-verified

342 * @since 4.0.0
343 */
344export const toStep = <Output, Input, Error, Env>(
345 schedule: Schedule<Output, Input, Error, Env>
346): Effect<
347 (now: number, input: Input) => Pull.Pull<[Output, Duration.Duration], Error, Output, Env>,
348 never,
349 Env
350> =>
351 effect.catchCause(
352 (schedule as any).step,
353 (cause) => effect.succeed(() => effect.failCause(cause) as any)
354 )
355
356/**
357 * Extracts a step function from a `Schedule` that sleeps for each computed

Callers 3

toStepWithMetadataFunction · 0.85
Schedule.tsFile · 0.85
passthroughFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected