Skip to content

Instantly share code, notes, and snippets.

@Fredkiss3
Created April 25, 2023 16:47
Show Gist options
  • Save Fredkiss3/1bbdd4c162e7a07efdfe74e2e9ba7aac to your computer and use it in GitHub Desktop.
Save Fredkiss3/1bbdd4c162e7a07efdfe74e2e9ba7aac to your computer and use it in GitHub Desktop.
a simple utility function for waiting a certain amount of time, in TS
export function wait(ms: number): Promise<void> {
// Wait for the specified amount of time
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