Creates a Promise that rejects after ms milliseconds with an
error.
Example
Reject after 100ms
rejectAfterTimeout(100) .then(() =>console.log("then")) // this will never be called .catch(() =>console.log("catch")); // will be called after 100ms
Example
Reject after 100ms with "err"
rejectAfterTimeout(100, "err") .then(() =>console.log("then")) // this will never be called .catch((err) =>console.log(err)); // will be called after 100ms
Creates a Promise that rejects after
msmilliseconds with anerror.Example
Reject after 100ms
Example
Reject after 100ms with
"err"Returns
a Promise that rejects after
msmilliseconds