@statesync/core / withRetry
Function: withRetry()
ts
function withRetry<T>(
provider,
policy?,
onRetry?): SnapshotProvider<T>;Defined in: retry.ts:36
Wraps a SnapshotProvider with retries using exponential backoff.
On each failed attempt, onRetry is called (if provided) — you can use it for logging or cancellation.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
provider | SnapshotProvider<T> |
policy? | RetryPolicy |
onRetry? | (info) => void |