Skip to content

delay

delay(ms: number): Promise<unknown>

Defined in: extras/delay.ts:12

Returns a promise that resolves after a specified delay in milliseconds.

Use cases:

  • General purpose delay in async workflows
  • Pausing execution for a set time
  • Useful for throttling, debouncing, or waiting for resources
ParameterTypeDescription
msnumberMilliseconds to delay

Promise<unknown>

Promise that resolves after the delay