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

Function makeRuntime

packages/effect/src/FiberMap.ts:214–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212 * @since 2.0.0
213 */
214export const makeRuntime = <R, K, E = unknown, A = unknown>(): Effect.Effect<
215 <XE extends E, XA extends A>(
216 key: K,
217 effect: Effect.Effect<XA, XE, R>,
218 options?:
219 | Effect.RunOptions & {
220 readonly onlyIfMissing?: boolean | undefined
221 }
222 | undefined
223 ) => Fiber.Fiber<XA, XE>,
224 never,
225 Scope.Scope | R
226> =>
227 Effect.flatMap(
228 make<K, A, E>(),
229 (self) => runtime(self)<R>()
230 )
231
232/**
233 * Creates a scoped run function that forks effects into a new `FiberMap` and

Callers

nothing calls this directly

Calls 2

makeFunction · 0.70
runtimeFunction · 0.70

Tested by

no test coverage detected