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

Method get

packages/effect/src/Layer.ts:434–443  ·  view source on GitHub ↗
(
    layer: Layer<ROut, E, RIn>,
    scope: Scope.Scope
  )

Source from the content-addressed store, hash-verified

432 readonly map = new Map<Layer<any, any, any>, MemoMapEntry>()
433
434 get<RIn, E, ROut>(
435 layer: Layer<ROut, E, RIn>,
436 scope: Scope.Scope
437 ): Effect<Context.Context<ROut>, E, RIn> | undefined {
438 const local = this.map.get(layer)
439 if (local) {
440 return memoMapReuse(local, scope)
441 }
442 return this.parent?.get(layer, scope)
443 }
444
445 getOrElseMemoize<RIn, E, ROut>(
446 layer: Layer<ROut, E, RIn>,

Callers 1

getOrElseMemoizeMethod · 0.95

Calls 2

memoMapReuseFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected