@ls-stack/utils 3.31.0 → 3.33.0

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.
@@ -8,6 +8,144 @@
8
8
 
9
9
  ## Type Aliases
10
10
 
11
+ ### ArrayOps\<T\>
12
+
13
+ ```ts
14
+ type ArrayOps<T> = object;
15
+ ```
16
+
17
+ Defined in: [packages/utils/src/arrayUtils.ts:238](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L238)
18
+
19
+ #### Type Parameters
20
+
21
+ ##### T
22
+
23
+ `T`
24
+
25
+ #### Properties
26
+
27
+ ##### filterAndMap()
28
+
29
+ ```ts
30
+ filterAndMap: <R>(mapFilter) => R[];
31
+ ```
32
+
33
+ Defined in: [packages/utils/src/arrayUtils.ts:251](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L251)
34
+
35
+ Filter and map an array
36
+
37
+ ###### Type Parameters
38
+
39
+ ###### R
40
+
41
+ `R`
42
+
43
+ ###### Parameters
44
+
45
+ ###### mapFilter
46
+
47
+ (`item`, `index`) => `false` \| `R`
48
+
49
+ A function that takes an item and returns a value or `false`
50
+ to reject the item.
51
+
52
+ ###### Returns
53
+
54
+ `R`[]
55
+
56
+ ###### Example
57
+
58
+ ```ts
59
+ const items = [1, 2, 3];
60
+
61
+ const enhancedItems = arrayOps(items);
62
+
63
+ enhancedItems.filterAndMap((item) => item === 2 ? false : item);
64
+ ```
65
+
66
+ ##### rejectDuplicates()
67
+
68
+ ```ts
69
+ rejectDuplicates: (getKey) => T[];
70
+ ```
71
+
72
+ Defined in: [packages/utils/src/arrayUtils.ts:253](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L253)
73
+
74
+ ###### Parameters
75
+
76
+ ###### getKey
77
+
78
+ (`item`) => `unknown`
79
+
80
+ ###### Returns
81
+
82
+ `T`[]
83
+
84
+ ##### sortBy()
85
+
86
+ ```ts
87
+ sortBy: (sortByValue, props) => T[];
88
+ ```
89
+
90
+ Defined in: [packages/utils/src/arrayUtils.ts:252](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L252)
91
+
92
+ ###### Parameters
93
+
94
+ ###### sortByValue
95
+
96
+ [`SortByValue`](#sortbyvalue)\<`T`\>
97
+
98
+ ###### props
99
+
100
+ [`SortByProps`](#sortbyprops)
101
+
102
+ ###### Returns
103
+
104
+ `T`[]
105
+
106
+ ***
107
+
108
+ ### SortByProps
109
+
110
+ ```ts
111
+ type SortByProps =
112
+ | {
113
+ order?: SortOrder | SortOrder[];
114
+ }
115
+ | SortOrder
116
+ | SortOrder[];
117
+ ```
118
+
119
+ Defined in: [packages/utils/src/arrayUtils.ts:48](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L48)
120
+
121
+ ***
122
+
123
+ ### SortByValue()\<T\>
124
+
125
+ ```ts
126
+ type SortByValue<T> = (item) => (number | string)[] | number | string;
127
+ ```
128
+
129
+ Defined in: [packages/utils/src/arrayUtils.ts:46](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L46)
130
+
131
+ #### Type Parameters
132
+
133
+ ##### T
134
+
135
+ `T`
136
+
137
+ #### Parameters
138
+
139
+ ##### item
140
+
141
+ `T`
142
+
143
+ #### Returns
144
+
145
+ (`number` \| `string`)[] \| `number` \| `string`
146
+
147
+ ***
148
+
11
149
  ### SortOrder
12
150
 
13
151
  ```ts
@@ -28,13 +28,51 @@ Defined in: [packages/utils/src/arrayUtils.ts:42](https://github.com/lucasols/ut
28
28
 
29
29
  ## Functions
30
30
 
31
+ ### arrayOps()
32
+
33
+ ```ts
34
+ function arrayOps<T>(array): ArrayOps<T>;
35
+ ```
36
+
37
+ Defined in: [packages/utils/src/arrayUtils.ts:268](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L268)
38
+
39
+ Enhance an array with extra methods
40
+
41
+ #### Type Parameters
42
+
43
+ ##### T
44
+
45
+ `T`
46
+
47
+ #### Parameters
48
+
49
+ ##### array
50
+
51
+ `T`[]
52
+
53
+ #### Returns
54
+
55
+ [`ArrayOps`](-internal-.md#arrayops)\<`T`\>
56
+
57
+ #### Example
58
+
59
+ ```ts
60
+ const enhancedItems = arrayOps(array);
61
+
62
+ enhancedItems.filterAndMap((item) => item === 2 ? false : item);
63
+ enhancedItems.sortBy((item) => item);
64
+ enhancedItems.rejectDuplicates((item) => item);
65
+ ```
66
+
67
+ ***
68
+
31
69
  ### arrayWithPrev()
32
70
 
33
71
  ```ts
34
72
  function arrayWithPrev<T>(array): [T, null | T][];
35
73
  ```
36
74
 
37
- Defined in: [packages/utils/src/arrayUtils.ts:108](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L108)
75
+ Defined in: [packages/utils/src/arrayUtils.ts:117](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L117)
38
76
 
39
77
  #### Type Parameters
40
78
 
@@ -60,7 +98,7 @@ Defined in: [packages/utils/src/arrayUtils.ts:108](https://github.com/lucasols/u
60
98
  function arrayWithPrevAndIndex<T>(array): object[];
61
99
  ```
62
100
 
63
- Defined in: [packages/utils/src/arrayUtils.ts:112](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L112)
101
+ Defined in: [packages/utils/src/arrayUtils.ts:121](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L121)
64
102
 
65
103
  #### Type Parameters
66
104
 
@@ -143,7 +181,7 @@ function findAfterIndex<T>(
143
181
  predicate): undefined | T;
144
182
  ```
145
183
 
146
- Defined in: [packages/utils/src/arrayUtils.ts:135](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L135)
184
+ Defined in: [packages/utils/src/arrayUtils.ts:144](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L144)
147
185
 
148
186
  #### Type Parameters
149
187
 
@@ -180,7 +218,7 @@ function findBeforeIndex<T>(
180
218
  predicate): undefined | T;
181
219
  ```
182
220
 
183
- Defined in: [packages/utils/src/arrayUtils.ts:149](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L149)
221
+ Defined in: [packages/utils/src/arrayUtils.ts:158](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L158)
184
222
 
185
223
  #### Type Parameters
186
224
 
@@ -214,7 +252,7 @@ Defined in: [packages/utils/src/arrayUtils.ts:149](https://github.com/lucasols/u
214
252
  function hasDuplicates<T>(array, getKey): boolean;
215
253
  ```
216
254
 
217
- Defined in: [packages/utils/src/arrayUtils.ts:173](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L173)
255
+ Defined in: [packages/utils/src/arrayUtils.ts:182](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L182)
218
256
 
219
257
  #### Type Parameters
220
258
 
@@ -244,7 +282,7 @@ Defined in: [packages/utils/src/arrayUtils.ts:173](https://github.com/lucasols/u
244
282
  function isInArray<T, U>(value, oneOf): value is U;
245
283
  ```
246
284
 
247
- Defined in: [packages/utils/src/arrayUtils.ts:122](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L122)
285
+ Defined in: [packages/utils/src/arrayUtils.ts:131](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L131)
248
286
 
249
287
  #### Type Parameters
250
288
 
@@ -278,7 +316,7 @@ readonly `U`[]
278
316
  function rejectArrayUndefinedValues<T>(array): T;
279
317
  ```
280
318
 
281
- Defined in: [packages/utils/src/arrayUtils.ts:169](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L169)
319
+ Defined in: [packages/utils/src/arrayUtils.ts:178](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L178)
282
320
 
283
321
  #### Type Parameters
284
322
 
@@ -304,7 +342,7 @@ Defined in: [packages/utils/src/arrayUtils.ts:169](https://github.com/lucasols/u
304
342
  function rejectDuplicates<T>(array, getKey): T[];
305
343
  ```
306
344
 
307
- Defined in: [packages/utils/src/arrayUtils.ts:190](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L190)
345
+ Defined in: [packages/utils/src/arrayUtils.ts:199](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L199)
308
346
 
309
347
  #### Type Parameters
310
348
 
@@ -337,7 +375,7 @@ function sortBy<T>(
337
375
  props): T[];
338
376
  ```
339
377
 
340
- Defined in: [packages/utils/src/arrayUtils.ts:67](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L67)
378
+ Defined in: [packages/utils/src/arrayUtils.ts:76](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L76)
341
379
 
342
380
  Sort an array based on a value
343
381
 
@@ -359,13 +397,11 @@ Use `Infinity` as as wildcard to absolute max and min values
359
397
 
360
398
  ##### sortByValue
361
399
 
362
- (`item`) => `string` \| `number` \| (`string` \| `number`)[]
400
+ [`SortByValue`](-internal-.md#sortbyvalue)\<`T`\>
363
401
 
364
402
  ##### props
365
403
 
366
- [`SortOrder`](-internal-.md#sortorder) | [`SortOrder`](-internal-.md#sortorder)[] | \{
367
- `order?`: SortOrder \| SortOrder\[\] \| undefined;
368
- \}
404
+ [`SortByProps`](-internal-.md#sortbyprops) = `'asc'`
369
405
 
370
406
  #### Returns
371
407
 
@@ -396,7 +432,7 @@ function truncateArray<T>(
396
432
  appendIfTruncated?): T[];
397
433
  ```
398
434
 
399
- Defined in: [packages/utils/src/arrayUtils.ts:210](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L210)
435
+ Defined in: [packages/utils/src/arrayUtils.ts:219](https://github.com/lucasols/utils/blob/main/packages/utils/src/arrayUtils.ts#L219)
400
436
 
401
437
  #### Type Parameters
402
438
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  ### ConcurrentCalls\<R, E\>
12
12
 
13
- Defined in: [packages/utils/src/concurrentCalls.ts:124](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L124)
13
+ Defined in: [packages/utils/src/concurrentCalls.ts:141](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L141)
14
14
 
15
15
  #### Type Parameters
16
16
 
@@ -20,20 +20,38 @@ Defined in: [packages/utils/src/concurrentCalls.ts:124](https://github.com/lucas
20
20
 
21
21
  ##### E
22
22
 
23
- `E` *extends* `Error` = `Error`
23
+ `E` *extends* `ResultValidErrors` = `Error`
24
24
 
25
25
  #### Constructors
26
26
 
27
27
  ##### Constructor
28
28
 
29
29
  ```ts
30
- new ConcurrentCalls<R, E>(): ConcurrentCalls<R, E>;
30
+ new ConcurrentCalls<R, E>(allowResultify): ConcurrentCalls<R, E>;
31
31
  ```
32
32
 
33
+ Defined in: [packages/utils/src/concurrentCalls.ts:146](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L146)
34
+
35
+ ###### Parameters
36
+
37
+ ###### allowResultify
38
+
39
+ `boolean`
40
+
33
41
  ###### Returns
34
42
 
35
43
  [`ConcurrentCalls`](#concurrentcalls)\<`R`, `E`\>
36
44
 
45
+ #### Properties
46
+
47
+ ##### allowResultify
48
+
49
+ ```ts
50
+ allowResultify: boolean = true;
51
+ ```
52
+
53
+ Defined in: [packages/utils/src/concurrentCalls.ts:144](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L144)
54
+
37
55
  #### Methods
38
56
 
39
57
  ##### add()
@@ -42,7 +60,7 @@ new ConcurrentCalls<R, E>(): ConcurrentCalls<R, E>;
42
60
  add(...calls): this;
43
61
  ```
44
62
 
45
- Defined in: [packages/utils/src/concurrentCalls.ts:128](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L128)
63
+ Defined in: [packages/utils/src/concurrentCalls.ts:150](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L150)
46
64
 
47
65
  ###### Parameters
48
66
 
@@ -60,7 +78,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:128](https://github.com/lucas
60
78
  resultifyAdd(...calls): this;
61
79
  ```
62
80
 
63
- Defined in: [packages/utils/src/concurrentCalls.ts:134](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L134)
81
+ Defined in: [packages/utils/src/concurrentCalls.ts:156](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L156)
64
82
 
65
83
  ###### Parameters
66
84
 
@@ -78,7 +96,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:134](https://github.com/lucas
78
96
  runAll(__namedParameters): Promise<Result<R[], E>>;
79
97
  ```
80
98
 
81
- Defined in: [packages/utils/src/concurrentCalls.ts:151](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L151)
99
+ Defined in: [packages/utils/src/concurrentCalls.ts:179](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L179)
82
100
 
83
101
  ###### Parameters
84
102
 
@@ -103,7 +121,7 @@ runAllSettled(__namedParameters): Promise<{
103
121
  }>;
104
122
  ```
105
123
 
106
- Defined in: [packages/utils/src/concurrentCalls.ts:183](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L183)
124
+ Defined in: [packages/utils/src/concurrentCalls.ts:211](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L211)
107
125
 
108
126
  ###### Parameters
109
127
 
@@ -126,7 +144,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:183](https://github.com/lucas
126
144
 
127
145
  ### ConcurrentCallsWithMetadata\<M, R, E\>
128
146
 
129
- Defined in: [packages/utils/src/concurrentCalls.ts:250](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L250)
147
+ Defined in: [packages/utils/src/concurrentCalls.ts:277](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L277)
130
148
 
131
149
  #### Type Parameters
132
150
 
@@ -140,20 +158,38 @@ Defined in: [packages/utils/src/concurrentCalls.ts:250](https://github.com/lucas
140
158
 
141
159
  ##### E
142
160
 
143
- `E` *extends* `Error` = `Error`
161
+ `E` *extends* `ResultValidErrors` = `Error`
144
162
 
145
163
  #### Constructors
146
164
 
147
165
  ##### Constructor
148
166
 
149
167
  ```ts
150
- new ConcurrentCallsWithMetadata<M, R, E>(): ConcurrentCallsWithMetadata<M, R, E>;
168
+ new ConcurrentCallsWithMetadata<M, R, E>(allowResultify): ConcurrentCallsWithMetadata<M, R, E>;
151
169
  ```
152
170
 
171
+ Defined in: [packages/utils/src/concurrentCalls.ts:286](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L286)
172
+
173
+ ###### Parameters
174
+
175
+ ###### allowResultify
176
+
177
+ `boolean`
178
+
153
179
  ###### Returns
154
180
 
155
181
  [`ConcurrentCallsWithMetadata`](#concurrentcallswithmetadata)\<`M`, `R`, `E`\>
156
182
 
183
+ #### Properties
184
+
185
+ ##### allowResultify
186
+
187
+ ```ts
188
+ allowResultify: boolean = true;
189
+ ```
190
+
191
+ Defined in: [packages/utils/src/concurrentCalls.ts:284](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L284)
192
+
157
193
  #### Methods
158
194
 
159
195
  ##### add()
@@ -162,7 +198,7 @@ new ConcurrentCallsWithMetadata<M, R, E>(): ConcurrentCallsWithMetadata<M, R, E>
162
198
  add(...calls): this;
163
199
  ```
164
200
 
165
- Defined in: [packages/utils/src/concurrentCalls.ts:258](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L258)
201
+ Defined in: [packages/utils/src/concurrentCalls.ts:290](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L290)
166
202
 
167
203
  ###### Parameters
168
204
 
@@ -180,7 +216,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:258](https://github.com/lucas
180
216
  resultifyAdd(...items): this;
181
217
  ```
182
218
 
183
- Defined in: [packages/utils/src/concurrentCalls.ts:272](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L272)
219
+ Defined in: [packages/utils/src/concurrentCalls.ts:304](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L304)
184
220
 
185
221
  ###### Parameters
186
222
 
@@ -198,7 +234,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:272](https://github.com/lucas
198
234
  runAll(__namedParameters): Promise<Result<SucceededCall<R, M>[], FailedCall<M, E>>>;
199
235
  ```
200
236
 
201
- Defined in: [packages/utils/src/concurrentCalls.ts:292](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L292)
237
+ Defined in: [packages/utils/src/concurrentCalls.ts:330](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L330)
202
238
 
203
239
  ###### Parameters
204
240
 
@@ -225,7 +261,7 @@ runAllSettled(__namedParameters): Promise<{
225
261
  }>;
226
262
  ```
227
263
 
228
- Defined in: [packages/utils/src/concurrentCalls.ts:339](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L339)
264
+ Defined in: [packages/utils/src/concurrentCalls.ts:377](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L377)
229
265
 
230
266
  ###### Parameters
231
267
 
@@ -254,7 +290,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:339](https://github.com/lucas
254
290
  type Action<R, E> = () => Promise<Result<R, E>>;
255
291
  ```
256
292
 
257
- Defined in: [packages/utils/src/concurrentCalls.ts:117](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L117)
293
+ Defined in: [packages/utils/src/concurrentCalls.ts:134](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L134)
258
294
 
259
295
  #### Type Parameters
260
296
 
@@ -264,7 +300,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:117](https://github.com/lucas
264
300
 
265
301
  ##### E
266
302
 
267
- `E` *extends* `Error`
303
+ `E` *extends* `ResultValidErrors`
268
304
 
269
305
  #### Returns
270
306
 
@@ -272,13 +308,29 @@ Defined in: [packages/utils/src/concurrentCalls.ts:117](https://github.com/lucas
272
308
 
273
309
  ***
274
310
 
311
+ ### ErrorFromResult\<R\>
312
+
313
+ ```ts
314
+ type ErrorFromResult<R> = R extends Result<any, infer E> ? E : never;
315
+ ```
316
+
317
+ Defined in: [packages/utils/src/concurrentCalls.ts:480](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L480)
318
+
319
+ #### Type Parameters
320
+
321
+ ##### R
322
+
323
+ `R`
324
+
325
+ ***
326
+
275
327
  ### FailedCall\<M, E\>
276
328
 
277
329
  ```ts
278
330
  type FailedCall<M, E> = object;
279
331
  ```
280
332
 
281
- Defined in: [packages/utils/src/concurrentCalls.ts:112](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L112)
333
+ Defined in: [packages/utils/src/concurrentCalls.ts:129](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L129)
282
334
 
283
335
  #### Type Parameters
284
336
 
@@ -288,7 +340,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:112](https://github.com/lucas
288
340
 
289
341
  ##### E
290
342
 
291
- `E` *extends* `Error` = `Error`
343
+ `E` *extends* `ResultValidErrors` = `Error`
292
344
 
293
345
  #### Properties
294
346
 
@@ -298,7 +350,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:112](https://github.com/lucas
298
350
  error: E;
299
351
  ```
300
352
 
301
- Defined in: [packages/utils/src/concurrentCalls.ts:114](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L114)
353
+ Defined in: [packages/utils/src/concurrentCalls.ts:131](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L131)
302
354
 
303
355
  ##### metadata
304
356
 
@@ -306,7 +358,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:114](https://github.com/lucas
306
358
  metadata: M;
307
359
  ```
308
360
 
309
- Defined in: [packages/utils/src/concurrentCalls.ts:113](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L113)
361
+ Defined in: [packages/utils/src/concurrentCalls.ts:130](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L130)
310
362
 
311
363
  ***
312
364
 
@@ -316,7 +368,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:113](https://github.com/lucas
316
368
  type RunProps = object;
317
369
  ```
318
370
 
319
- Defined in: [packages/utils/src/concurrentCalls.ts:103](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L103)
371
+ Defined in: [packages/utils/src/concurrentCalls.ts:120](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L120)
320
372
 
321
373
  #### Properties
322
374
 
@@ -326,7 +378,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:103](https://github.com/lucas
326
378
  optional delayStart: (index) => number;
327
379
  ```
328
380
 
329
- Defined in: [packages/utils/src/concurrentCalls.ts:104](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L104)
381
+ Defined in: [packages/utils/src/concurrentCalls.ts:121](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L121)
330
382
 
331
383
  ###### Parameters
332
384
 
@@ -357,7 +409,7 @@ type SettledResultWithMetadata<R, M, E> =
357
409
  };
358
410
  ```
359
411
 
360
- Defined in: [packages/utils/src/concurrentCalls.ts:120](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L120)
412
+ Defined in: [packages/utils/src/concurrentCalls.ts:137](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L137)
361
413
 
362
414
  #### Type Parameters
363
415
 
@@ -371,7 +423,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:120](https://github.com/lucas
371
423
 
372
424
  ##### E
373
425
 
374
- `E` *extends* `Error` = `Error`
426
+ `E` *extends* `ResultValidErrors` = `Error`
375
427
 
376
428
  ***
377
429
 
@@ -381,7 +433,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:120](https://github.com/lucas
381
433
  type SucceededCall<R, M> = object;
382
434
  ```
383
435
 
384
- Defined in: [packages/utils/src/concurrentCalls.ts:108](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L108)
436
+ Defined in: [packages/utils/src/concurrentCalls.ts:125](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L125)
385
437
 
386
438
  #### Type Parameters
387
439
 
@@ -401,7 +453,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:108](https://github.com/lucas
401
453
  metadata: M;
402
454
  ```
403
455
 
404
- Defined in: [packages/utils/src/concurrentCalls.ts:110](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L110)
456
+ Defined in: [packages/utils/src/concurrentCalls.ts:127](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L127)
405
457
 
406
458
  ##### value
407
459
 
@@ -409,7 +461,7 @@ Defined in: [packages/utils/src/concurrentCalls.ts:110](https://github.com/lucas
409
461
  value: R;
410
462
  ```
411
463
 
412
- Defined in: [packages/utils/src/concurrentCalls.ts:109](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L109)
464
+ Defined in: [packages/utils/src/concurrentCalls.ts:126](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L126)
413
465
 
414
466
  ***
415
467
 
@@ -419,4 +471,20 @@ Defined in: [packages/utils/src/concurrentCalls.ts:109](https://github.com/lucas
419
471
  type ValidMetadata = string | number | boolean | Record<string, unknown>;
420
472
  ```
421
473
 
422
- Defined in: [packages/utils/src/concurrentCalls.ts:101](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L101)
474
+ Defined in: [packages/utils/src/concurrentCalls.ts:118](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L118)
475
+
476
+ ***
477
+
478
+ ### ValueFromResult\<R\>
479
+
480
+ ```ts
481
+ type ValueFromResult<R> = R extends Result<infer T, any> ? T : never;
482
+ ```
483
+
484
+ Defined in: [packages/utils/src/concurrentCalls.ts:479](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L479)
485
+
486
+ #### Type Parameters
487
+
488
+ ##### R
489
+
490
+ `R`