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

Method forkOrCreate

packages/effect/src/Layer.ts:622–628  ·  view source on GitHub ↗
(
    self: Context.Context<Services>,
    options?: { readonly fresh?: Iterable<Layer<any, any, any>> | undefined }
  )

Source from the content-addressed store, hash-verified

620 */
621export class CurrentMemoMap extends Context.Service<CurrentMemoMap, MemoMap>()("effect/Layer/CurrentMemoMap") {
622 static forkOrCreate<Services>(
623 self: Context.Context<Services>,
624 options?: { readonly fresh?: Iterable<Layer<any, any, any>> | undefined }
625 ): MemoMap {
626 const current = Context.getOrUndefined(self, CurrentMemoMap)
627 return current ? forkMemoMapUnsafe(current, options) : makeMemoMapUnsafe()
628 }
629}
630
631/**

Callers 7

LayerMap.tsFile · 0.80
LayerRef.tsFile · 0.80
buildFunction · 0.80
Layer.tsFile · 0.80
toHttpEffectFunction · 0.80
serveFunction · 0.80
memoMapOfFunction · 0.80

Calls 2

forkMemoMapUnsafeFunction · 0.85
makeMemoMapUnsafeFunction · 0.85

Tested by

no test coverage detected