Skip to main content
Version: v10.5.0

linkAbortSignal

Calls onAbort once when the signal of the caller aborts - right away when it is aborted already. The signal only triggers the abort controller HyperFetch keeps for the request, so it ends like request.abort() does. Returns the function that stops listening.


Import
import { linkAbortSignal } from "@hyper-fetch/core"

Parameters​

linkAbortSignal(signal: undefined | AbortSignal, onAbort: () => void)
Parameters
NameTypeDescription
signal
undefined | AbortSignal
onAbort
() => void

Returns​

() => void