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

Function memoMapReuse

packages/effect/src/Layer.ts:241–250  ·  view source on GitHub ↗
(
  entry: MemoMapEntry,
  scope: Scope.Scope
)

Source from the content-addressed store, hash-verified

239}
240
241const memoMapReuse = <RIn, E, ROut>(
242 entry: MemoMapEntry,
243 scope: Scope.Scope
244): Effect<Context.Context<ROut>, E, RIn> => {
245 entry.observers++
246 return internalEffect.andThen(
247 internalEffect.scopeAddFinalizerExit(scope, (exit) => entry.finalizer(exit)),
248 entry.effect
249 )
250}
251
252/**
253 * Returns `true` if the specified value is a `Layer`, `false` otherwise.

Callers 1

getMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected