MCPcopy Create free account
hub / github.com/effect-app/libs / atomsForKeys

Function atomsForKeys

packages/vue/src/atomQuery.ts:109–116  ·  view source on GitHub ↗
(keys: ReadonlyArray<unknown>)

Source from the content-addressed store, hash-verified

107 get.addFinalizer(() => clearQueryReadDependencies(key))
108 return get(atom)
109 }, { initialValueTarget: atom })
110
111const atomsForKeys = (keys: ReadonlyArray<unknown>): ReadonlyArray<Atom.Atom<AsyncResult.AsyncResult<any, any>>> => {
112 const atoms = new Set<Atom.Atom<AsyncResult.AsyncResult<any, any>>>()
113 for (const key of keys) {
114 const set = keyAtoms.get(Hash.hash(key))
115 if (set) { for (const a of set) atoms.add(a) }
116 }
117 return [...atoms]
118}
119

Callers 1

invalidateAndAwaitFunction · 0.85

Calls 2

getMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…