Function: signalToPromise()
signalToPromise(
signal:AbortSignal):Promise<never>
Defined in: utils.ts:839
Converts an AbortSignal into a Promise that rejects when the signal is aborted.
The listener closure captures reject strongly and is held alive by the
signal, so the promise cannot be GC'd while the signal is alive. The
once option ensures the listener (and its reference to reject) is
released as soon as the signal fires.
Parameters
| Parameter | Type | Description |
|---|---|---|
signal | AbortSignal | AbortSignal to convert |
Returns
Promise<never>
Promise that rejects with the signal's reason when aborted