API reference / @evolu/common / Task / RetryOptions
Interface: RetryOptions<E>
Defined in: packages/common/src/Task.ts:407
Options for configuring retry behavior.
Type Parameters
| Type Parameter |
|---|
E |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
factor? | readonly | number | Exponential backoff multiplier. | packages/common/src/Task.ts:422 |
initialDelay? | readonly | Duration | Initial delay for exponential backoff (1st retry uses this, 2nd uses this×factor, 3rd uses this×factor², etc.). Actual delays are randomized by RetryOptions.jitter. | packages/common/src/Task.ts:416 |
jitter? | readonly | number | Random jitter factor (0-1) to prevent thundering herd. | packages/common/src/Task.ts:425 |
maxDelay? | readonly | Duration | Maximum delay between retries. | packages/common/src/Task.ts:419 |
onRetry? | readonly | (error, attempt, delay) => void | Callback invoked before each retry attempt. | packages/common/src/Task.ts:434 |
retries | readonly | number & Brand<"Int"> & Brand<"NonNegative"> & Brand<"Positive"> | Number of retry attempts after the initial failure. | packages/common/src/Task.ts:409 |
retryable? | readonly | (error) => boolean | Predicate to determine if error should trigger retry. Receives AbortError too. | packages/common/src/Task.ts:431 |