type alias ResilientCall
Since 0.2.0

A call protected by the resilience patterns.

The signal is aborted when the attempt is cancelled — on a timeout deadline, or when the caller aborts the signal it passed to the HardenedCall. A call that forwards the signal to the I/O it performs (fetch(url, { signal }), an abortable driver) is genuinely cancelled; a call that ignores it still runs to completion, and only the caller's await rejects.

Declaring the parameter does not oblige an implementation to accept it: a zero-argument () => Promise<T> remains assignable here, so callers written against the pre-cancellation signature continue to type-check unchanged.

Type Parameters

The call's result type

Definition

(signal: AbortSignal) => Promise<T>

Usage

import { type ResilientCall } from "common/src/index.ts";