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

Function captureRequirements

packages/effect/src/ExecutionPlan.ts:287–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

285const Proto: Omit<ExecutionPlan<any>, "steps"> = {
286 [TypeId]: TypeId,
287 get captureRequirements() {
288 const self = this as any as ExecutionPlan<any>
289 return effect.contextWith((context: Context.Context<any>) =>
290 effect.succeed(makeProto(self.steps.map((step) => ({
291 ...step,
292 provide: Layer.isLayer(step.provide)
293 ? Layer.provide(step.provide, Layer.succeedContext(context))
294 : step.provide
295 })) as any))
296 )
297 },
298 pipe() {
299 return pipeArguments(this, arguments)
300 }

Callers

nothing calls this directly

Calls 4

makeProtoFunction · 0.70
succeedMethod · 0.45
mapMethod · 0.45
provideMethod · 0.45

Tested by

no test coverage detected