MCPcopy Index your code
hub / github.com/Effect-TS/effect / serviceWithEffect

Function serviceWithEffect

packages/effect/src/internal/sink.ts:1754–1757  ·  view source on GitHub ↗
(
  tag: Context.Tag<I, S>,
  f: (service: Types.NoInfer<S>) => Effect.Effect<Z, E, R>
)

Source from the content-addressed store, hash-verified

1752
1753/** @internal */
1754export const serviceWithEffect = <I, S, R, E, Z>(
1755 tag: Context.Tag<I, S>,
1756 f: (service: Types.NoInfer<S>) => Effect.Effect<Z, E, R>
1757): Sink.Sink<Z, unknown, never, E, R | I> => fromEffect(Effect.flatMap(tag, f))
1758
1759/** @internal */
1760export const serviceWithSink = <I, S, R, E, In, L, Z>(

Callers

nothing calls this directly

Calls 1

fromEffectFunction · 0.70

Tested by

no test coverage detected