MCPcopy Create free account
hub / github.com/effect-app/libs / fromStepWithMetadata

Function fromStepWithMetadata

repos/effect/packages/effect/src/Schedule.ts:374–384  ·  view source on GitHub ↗
(
  step: Effect<
    (options: InputMetadata<Input>) => Pull.Pull<[Output, Duration.Duration], ErrorX, Output, EnvX>,
    Error,
    Env
  >
)

Source from the content-addressed store, hash-verified

372 * @see {@link toStepWithSleep} for the same automatic sleeping behavior when only the schedule output is needed
373 *
374 * @category destructors
375 * @since 4.0.0
376 */
377export const toStepWithMetadata = <Output, Input, Error, Env>(
378 schedule: Schedule<Output, Input, Error, Env>
379): Effect<
380 (input: Input) => Pull.Pull<Metadata<Output, Input>, Error, Output, Env>,
381 never,
382 Env
383> =>
384 effect.clockWith((clock) =>
385 effect.map(
386 toStep(schedule),
387 (step) => {

Callers 6

durationFunction · 0.85
Schedule.tsFile · 0.85
exponentialFunction · 0.85
fixedFunction · 0.85
spacedFunction · 0.85
windowedFunction · 0.85

Calls 5

fromStepFunction · 0.85
metadataFnFunction · 0.85
metaFunction · 0.85
mapMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…