Function wrapPromiseInTimeout
- wrapPromiseInTimeout<T>(duration, originalPromise, failureMessage?): Promise<T>
Parameters
- duration: Readonly<Partial<Record<DurationUnit, undefined | number>>>
- originalPromise: PromiseLike<T>
Optional
failureMessage: string
Returns Promise<T>
Wraps an already-created Promise in a timeout, causing a rejection if the original Promise isn't resolved by then.