Skip to content

Instantly share code, notes, and snippets.

@dfmartin
Created September 27, 2019 20:53
Show Gist options
  • Save dfmartin/d6e0ef3310971817ea4d94ee3cf0a30a to your computer and use it in GitHub Desktop.
Save dfmartin/d6e0ef3310971817ea4d94ee3cf0a30a to your computer and use it in GitHub Desktop.
typescript async sleep
const sleep = (ms: number) => {
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