We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
retryOnRet
1 parent bbc3726 commit 4e33ef5Copy full SHA for 4e33ef5
packages/utils/src/common/retry.ts
@@ -7,7 +7,7 @@ export interface RetryOnRetOptions {
7
}
8
9
// todo: if no retryMax, use polling
10
-export async function retryOnRet<T extends Fn<any>>(fn: T, successCondition: (result: ReturnType<T>) => Awaitable<boolean>, options: RetryOnRetOptions = {}) {
+export async function retryOnRet<T extends Fn<any>>(fn: T, successCondition: (result: Awaited<ReturnType<T>>) => Awaitable<boolean>, options: RetryOnRetOptions = {}) {
11
const { retryMax, delay = 1000 } = options
12
const errMsgRetNull = 'Returned value doesn\'t meet success condition'
13
if (!retryMax) {
0 commit comments