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

Function delay

examples/lit/basic/src/todoApi.ts:22–25  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

20let failNextMutation = false
21
22const delay = (ms: number): Promise<void> =>
23 new Promise((resolve) => {
24 setTimeout(resolve, ms)
25 })
26
27export async function fetchTodosFromServer(): Promise<TodosResponse> {
28 await delay(90)

Callers 6

fetchTodosFromServerFunction · 0.70
addTodoOnServerFunction · 0.70
respondWithFunction · 0.50
respondWithFunction · 0.50
projectsMockInterceptorFunction · 0.50
api.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected