MCPcopy
hub / github.com/fingerprintjs/fingerprintjs / wait

Function wait

src/utils/async.ts:3–5  ·  view source on GitHub ↗
(durationMs: number, resolveWith?: T)

Source from the content-addressed store, hash-verified

1export type MaybePromise<T> = Promise<T> | T
2
3export function wait<T = void>(durationMs: number, resolveWith?: T): Promise<T> {
4 return new Promise((resolve) => setTimeout(resolve, durationMs, resolveWith))
5}
6
7/**
8 * Allows asynchronous actions and microtasks to happen.

Callers 7

agent.test.tsFile · 0.90
async.test.tsFile · 0.90
sourceFunction · 0.90
withIframeFunction · 0.90
getBlockedSelectorsFunction · 0.90

Calls

no outgoing calls

Tested by 1

sourceFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…