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

Function toRuntime

packages/effect/src/internal/layer.ts:1086–1097  ·  view source on GitHub ↗
(
  self: Layer.Layer<ROut, E, RIn>
)

Source from the content-addressed store, hash-verified

1084
1085/** @internal */
1086export const toRuntime = <RIn, E, ROut>(
1087 self: Layer.Layer<ROut, E, RIn>
1088): Effect.Effect<Runtime.Runtime<ROut>, E, RIn | Scope.Scope> =>
1089 pipe(
1090 fiberRuntime.scopeWith((scope) => buildWithScope(self, scope)),
1091 core.flatMap((context) =>
1092 pipe(
1093 runtime.runtime<ROut>(),
1094 core.provideContext(context)
1095 )
1096 )
1097 )
1098
1099/** @internal */
1100export const toRuntimeWithMemoMap = dual<

Callers

nothing calls this directly

Calls 2

runtimeMethod · 0.80
pipeFunction · 0.70

Tested by

no test coverage detected