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

Function start

repos/effect/packages/effect/src/Stream.ts:11167–11187  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

11165 async throw(error) {
11166 await closeAndReportError(Exit.die(error))
11167 throw error
11168 }
11169 }
11170 }
11171 })
11172)
11173
11174/**
11175 * Creates an effect that yields an `AsyncIterable` using the current services.
11176 *
11177 * **When to use**
11178 *
11179 * Use when the `AsyncIterable` should be created inside Effect with the current
11180 * context supplying the stream's services.
11181 *
11182 * **Example** (Creating an AsyncIterable effect)
11183 *
11184 * ```ts import.meta.vitest
11185 * import { Effect, Stream } from "effect"
11186 *
11187 * const stream = Stream.make(1, 2, 3)
11188 *
11189 * const program = Effect.gen(function*() {
11190 * const iterable = yield* Stream.toAsyncIterableEffect(stream)

Callers

nothing calls this directly

Calls 6

whenOpenMethod · 0.80
syncMethod · 0.80
addObserverMethod · 0.80
errorMethod · 0.80
closeMethod · 0.80
closeUnsafeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…