diff --git a/src/retry.ts b/src/retry.ts index 118ec71..3802f58 100755 --- a/src/retry.ts +++ b/src/retry.ts @@ -96,6 +96,9 @@ export async function retry(action: () => T | Promise, options?: IRetryOpt throw lastError || new Error(`failed after ${attemptCount} tries`); } +/** + * @param options defaults to `{delay: 10, timeout: 1000, retries: Infinity }` + */ export function waitFor(action: () => T | Promise, options?: IRetryOptions): Promise { return retry(action, { delay: 10, timeout: 1000, retries: Infinity, ...options }); }