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

Function makeRuntime

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

Source from the content-addressed store, hash-verified

223 * @since 2.0.0
224 */
225export const makeRuntime = <R, K, E = unknown, A = unknown>(): Effect.Effect<
226 <XE extends E, XA extends A>(
227 key: K,
228 effect: Effect.Effect<XA, XE, R>,
229 options?:
230 | Effect.RunOptions & {
231 readonly onlyIfMissing?: boolean | undefined
232 }
233 | undefined
234 ) => Fiber.Fiber<XA, XE>,
235 never,
236 Scope.Scope | R
237> =>
238 Effect.flatMap(
239 make<K, A, E>(),
240 (self) => runtime(self)<R>()
241 )
242
243/**
244 * 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