2621. Sleep ¶ TypeScript 1 2 3 4 5async function sleep(millis: number): Promise<void> { return new Promise((resolve) => { setTimeout(resolve, millis); }); } Was this page helpful? Thanks for your feedback! Thanks for your feedback! Help us improve this page by using our feedback form.