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

Function makeRuntimePromise

repos/effect/packages/effect/src/FiberHandle.ts:237–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235 *
236 * const program = Effect.gen(function*() {
237 * const run = yield* FiberHandle.makeRuntimePromise()
238 *
239 * // Run effects and get promises back
240 * const promise = run(Effect.succeed("hello"))
241 * return yield* Effect.promise(() => promise)
242 * }).pipe(Effect.scoped)
243 *
244 * const actual = await Effect.runPromise(program)
245 * actual // => "hello"
246 * ```
247 *
248 * @category constructors
249 * @since 3.13.0
250 */
251export const makeRuntimePromise = <R = never, A = unknown, E = unknown>(): Effect.Effect<
252 <XE extends E, XA extends A>(
253 effect: Effect.Effect<XA, XE, R>,
254 options?: {
255 readonly signal?: AbortSignal | undefined
256 readonly scheduler?: Scheduler | undefined

Callers

nothing calls this directly

Calls 2

makeFunction · 0.70
runtimePromiseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…