MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeRuntimePromise

Function makeRuntimePromise

packages/effect/src/FiberHandle.ts:251–267  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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
257 readonly onlyIfMissing?: boolean | undefined
258 readonly propagateInterruption?: boolean | undefined
259 } | undefined
260 ) => Promise<XA>,
261 never,
262 Scope.Scope | R
263> =>
264 Effect.flatMap(
265 make<A, E>(),
266 (self) => runtimePromise(self)<R>()
267 )
268
269const internalFiberId = -1
270const isInternalInterruption = Filter.toPredicate(Filter.compose(

Callers

nothing calls this directly

Calls 2

makeFunction · 0.70
runtimePromiseFunction · 0.70

Tested by

no test coverage detected