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

Interface LayerMap

packages/effect/src/LayerMap.ts:77–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 * @since 3.14.0
76 */
77export interface LayerMap<in out K, in out I, in out E = never> {
78 readonly [TypeId]: typeof TypeId
79
80 /**
81 * The internal RcMap that stores the resources.
82 */
83 readonly rcMap: RcMap.RcMap<K, Context.Context<I>, E>
84
85 /**
86 * Retrieves a Layer for the resources associated with the key.
87 */
88 get(key: K): Layer.Layer<I, E>
89
90 /**
91 * Retrieves the context associated with the key.
92 */
93 contextEffect(key: K): Effect.Effect<Context.Context<I>, E, Scope.Scope>
94
95 /**
96 * Invalidates the resource associated with the key.
97 */
98 invalidate(key: K): Effect.Effect<void>
99}
100
101/**
102 * Creates a `LayerMap` that dynamically provides resources based on a key.

Callers 18

loadExamplesFunction · 0.65
requestFunction · 0.65
resolvedRequestFunction · 0.65
parseOpenApiFunction · 0.65
visitFunction · 0.65
groupOperationsFunction · 0.65
renderGroupFunction · 0.65
LayerMap.test.tsFile · 0.80
ServiceFunction · 0.80
makeFunction · 0.65
OpenAiClient.tsFile · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected