- retry<T, P>(run, count?): IWrappedFn<T, P>
Type Parameters
- T extends unknown = any
- P extends any[] = any[]
Parameters
- run: ((...args: P) => Promise<T>)
- (...args): Promise<T>
Returns Promise<T>
- count: number = 5
Returns IWrappedFn<T, P>
- The wrapped function that can be canceled.
Retries a function multiple times until it succeeds or reaches the maximum number of retries.