Formatting and testing

This commit is contained in:
Nick Alteen
2023-09-15 12:32:25 -04:00
parent 8530abdd1e
commit 5d385f5f67
8 changed files with 10613 additions and 48 deletions

12
src/wait.ts Normal file
View File

@@ -0,0 +1,12 @@
/**
* Wait for a number of milliseconds. Resolves with 'done!' after the wait time.
*/
export async function wait(milliseconds: number): Promise<string> {
return new Promise(resolve => {
if (isNaN(milliseconds)) {
throw new Error('milliseconds not a number')
}
setTimeout(() => resolve('done!'), milliseconds)
})
}