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

Method setTimeout

packages/query-core/src/timeoutManager.ts:155–160  ·  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

153 * ```
154 */
155 setTimeout(callback: TimeoutCallback, delay: number): ManagedTimerId {
156 if (process.env.NODE_ENV !== 'production') {
157 this.#providerCalled = true
158 }
159 return this.#provider.setTimeout(callback, delay)
160 }
161
162 /**
163 * `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