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

Function effectImpl

packages/effect/src/Layer.ts:1078–1082  ·  view source on GitHub ↗
(
  service: Context.Key<I, S>,
  effect: Effect<S, E, R>
)

Source from the content-addressed store, hash-verified

1076} as any
1077
1078const effectImpl = <I, S, E, R>(
1079 service: Context.Key<I, S>,
1080 effect: Effect<S, E, R>
1081): Layer<I, E, Exclude<R, Scope.Scope>> =>
1082 effectContext(internalEffect.map(effect, (value) => Context.make(service, value)))
1083
1084/**
1085 * Constructs a layer from an effect that produces all services in a `Context`.

Callers 1

Layer.tsFile · 0.85

Calls 3

effectContextFunction · 0.85
makeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected