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

Function passthrough

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

Source from the content-addressed store, hash-verified

1123 * @since 2.0.0
1124 */
1125export const passthrough = <Output, Input, Error, Env>(
1126 self: Schedule<Output, Input, Error, Env>
1127): Schedule<Input, Input, Error, Env> =>
1128 fromStep(effect.map(toStep(self), (step) => (now, input) =>
1129 Pull.matchEffect(step(now, input), {
1130 onSuccess: (result) => effect.succeed([input, result[1]]),
1131 onFailure: effect.failCause,
1132 onDone: () => Cause.done(input)
1133 })))
1134
1135/**
1136 * Returns a `Schedule` which can only be stepped the specified number of

Callers

nothing calls this directly

Calls 6

fromStepFunction · 0.85
toStepFunction · 0.85
stepFunction · 0.70
mapMethod · 0.45
succeedMethod · 0.45
doneMethod · 0.45

Tested by

no test coverage detected