mirror of
https://github.com/actions/javascript-action.git
synced 2025-12-10 20:56:57 +00:00
Co-authored-by: Frieder Bluemle <frieder.bluemle@gmail.com>
This commit is contained in:
11
wait.js
11
wait.js
@@ -1,11 +1,10 @@
|
||||
let wait = function(milliseconds) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (typeof(milliseconds) !== 'number') {
|
||||
throw new Error('milleseconds not a number');
|
||||
let wait = function (milliseconds) {
|
||||
return new Promise((resolve) => {
|
||||
if (typeof milliseconds !== 'number') {
|
||||
throw new Error('milliseconds not a number');
|
||||
}
|
||||
|
||||
setTimeout(() => resolve("done!"), milliseconds)
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = wait;
|
||||
|
||||
Reference in New Issue
Block a user