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

Function backingGet

packages/cluster/src/internal/resourceMap.ts:101–107  ·  view source on GitHub ↗
(map: BackingMap<K, A, E>, key: K)

Source from the content-addressed store, hash-verified

99}
100
101const backingGet = <K, A, E>(map: BackingMap<K, A, E>, key: K): Entry<A, E> | undefined => {
102 if (map._tag === "Referential") {
103 return map.map.get(key)
104 }
105 const entry = MutableHashMap.get(map.map, key)
106 return entry._tag === "Some" ? entry.value : undefined
107}
108
109const backingSet = <K, A, E>(map: BackingMap<K, A, E>, key: K, entry: Entry<A, E>): void => {
110 if (map._tag === "Referential") {

Callers 2

getMethod · 0.85
removeMethod · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected