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

Function build

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

Source from the content-addressed store, hash-verified

739 * @since 2.0.0
740 */
741export const build = <RIn, E, ROut>(
742 self: Layer<ROut, E, RIn>
743): Effect<Context.Context<ROut>, E, RIn | Scope.Scope> =>
744 core.withFiber((fiber) =>
745 buildWithMemoMap(
746 self,
747 CurrentMemoMap.forkOrCreate(fiber.context),
748 Context.getUnsafe(fiber.context, Scope.Scope)
749 )
750 )
751
752/**
753 * Builds a layer using an explicit scope.

Callers 8

fromBuildFunction · 0.70
getOrElseMemoizeMethod · 0.70
launchFunction · 0.70
bundleFunction · 0.50
run.mjsFile · 0.50
bundleFunction · 0.50
bundleFunction · 0.50
run.mjsFile · 0.50

Calls 2

forkOrCreateMethod · 0.80
getUnsafeMethod · 0.45

Tested by

no test coverage detected