Skip to content

delay() function

주어진 wait 시간만큼 값을 지연시킵니다.

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.