Functions
getAbortablePromise
getAbortablePromise<
T
>(promise
,abortSignal?
):Promise
<T
>
Returns a new promise that will reject if the abort signal fires before the original promise settles. Resolves or rejects with the value of the original promise otherwise.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
promise | Promise <T > |
abortSignal? | AbortSignal |
Returns
Promise
<T
>