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

Function event

packages/effect/src/ui/Query.ts:6487–6503  ·  view source on GitHub ↗
(page: PageRef | undefined)

Source from the content-addressed store, hash-verified

6485 const existing = lookup(registered, argsKey)
6486 const logKey = () => registered.logKey(args, argsKey)
6487 const event = (page: PageRef | undefined): void => {
6488 if (existing !== undefined) {
6489 return emitFetch(existing, "get", false, false, page, parent)
6490 }
6491 if (fetchListeners.size === 0) return
6492 notify<FetchEvent>(fetchListeners, {
6493 query: registered.name,
6494 logKey: logKey(),
6495 trigger: "get",
6496 restart: false,
6497 inWindow: false,
6498 stored: false,
6499 empty: true,
6500 ...pageFields(page),
6501 ...spanFields(parent)
6502 })
6503 }
6504 if (existing !== undefined) resetIdle(existing)
6505 const list = registered.list
6506 const build = buildOf(fetcher)

Callers 2

getFunction · 0.70
updateFunction · 0.50

Calls 5

emitFetchFunction · 0.85
logKeyFunction · 0.85
pageFieldsFunction · 0.85
spanFieldsFunction · 0.85
notifyFunction · 0.70

Tested by

no test coverage detected