MCPcopy
hub / github.com/TanStack/query / setOnline

Method setOnline

packages/query-core/src/onlineManager.ts:55–64  ·  view source on GitHub ↗
(online: boolean)

Source from the content-addressed store, hash-verified

53 }
54
55 setOnline(online: boolean): void {
56 const changed = this.#online !== online
57
58 if (changed) {
59 this.#online = online
60 this.listeners.forEach((listener) => {
61 listener(online)
62 })
63 }
64 }
65
66 isOnline(): boolean {
67 return this.#online

Callers 6

setupDevtoolsFunction · 0.80
ContentViewFunction · 0.80
useOnlineManagerFunction · 0.80

Calls 1

listenerFunction · 0.50

Tested by

no test coverage detected