Skip to content

delay() function

Delays the value by given wait time

Signature:

typescript
declare function delay(wait: number): Promise<void>;

Example

ts
await delay(1000);
console.log('hello'); // after 1000 milliseconds log hello

Open Source Code

Released under the Apache-2.0 License.