MCPcopy Index your code
hub / github.com/Effect-TS/effect / toRuntime

Function toRuntime

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

runtimeMethod · 0.80
pipeFunction · 0.70

Tested by

no test coverage detected