MCPcopy
hub / github.com/anomalyco/opencode / body

Function body

packages/core/test/lib/effect.ts:9–9  ·  view source on GitHub ↗
(value: Body<A, E, R>)

Source from the content-addressed store, hash-verified

7type Body<A, E, R> = Effect.Effect<A, E, R> | (() => Effect.Effect<A, E, R>)
8
9const body = <A, E, R>(value: Body<A, E, R>) => Effect.suspend(() => (typeof value === "function" ? value() : value))
10
11const run = <A, E, R, E2>(value: Body<A, E, R | Scope.Scope>, layer: Layer.Layer<R, E2>) =>
12 Effect.gen(function* () {

Callers 8

runFunction · 0.70
withStoreFunction · 0.50
withToolFunction · 0.50
withToolFunction · 0.50
withRemoteFunction · 0.50
withToolFunction · 0.50
withRemoteFunction · 0.50
withToolFunction · 0.50

Calls 1

valueFunction · 0.50

Tested by 7

withStoreFunction · 0.40
withToolFunction · 0.40
withToolFunction · 0.40
withRemoteFunction · 0.40
withToolFunction · 0.40
withRemoteFunction · 0.40
withToolFunction · 0.40