mirror of
https://github.com/actions/typescript-action.git
synced 2025-12-14 14:11:37 +00:00
update with tests
This commit is contained in:
10
src/wait.ts
Normal file
10
src/wait.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export function wait(milliseconds) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (typeof(milliseconds) !== 'number') {
|
||||
throw new Error('milleseconds not a number');
|
||||
}
|
||||
|
||||
setTimeout(() => resolve("done!"), milliseconds)
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user