MCPcopy Create free account
hub / github.com/effect-app/libs / transformPull

Function transformPull

repos/effect/packages/effect/src/Stream.ts:642–654  ·  view source on GitHub ↗
(
  self: Stream<A, E, R>,
  f: (pull: Pull.Pull<Arr.NonEmptyReadonlyArray<A>, E, void>, scope: Scope.Scope) => Effect.Effect<
    Pull.Pull<Arr.NonEmptyReadonlyArray<B>, E2, void, R2>,
    EX,
    RX
  >
)

Source from the content-addressed store, hash-verified

640/**
641 * Creates a channel from a stream.
642 *
643 * **Example** (Converting a stream to a channel)
644 *
645 * ```ts import.meta.vitest
646 * import { Channel, Effect, Stream } from "effect"
647 *
648 * const channel = Stream.toChannel(Stream.make(1, 2, 3))
649 * const values = await Effect.runPromise(Channel.runCollect(channel))
650 * values.flat() // => [1, 2, 3]
651 * ```
652 *
653 * @category constructors
654 * @since 2.0.0
655 */
656export const toChannel = <A, E, R>(
657 stream: Stream<A, E, R>

Callers 1

Stream.tsFile · 0.70

Calls 2

fromChannelFunction · 0.70
fFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…