Skip to content

Commit

Permalink
fix: improve type of withRetry() return value
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Oct 21, 2024
1 parent 5854cd4 commit c9cc5de
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 @@ -70,7 +70,7 @@ export interface RetryOptions {
* @param sleepMilliseconds The number of milliseconds to sleep before retrying.
*/
export async function withRetry<T>(
func: (failedCount: number) => Promise<T>,
func: (failedCount: number) => T | Promise<T>,
{ beforeRetry, handleError, retryCount = 3, retryLogger, sleepMilliseconds = 0 }: RetryOptions = {}
): Promise<T> {
let failedCount = 0;
Expand Down

0 comments on commit c9cc5de

Please sign in to comment.