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

Function captureAtomQueryParentSpan

packages/vue/src/atomQuery.ts:261–267  ·  view source on GitHub ↗
(
  atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>
)

Source from the content-addressed store, hash-verified

259
260const atomQueryMetadata = new WeakMap<Atom.Atom<AsyncResult.AsyncResult<any, any>>, AtomQueryMetadata>()
261const atomQueryParentSpans = new WeakMap<Atom.Atom<AsyncResult.AsyncResult<any, any>>, Tracer.AnySpan>()
262const atomQueryKeys = new WeakMap<Atom.Atom<AsyncResult.AsyncResult<any, any>>, ReadonlyArray<unknown>>()
263
264export const queryKeyForAtom = <A, E>(
265 atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>
266): ReadonlyArray<unknown> | undefined => atomQueryKeys.get(atom)
267
268const atomSpanTarget = <A, E>(atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>) => {
269 let target = atom
270 while (target.initialValueTarget !== undefined) {

Callers 1

Calls 3

setAtomQueryParentSpanFunction · 0.85
syncMethod · 0.80
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…