Last active
February 2, 2023 19:03
-
-
Save ericorruption/bbf768cb6216414c9a2f720557a7f580 to your computer and use it in GitHub Desktop.
Sleep() async/await in typescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment