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

Function sleep

packages/query-core/src/utils.ts:530–534  ·  view source on GitHub ↗
(timeout: number)

Source from the content-addressed store, hash-verified

528 * @returns A promise that resolves after `timeout` milliseconds.
529 */
530export function sleep(timeout: number): Promise<void> {
531 return new Promise((resolve) => {
532 timeoutManager.setTimeout(resolve, timeout)
533 })
534}
535
536/**
537 * Applies a query's `structuralSharing` option when writing new data.

Callers 2

runFunction · 0.90
utils.test-d.tsxFile · 0.90

Calls 1

setTimeoutMethod · 0.80

Tested by

no test coverage detected