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

Function transformPullBracket

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

Source from the content-addressed store, hash-verified

691 * @category constructors
692 * @since 4.0.0
693 */
694export const callback = <A, E = never, R = never>(
695 f: (queue: Queue.Queue<A, E | Cause.Done>) => Effect.Effect<unknown, E, R | Scope.Scope>,
696 options?: {
697 readonly bufferSize?: number | undefined
698 readonly strategy?: "sliding" | "dropping" | "suspend" | undefined
699 }
700): Stream<A, E, Exclude<R, Scope.Scope>> => fromChannel(Channel.callbackArray(f, options))
701
702/**
703 * Creates an empty stream.
704 *
705 * **Example** (Creating an empty stream)
706 *
707 * ```ts import.meta.vitest
708 * import { Effect, Stream } from "effect"
709 *
710 * await Effect.runPromise(Stream.runCollect(Stream.empty)) // => []
711 * ```
712 *

Callers 1

Stream.tsFile · 0.85

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…