Skip to content

Commit

Permalink
fix: retry definition
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptodev-2s committed Jul 22, 2024
1 parent 6f881fa commit 51e08be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/retryOnEmpty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ export function createRetryOnEmptyMiddleware({
});
}

async function retry<Response>(
async function retry<Result>(
maxRetries: number,
asyncFn: () => Promise<Response>,
): Promise<Response> {
asyncFn: () => Promise<Result>,
): Promise<Result> {
for (let index = 0; index < maxRetries; index++) {
try {
return await asyncFn();
Expand Down

0 comments on commit 51e08be

Please sign in to comment.