From 05417f5ef9281d482bf3a7d20d42946ea8c43d70 Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Fri, 29 Sep 2023 08:01:44 +0900 Subject: [PATCH] fix: allow to omit second parameter in withRetry() --- packages/shared-lib/src/error.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared-lib/src/error.ts b/packages/shared-lib/src/error.ts index f9626f39..b0860114 100644 --- a/packages/shared-lib/src/error.ts +++ b/packages/shared-lib/src/error.ts @@ -71,7 +71,7 @@ export interface RetryOptions { */ export async function withRetry( func: (failedCount: number) => Promise, - { beforeRetry, handleError, retryCount = 3, retryLogger, sleepMilliseconds = 0 }: RetryOptions + { beforeRetry, handleError, retryCount = 3, retryLogger, sleepMilliseconds = 0 }: RetryOptions = {} ): Promise { let failedCount = 0; for (;;) {