Skip to main content

index/functions/armTimeout.md

armTimeout(controller, timeoutMs): () => void

Arms the abort timer for a request. Infinity means "never time out": setTimeout would turn it into 1 ms, so no timer is armed at all. Returns a function that disarms it.

Parameters​

ParameterType
controllerAbortController
timeoutMsnumber

Returns​

() => void