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

Function serviceWithSink

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

Source from the content-addressed store, hash-verified

1758
1759/** @internal */
1760export const serviceWithSink = <I, S, R, E, In, L, Z>(
1761 tag: Context.Tag<I, S>,
1762 f: (service: Types.NoInfer<S>) => Sink.Sink<Z, In, L, E, R>
1763): Sink.Sink<Z, In, L, E, R | I> =>
1764 new SinkImpl(pipe(Effect.map(tag, (service) => toChannel(f(service))), channel.unwrap))
1765
1766/** @internal */
1767export const some = <In>(predicate: Predicate<In>): Sink.Sink<boolean, In, In> =>

Callers

nothing calls this directly

Calls 4

pipeFunction · 0.70
toChannelFunction · 0.70
mapMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected