(parent: MemoMap): Effect<MemoMap>Constructs a child MemoMap effectfully, allowing it to reuse layers already
memoized in the parent while isolating any new layer allocations to the child
map.
When to use
Use when a layer build should inherit already memoized layers from an
existing MemoMap while keeping newly memoized layers out of the parent map.
export const const forkMemoMap: (
parent: MemoMap
) => Effect<MemoMap>
Constructs a child MemoMap effectfully, allowing it to reuse layers already
memoized in the parent while isolating any new layer allocations to the child
map.
When to use
Use when a layer build should inherit already memoized layers from an
existing MemoMap while keeping newly memoized layers out of the parent map.
forkMemoMap = (parent: MemoMap(parameter) parent: {
get: <RIn, E, ROut>(layer: Layer<ROut, E, RIn>, scope: Scope.Scope) => Effect<Context.Context<ROut>, E, RIn> | undefined;
getOrElseMemoize: <RIn, E, ROut>(layer: Layer<ROut, E, RIn>, scope: Scope.Scope, build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<ROut>, E, RIn>) => Effect<Context.Context<ROut>, E, RIn>;
}
parent: MemoMap): import EffectEffect<MemoMap> => import internalEffectinternalEffect.const sync: <A>(
thunk: LazyArg<A>
) => Effect.Effect<A>
sync(() => const forkMemoMapUnsafe: (
parent: MemoMap
) => MemoMap
Constructs a child MemoMap synchronously, allowing it to reuse layers
already memoized in the parent while isolating any new layer allocations to
the child map.
When to use
Use to synchronously fork a memo map for manual layer building when child
builds should see parent memoized layers without writing newly built layers
back to the parent.
forkMemoMapUnsafe(parent: MemoMap(parameter) parent: {
get: <RIn, E, ROut>(layer: Layer<ROut, E, RIn>, scope: Scope.Scope) => Effect<Context.Context<ROut>, E, RIn> | undefined;
getOrElseMemoize: <RIn, E, ROut>(layer: Layer<ROut, E, RIn>, scope: Scope.Scope, build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<ROut>, E, RIn>) => Effect<Context.Context<ROut>, E, RIn>;
}
parent))