(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): interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<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))