Skip to content

Commit

Permalink
fix: allow to omit second parameter in withRetry()
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Sep 28, 2023
1 parent 7fbfe3d commit 05417f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared-lib/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export interface RetryOptions {
*/
export async function withRetry<T>(
func: (failedCount: number) => Promise<T>,
{ beforeRetry, handleError, retryCount = 3, retryLogger, sleepMilliseconds = 0 }: RetryOptions
{ beforeRetry, handleError, retryCount = 3, retryLogger, sleepMilliseconds = 0 }: RetryOptions = {}
): Promise<T> {
let failedCount = 0;
for (;;) {
Expand Down

0 comments on commit 05417f5

Please sign in to comment.