Created
May 25, 2020 17:56
-
-
Save linux-china/3d8d829e8b461587e260b58feec3da24 to your computer and use it in GitHub Desktop.
wait for TypeScript
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
function wait(ms: number):Promise<undefined> { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
await wait(1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment