| 75 | * @since 3.14.0 |
| 76 | */ |
| 77 | export 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. |
no outgoing calls
no test coverage detected