@xylabs/retry 4.13.20 → 4.13.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -12,13 +12,162 @@
|
|
|
12
12
|
[![snyk-badge][]][snyk-link]
|
|
13
13
|
[![socket-badge][]][socket-link]
|
|
14
14
|
|
|
15
|
-
Version: 4.13.19
|
|
16
15
|
|
|
17
16
|
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
|
|
18
17
|
|
|
19
|
-
## Documentation
|
|
18
|
+
## API Documentation
|
|
19
|
+
|
|
20
|
+
**@xylabs/retry**
|
|
21
|
+
|
|
22
|
+
***
|
|
23
|
+
|
|
24
|
+
## Interfaces
|
|
25
|
+
|
|
26
|
+
- [RetryConfig](#interfaces/RetryConfig)
|
|
27
|
+
- [RetryConfigWithComplete](#interfaces/RetryConfigWithComplete)
|
|
28
|
+
|
|
29
|
+
## Functions
|
|
30
|
+
|
|
31
|
+
- [retry](#functions/retry)
|
|
32
|
+
|
|
33
|
+
### functions
|
|
34
|
+
|
|
35
|
+
### <a id="retry"></a>retry
|
|
36
|
+
|
|
37
|
+
[**@xylabs/retry**](#../README)
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
function retry<T>(func, config?): Promise<undefined | T>;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Type Parameters
|
|
46
|
+
|
|
47
|
+
### T
|
|
48
|
+
|
|
49
|
+
`T` = `unknown`
|
|
50
|
+
|
|
51
|
+
## Parameters
|
|
52
|
+
|
|
53
|
+
### func
|
|
54
|
+
|
|
55
|
+
() => `Promisable`\<`undefined` \| `T`\>
|
|
56
|
+
|
|
57
|
+
### config?
|
|
58
|
+
|
|
59
|
+
[`RetryConfigWithComplete`](#../interfaces/RetryConfigWithComplete)\<`T`\>
|
|
60
|
+
|
|
61
|
+
## Returns
|
|
62
|
+
|
|
63
|
+
`Promise`\<`undefined` \| `T`\>
|
|
64
|
+
|
|
65
|
+
### interfaces
|
|
66
|
+
|
|
67
|
+
### <a id="RetryConfig"></a>RetryConfig
|
|
68
|
+
|
|
69
|
+
[**@xylabs/retry**](#../README)
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
## Extended by
|
|
74
|
+
|
|
75
|
+
- [`RetryConfigWithComplete`](#RetryConfigWithComplete)
|
|
76
|
+
|
|
77
|
+
## Properties
|
|
78
|
+
|
|
79
|
+
### backoff?
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
optional backoff: number;
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### interval?
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
optional interval: number;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### retries?
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
optional retries: number;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### <a id="RetryConfigWithComplete"></a>RetryConfigWithComplete
|
|
102
|
+
|
|
103
|
+
[**@xylabs/retry**](#../README)
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
107
|
+
## Extends
|
|
108
|
+
|
|
109
|
+
- [`RetryConfig`](#RetryConfig)
|
|
110
|
+
|
|
111
|
+
## Type Parameters
|
|
112
|
+
|
|
113
|
+
### T
|
|
114
|
+
|
|
115
|
+
`T` = `unknown`
|
|
116
|
+
|
|
117
|
+
## Properties
|
|
118
|
+
|
|
119
|
+
### backoff?
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
optional backoff: number;
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Inherited from
|
|
126
|
+
|
|
127
|
+
[`RetryConfig`](#RetryConfig).[`backoff`](RetryConfig.md#backoff)
|
|
128
|
+
|
|
129
|
+
***
|
|
130
|
+
|
|
131
|
+
### interval?
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
optional interval: number;
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Inherited from
|
|
138
|
+
|
|
139
|
+
[`RetryConfig`](#RetryConfig).[`interval`](RetryConfig.md#interval)
|
|
140
|
+
|
|
141
|
+
***
|
|
142
|
+
|
|
143
|
+
### retries?
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
optional retries: number;
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Inherited from
|
|
150
|
+
|
|
151
|
+
[`RetryConfig`](#RetryConfig).[`retries`](RetryConfig.md#retries)
|
|
152
|
+
|
|
153
|
+
***
|
|
154
|
+
|
|
155
|
+
### complete()?
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
optional complete: (result?) => boolean;
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Parameters
|
|
162
|
+
|
|
163
|
+
#### result?
|
|
164
|
+
|
|
165
|
+
`T`
|
|
166
|
+
|
|
167
|
+
### Returns
|
|
168
|
+
|
|
169
|
+
`boolean`
|
|
20
170
|
|
|
21
|
-
Coming Soon!
|
|
22
171
|
|
|
23
172
|
Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
|
|
24
173
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/retry",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.21",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"delay",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"src"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@xylabs/delay": "^4.13.
|
|
46
|
-
"@xylabs/promise": "^4.13.
|
|
45
|
+
"@xylabs/delay": "^4.13.21",
|
|
46
|
+
"@xylabs/promise": "^4.13.21"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@xylabs/ts-scripts-yarn3": "^7.0.0",
|