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

Function suspend

packages/effect/src/Channel.ts:602–605  ·  view source on GitHub ↗
(
  evaluate: LazyArg<Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>>
)

Source from the content-addressed store, hash-verified

600 * @since 2.0.0
601 */
602export const suspend = <OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>(
603 evaluate: LazyArg<Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>>
604): Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env> =>
605 fromTransform((upstream, scope) => Effect.suspend(() => toTransform(evaluate())(upstream, scope)))
606
607/**
608 * Acquires a resource, uses it to build a `Channel`, and guarantees that

Callers 1

Channel.tsFile · 0.70

Calls 3

toTransformFunction · 0.85
fromTransformFunction · 0.70
evaluateFunction · 0.70

Tested by

no test coverage detected