Loading problem…
The promiseTimeout function wraps a Promise and rejects if it does not settle within a given time.
Implement promiseTimeout(promise, timeoutMs) which returns a new Promise. If the input promise resolves or rejects before the timeout, return its result. Otherwise, reject with new Error('Timeout').