Created
March 29, 2020 10:41
-
-
Save jdjuan/a388467db05594efdd9ff2d4a0e886c2 to your computer and use it in GitHub Desktop.
Improve readability of setTimeout(fn, 0)
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
wait(): Promise<void> { | |
return new Promise((resolve: () => void): void => { | |
setTimeout(resolve); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment