Hyperlinkv0.8.0-beta.28

Sink

Sink.provideContextconsteffect/Sink.ts:1957
<Provided>(context: Context.Context<Provided>): <A, In, L, E, R>(
  self: Sink<A, In, L, E, R>
) => Sink<A, In, L, E, Exclude<R, Provided>>
<A, In, L, E, R, Provided>(
  self: Sink<A, In, L, E, R>,
  context: Context.Context<Provided>
): Sink<A, In, L, E, Exclude<R, Provided>>

Provides a Context to this sink.

Details

Services contained in the provided context are removed from the sink's service requirements.

services
Source effect/Sink.ts:195717 lines
export const provideContext: {
  <Provided>(
    context: Context.Context<Provided>
  ): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E, Exclude<R, Provided>>
  <A, In, L, E, R, Provided>(
    self: Sink<A, In, L, E, R>,
    context: Context.Context<Provided>
  ): Sink<A, In, L, E, Exclude<R, Provided>>
} = dual(2, <A, In, L, E, R, Provided>(
  self: Sink<A, In, L, E, R>,
  context: Context.Context<Provided>
): Sink<A, In, L, E, Exclude<R, Provided>> =>
  fromTransform((upstream, scope) =>
    self.transform(upstream, scope).pipe(
      Effect.provideContext(context)
    )
  ))