diff --git a/src/retries.ts b/src/retries.ts index 07c9a6c..5ae8b2c 100644 --- a/src/retries.ts +++ b/src/retries.ts @@ -3,10 +3,10 @@ */ export function withRetry( fn: (...args: T) => Promise, - { attempts = 6, backoffMs = (attempt) => 1000 * 2 ** attempt }: { + { attempts, backoffMs }: { attempts: number; backoffMs(attempt: number): number; - }, + } = { attempts: 6, backoffMs: (attempt) => 1000 * 2 ** attempt }, ): (...args: T) => Promise { return async (...args: T) => { for (let attempt = 0; attempt < attempts - 1; attempt += 1) {