Skip to content

async.TypeAlias.RetryOptions

github-actions[bot] edited this page Jun 8, 2026 · 2 revisions

@zenstone/ts-utils / async / RetryOptions

Type Alias: RetryOptions

RetryOptions = object

Defined in: src/async/index.ts:49

重试选项

Properties

attempts?

optional attempts?: number

Defined in: src/async/index.ts:51

最大尝试次数,默认 3


delay?

optional delay?: number | ((params) => number)

Defined in: src/async/index.ts:53

重试间隔(毫秒),支持固定值或基于 RetryFnParams 的动态计算


onRetry?

optional onRetry?: (params) => void

Defined in: src/async/index.ts:55

重试前的回调,可用于日志记录

Parameters

params

RetryFnParams

Returns

void

Clone this wiki locally