The resolved value type of the wrapped function.
The async function to execute. Receives an AbortSignal
that fires when the timeout elapses.
Maximum allowed duration in milliseconds.
The value returned by fn, if it resolves in time.
TimeoutError if ms elapses before fn resolves.
Executes an async function with a timeout.
If the function does not resolve within
msmilliseconds, the returned promise rejects with a TimeoutError. If anAbortSignalis provided it is aborted on timeout, allowing the wrapped operation to clean up.