Backoff configuration. A positive max_attempts counts the initial
call and forfeits without sleeping at the limit. Omitted or nonpositive limits allow unlimited retries.
A boolean-returning delay: true after waiting, false on forfeiture.
Delays have no jitter or cancellation. The returned delay rejects with RangeError
if its computed wait is not finite; a finite max_delay can cap exponential growth.
Finite nonpositive delays still yield asynchronously, and sleep splits
large finite delays into safe timer chunks.
Factory-based retries conservatively infer T | null, even without an attempt limit.
Creates an exponential backoff delay function for use with retryWithDelay.