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

Function suspend

packages/effect/src/Layer.ts:1137–1138  ·  view source on GitHub ↗
(evaluate: LazyArg<Layer<A, E, R>>)

Source from the content-addressed store, hash-verified

1135 * @since 2.0.0
1136 */
1137export const suspend = <A, E, R>(evaluate: LazyArg<Layer<A, E, R>>): Layer<A, E, R> =>
1138 fromBuildMemo((memoMap, scope) => internalEffect.suspend(() => evaluate().build(memoMap, scope)))
1139
1140/**
1141 * Unwraps a `Layer` from an `Effect`, flattening the nested structure.

Callers

nothing calls this directly

Calls 3

fromBuildMemoFunction · 0.85
buildMethod · 0.80
evaluateFunction · 0.70

Tested by

no test coverage detected