R
fn

timeoutPlugin

v0.1.0

Composes an `AbortSignal.timeout(ms)` with any caller-supplied signal when `options.timeout` is set. Implemented as an `execute` middleware (inner to `retry`) so every retry attempt gets a brand-new timeout signal — a single timeout no longer poisons all subsequent attempts. The timeout therefore applies per attempt, not to the whole retry sequence. Auto-registered by `createFetch`; no-op when `timeout` is unset.

Signature

ts
export function timeoutPlugin(){ ... }

Returns

import("..").FetchPlugin<"timeout", unknown, unknown>