(attempt: number)
| 33 | } |
| 34 | |
| 35 | function backoffMs(attempt: number): number { |
| 36 | return Math.min(500 * Math.pow(2, attempt), 8_000); |
| 37 | } |
| 38 | |
| 39 | /** Combine multiple AbortSignals into one. Aborts if any source aborts. */ |
| 40 | function combineSignals(...signals: (AbortSignal | undefined)[]): { |