Created
September 27, 2019 20:53
-
-
Save dfmartin/d6e0ef3310971817ea4d94ee3cf0a30a to your computer and use it in GitHub Desktop.
typescript async sleep
This file contains 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
const sleep = (ms: number) => { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment