函数返回的 Promise 类型 / The Promise type returned by the function
需要重试的异步函数 / The asynchronous function to retry
重试配置选项 / Retry configuration options
OptionalbackoffFactor?: number退避因子,每次重试延迟时间乘以此值 / Backoff factor, delay multiplies by this each retry
OptionaldelayMs?: number初始延迟时间(毫秒) / Initial delay in milliseconds
OptionalmaxAttempts?: number最大尝试次数 / Maximum number of attempts
OptionalshouldRetry?: (error: unknown, attempt: number) => boolean判断是否应该重试的函数 / Function to determine if should retry
成功执行的结果 / Successfully executed result
重试执行异步函数,支持指数退避策略 Retry an asynchronous function with exponential backoff support