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

Method forkOrCreate

packages/effect/src/Layer.ts:585–588  ·  view source on GitHub ↗
(self: Context.Context<Services>)

Source from the content-addressed store, hash-verified

583 */
584export class CurrentMemoMap extends Context.Service<CurrentMemoMap, MemoMap>()("effect/Layer/CurrentMemoMap") {
585 static forkOrCreate<Services>(self: Context.Context<Services>): MemoMap {
586 const current = Context.getOrUndefined(self, CurrentMemoMap)
587 return current ? forkMemoMapUnsafe(current) : makeMemoMapUnsafe()
588 }
589}
590
591/**

Callers 4

LayerMap.tsFile · 0.80
LayerRef.tsFile · 0.80
buildFunction · 0.80
Layer.tsFile · 0.80

Calls 2

forkMemoMapUnsafeFunction · 0.85
makeMemoMapUnsafeFunction · 0.85

Tested by

no test coverage detected