Skip to content

Instantly share code, notes, and snippets.

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