MCPcopy Create free account
hub / github.com/TanStack/query / setTimeout

Method setTimeout

packages/query-core/src/timeoutManager.ts:169–174  ·  view source on GitHub ↗

* `setTimeout` schedules a callback to run after approximately `delay` * milliseconds, like the global `setTimeout` function. The callback can be * canceled with `clearTimeout`. * * It returns a timer ID, which may be a number or an object that can be * coerced to a number via `Symbol

(callback: TimeoutCallback, delay: number)

Source from the content-addressed store, hash-verified

167 * ```
168 */
169 setTimeout(callback: TimeoutCallback, delay: number): ManagedTimerId {
170 if (process.env.NODE_ENV !== 'production') {
171 this.#providerCalled = true
172 }
173 return this.#provider.setTimeout(callback, delay)
174 }
175
176 /**
177 * `clearTimeout` cancels a timeout callback scheduled with `setTimeout`,

Callers 7

throttleFunction · 0.80
#updateStaleTimeoutMethod · 0.80
sleepFunction · 0.80
scheduleGcFunction · 0.80
asyncThrottleFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected