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

Function effectImpl

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

Source from the content-addressed store, hash-verified

1027} as any
1028
1029const effectImpl = <I, S, E, R>(
1030 service: Context.Key<I, S>,
1031 effect: Effect<S, E, R>
1032): Layer<I, E, Exclude<R, Scope.Scope>> =>
1033 effectContext(internalEffect.map(effect, (value) => Context.make(service, value)))
1034
1035/**
1036 * 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