Skip to content
Source
Sign inSign up
TanStack/pacer
Open History to see the last commit

AsyncRetryerState.md

108 lines2.2 KB

1---
2id: AsyncRetryerState
3title: AsyncRetryerState
4---
5​
6Defined in: [async-retryer.ts:5](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L5)
7​
8## Type Parameters
9​
10### TFn
11​
12`TFn` *extends* [`AnyAsyncFunction`](../type-aliases/AnyAsyncFunction.md)
13​
14## Properties
15​
16### currentAttempt
17​
18```ts
19currentAttempt: number;
20```
21​
22Defined in: [async-retryer.ts:9](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L9)
23​
24The current retry attempt number (0 when not executing)
25​
26***
27​
28### executionCount
29​
30```ts
31executionCount: number;
32```
33​
34Defined in: [async-retryer.ts:13](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L13)
35​
36Total number of completed executions (successful or failed)
37​
38***
39​
40### isExecuting
41​
42```ts
43isExecuting: boolean;
44```
45​
46Defined in: [async-retryer.ts:17](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L17)
47​
48Whether the retryer is currently executing the function
49​
50***
51​
52### lastError
53​
54```ts
55lastError: Error | undefined;
56```
57​
58Defined in: [async-retryer.ts:21](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L21)
59​
60The most recent error encountered during execution
61​
62***
63​
64### lastExecutionTime
65​
66```ts
67lastExecutionTime: number;
68```
69​
70Defined in: [async-retryer.ts:25](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L25)
71​
72Timestamp of the last execution completion in milliseconds
73​
74***
75​
76### lastResult
77​
78```ts
79lastResult: Awaited<ReturnType<TFn>> | undefined;
80```
81​
82Defined in: [async-retryer.ts:29](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L29)
83​
84The result from the most recent successful execution
85​
86***
87​
88### status
89​
90```ts
91status: "disabled" | "idle" | "executing" | "retrying";
92```
93​
94Defined in: [async-retryer.ts:33](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L33)
95​
96Current execution status - 'disabled' when not enabled, 'idle' when ready, 'executing' when running
97​
98***
99​
100### totalExecutionTime
101​
102```ts
103totalExecutionTime: number;
104```
105​
106Defined in: [async-retryer.ts:37](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-retryer.ts#L37)
107​
108Total time spent executing (including retries) in milliseconds