rejectIfTimeout
Callable
Parameters
timeout: number
The timeout to enforced in milliseconds.
error: Error
The error to throw if the timeout is reached.
Returns [Timer, Promise<never>]
A tuple of the timeout id and the promise that will be rejected if the timeout is reached.
Enforce a timeout on a promise, so that it can be rejected if it takes too long to complete