Created
September 13, 2022 14:01
-
-
Save Ref-Bit/991db76a437e7b95e8eb037dacd1945f to your computer and use it in GitHub Desktop.
Add custom delay to asynchronous calls
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
const delay = (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