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

Function build

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

Source from the content-addressed store, hash-verified

697 * @since 2.0.0
698 */
699export const build = <RIn, E, ROut>(
700 self: Layer<ROut, E, RIn>
701): Effect<Context.Context<ROut>, E, RIn | Scope.Scope> =>
702 core.withFiber((fiber) =>
703 buildWithMemoMap(
704 self,
705 CurrentMemoMap.forkOrCreate(fiber.context),
706 Context.getUnsafe(fiber.context, Scope.Scope)
707 )
708 )
709
710/**
711 * Builds a layer using an explicit scope.

Callers 4

fromBuildFunction · 0.70
memoMapBuildFunction · 0.70
launchFunction · 0.70
groupFunction · 0.50

Calls 2

forkOrCreateMethod · 0.80
getUnsafeMethod · 0.80

Tested by

no test coverage detected