Hyperlinkv0.8.0-beta.28

Channel

Channel.fromEffectTakeconsteffect/Channel.ts:1166
<A, E, Done, E2, R>(
  effect: Effect.Effect<Take.Take<A, E, Done>, E2, R>
): Channel<
  Arr.NonEmptyReadonlyArray<A>,
  E | E2,
  Done,
  unknown,
  unknown,
  unknown,
  R
>

Creates a channel from an effect that produces a Take.

Details

A successful Take emits a non-empty array of output elements. A failed Take fails the channel. A done Take completes the channel with its done value.

constructors
export const fromEffectTake = <A, E, Done, E2, R>(
  effect: Effect.Effect<Take.Take<A, E, Done>, E2, R>
): Channel<Arr.NonEmptyReadonlyArray<A>, E | E2, Done, unknown, unknown, unknown, R> =>
  fromPull(Effect.succeed(Effect.flatMap(effect, Take.toPull)))
Referenced by 2 symbols