Created
August 26, 2020 12:07
-
-
Save b4n92uid/819aba5465e9d9cb2829f5183007bb28 to your computer and use it in GitHub Desktop.
Promised 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
export default function sleep(ms: number): Promise<void> { | |
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