retuple 1.0.0-next.19 → 1.0.0-next.20
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/dist/index.cjs +2 -390
- package/dist/index.d.cts +1 -313
- package/dist/index.d.ts +1 -313
- package/dist/index.js +2 -390
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -148,318 +148,6 @@ export declare function Ok<const T>(val: T): Result<T, never>;
|
|
|
148
148
|
*/
|
|
149
149
|
export declare function Err(): Result<never, void>;
|
|
150
150
|
export declare function Err<const E>(err: E): Result<never, E>;
|
|
151
|
-
/**
|
|
152
|
-
* ## RetupleArray
|
|
153
|
-
*
|
|
154
|
-
* Using built-in array methods on a `Result` is probably a mistake. This class
|
|
155
|
-
* makes the built-in methods throw `RetupleArrayMethodUnavailableError`.
|
|
156
|
-
*/
|
|
157
|
-
declare class RetupleArray<T> extends Array<T> {
|
|
158
|
-
/**
|
|
159
|
-
* ## Method not available
|
|
160
|
-
*
|
|
161
|
-
* Built-in array methods not available on {@link Result} types.
|
|
162
|
-
*
|
|
163
|
-
* @deprecated
|
|
164
|
-
*/
|
|
165
|
-
at(): never;
|
|
166
|
-
/**
|
|
167
|
-
* ## Method not available
|
|
168
|
-
*
|
|
169
|
-
* Built-in array methods not available on {@link Result} types.
|
|
170
|
-
*
|
|
171
|
-
* @deprecated
|
|
172
|
-
*/
|
|
173
|
-
concat(): never;
|
|
174
|
-
/**
|
|
175
|
-
* ## Method not available
|
|
176
|
-
*
|
|
177
|
-
* Built-in array methods not available on {@link Result} types.
|
|
178
|
-
*
|
|
179
|
-
* @deprecated
|
|
180
|
-
*/
|
|
181
|
-
copyWithin(): never;
|
|
182
|
-
/**
|
|
183
|
-
* ## Method not available
|
|
184
|
-
*
|
|
185
|
-
* Built-in array methods not available on {@link Result} types.
|
|
186
|
-
*
|
|
187
|
-
* @deprecated
|
|
188
|
-
*/
|
|
189
|
-
entries(): never;
|
|
190
|
-
/**
|
|
191
|
-
* ## Method not available
|
|
192
|
-
*
|
|
193
|
-
* Built-in array methods not available on {@link Result} types.
|
|
194
|
-
*
|
|
195
|
-
* @deprecated
|
|
196
|
-
*/
|
|
197
|
-
every(): this is never[];
|
|
198
|
-
/**
|
|
199
|
-
* ## Method not available
|
|
200
|
-
*
|
|
201
|
-
* Built-in array methods not available on {@link Result} types.
|
|
202
|
-
*
|
|
203
|
-
* @deprecated
|
|
204
|
-
*/
|
|
205
|
-
fill(): never;
|
|
206
|
-
/**
|
|
207
|
-
* ## Method not available
|
|
208
|
-
*
|
|
209
|
-
* Built-in array methods not available on {@link Result} types.
|
|
210
|
-
*
|
|
211
|
-
* @deprecated
|
|
212
|
-
*/
|
|
213
|
-
filter(): never;
|
|
214
|
-
/**
|
|
215
|
-
* ## Method not available
|
|
216
|
-
*
|
|
217
|
-
* Built-in array methods not available on {@link Result} types.
|
|
218
|
-
*
|
|
219
|
-
* @deprecated
|
|
220
|
-
*/
|
|
221
|
-
find(): never;
|
|
222
|
-
/**
|
|
223
|
-
* ## Method not available
|
|
224
|
-
*
|
|
225
|
-
* Built-in array methods not available on {@link Result} types.
|
|
226
|
-
*
|
|
227
|
-
* @deprecated
|
|
228
|
-
*/
|
|
229
|
-
findIndex(): never;
|
|
230
|
-
/**
|
|
231
|
-
* ## Method not available
|
|
232
|
-
*
|
|
233
|
-
* Built-in array methods not available on {@link Result} types.
|
|
234
|
-
*
|
|
235
|
-
* @deprecated
|
|
236
|
-
*/
|
|
237
|
-
findLast(): never;
|
|
238
|
-
/**
|
|
239
|
-
* ## Method not available
|
|
240
|
-
*
|
|
241
|
-
* Built-in array methods not available on {@link Result} types.
|
|
242
|
-
*
|
|
243
|
-
* @deprecated
|
|
244
|
-
*/
|
|
245
|
-
findLastIndex(): never;
|
|
246
|
-
/**
|
|
247
|
-
* ## Method not available
|
|
248
|
-
*
|
|
249
|
-
* Built-in array methods not available on {@link Result} types.
|
|
250
|
-
*
|
|
251
|
-
* @deprecated
|
|
252
|
-
*/
|
|
253
|
-
flat(): never;
|
|
254
|
-
/**
|
|
255
|
-
* ## Method not available
|
|
256
|
-
*
|
|
257
|
-
* Built-in array methods not available on {@link Result} types.
|
|
258
|
-
*
|
|
259
|
-
* @deprecated
|
|
260
|
-
*/
|
|
261
|
-
flatMap(): never;
|
|
262
|
-
/**
|
|
263
|
-
* ## Method not available
|
|
264
|
-
*
|
|
265
|
-
* Built-in array methods not available on {@link Result} types.
|
|
266
|
-
*
|
|
267
|
-
* @deprecated
|
|
268
|
-
*/
|
|
269
|
-
forEach(): never;
|
|
270
|
-
/**
|
|
271
|
-
* ## Method not available
|
|
272
|
-
*
|
|
273
|
-
* Built-in array methods not available on {@link Result} types.
|
|
274
|
-
*
|
|
275
|
-
* @deprecated
|
|
276
|
-
*/
|
|
277
|
-
includes(): never;
|
|
278
|
-
/**
|
|
279
|
-
* ## Method not available
|
|
280
|
-
*
|
|
281
|
-
* Built-in array methods not available on {@link Result} types.
|
|
282
|
-
*
|
|
283
|
-
* @deprecated
|
|
284
|
-
*/
|
|
285
|
-
indexOf(): never;
|
|
286
|
-
/**
|
|
287
|
-
* ## Method not available
|
|
288
|
-
*
|
|
289
|
-
* Built-in array methods not available on {@link Result} types.
|
|
290
|
-
*
|
|
291
|
-
* @deprecated
|
|
292
|
-
*/
|
|
293
|
-
join(): never;
|
|
294
|
-
/**
|
|
295
|
-
* ## Method not available
|
|
296
|
-
*
|
|
297
|
-
* Built-in array methods not available on {@link Result} types.
|
|
298
|
-
*
|
|
299
|
-
* @deprecated
|
|
300
|
-
*/
|
|
301
|
-
keys(): never;
|
|
302
|
-
/**
|
|
303
|
-
* ## Method not available
|
|
304
|
-
*
|
|
305
|
-
* Built-in array methods not available on {@link Result} types.
|
|
306
|
-
*
|
|
307
|
-
* @deprecated
|
|
308
|
-
*/
|
|
309
|
-
lastIndexOf(): never;
|
|
310
|
-
/**
|
|
311
|
-
* ## Method not available
|
|
312
|
-
*
|
|
313
|
-
* Built-in array methods not available on {@link Result} types.
|
|
314
|
-
*
|
|
315
|
-
* @deprecated
|
|
316
|
-
*/
|
|
317
|
-
map(): never;
|
|
318
|
-
/**
|
|
319
|
-
* ## Method not available
|
|
320
|
-
*
|
|
321
|
-
* Built-in array methods not available on {@link Result} types.
|
|
322
|
-
*
|
|
323
|
-
* @deprecated
|
|
324
|
-
*/
|
|
325
|
-
pop(): never;
|
|
326
|
-
/**
|
|
327
|
-
* ## Method not available
|
|
328
|
-
*
|
|
329
|
-
* Built-in array methods not available on {@link Result} types.
|
|
330
|
-
*
|
|
331
|
-
* @deprecated
|
|
332
|
-
*/
|
|
333
|
-
push(): never;
|
|
334
|
-
/**
|
|
335
|
-
* ## Method not available
|
|
336
|
-
*
|
|
337
|
-
* Built-in array methods not available on {@link Result} types.
|
|
338
|
-
*
|
|
339
|
-
* @deprecated
|
|
340
|
-
*/
|
|
341
|
-
reduce(): never;
|
|
342
|
-
/**
|
|
343
|
-
* ## Method not available
|
|
344
|
-
*
|
|
345
|
-
* Built-in array methods not available on {@link Result} types.
|
|
346
|
-
*
|
|
347
|
-
* @deprecated
|
|
348
|
-
*/
|
|
349
|
-
reduceRight(): never;
|
|
350
|
-
/**
|
|
351
|
-
* ## Method not available
|
|
352
|
-
*
|
|
353
|
-
* Built-in array methods not available on {@link Result} types.
|
|
354
|
-
*
|
|
355
|
-
* @deprecated
|
|
356
|
-
*/
|
|
357
|
-
reverse(): never;
|
|
358
|
-
/**
|
|
359
|
-
* ## Method not available
|
|
360
|
-
*
|
|
361
|
-
* Built-in array methods not available on {@link Result} types.
|
|
362
|
-
*
|
|
363
|
-
* @deprecated
|
|
364
|
-
*/
|
|
365
|
-
shift(): never;
|
|
366
|
-
/**
|
|
367
|
-
* ## Method not available
|
|
368
|
-
*
|
|
369
|
-
* Built-in array methods not available on {@link Result} types.
|
|
370
|
-
*
|
|
371
|
-
* @deprecated
|
|
372
|
-
*/
|
|
373
|
-
slice(): never;
|
|
374
|
-
/**
|
|
375
|
-
* ## Method not available
|
|
376
|
-
*
|
|
377
|
-
* Built-in array methods not available on {@link Result} types.
|
|
378
|
-
*
|
|
379
|
-
* @deprecated
|
|
380
|
-
*/
|
|
381
|
-
some(): never;
|
|
382
|
-
/**
|
|
383
|
-
* ## Method not available
|
|
384
|
-
*
|
|
385
|
-
* Built-in array methods not available on {@link Result} types.
|
|
386
|
-
*
|
|
387
|
-
* @deprecated
|
|
388
|
-
*/
|
|
389
|
-
sort(): never;
|
|
390
|
-
/**
|
|
391
|
-
* ## Method not available
|
|
392
|
-
*
|
|
393
|
-
* Built-in array methods not available on {@link Result} types.
|
|
394
|
-
*
|
|
395
|
-
* @deprecated
|
|
396
|
-
*/
|
|
397
|
-
splice(): never;
|
|
398
|
-
/**
|
|
399
|
-
* ## Method not available
|
|
400
|
-
*
|
|
401
|
-
* Built-in array methods not available on {@link Result} types.
|
|
402
|
-
*
|
|
403
|
-
* @deprecated
|
|
404
|
-
*/
|
|
405
|
-
toString(): never;
|
|
406
|
-
/**
|
|
407
|
-
* ## Method not available
|
|
408
|
-
*
|
|
409
|
-
* Built-in array methods not available on {@link Result} types.
|
|
410
|
-
*
|
|
411
|
-
* @deprecated
|
|
412
|
-
*/
|
|
413
|
-
toLocaleString(): never;
|
|
414
|
-
/**
|
|
415
|
-
* ## Method not available
|
|
416
|
-
*
|
|
417
|
-
* Built-in array methods not available on {@link Result} types.
|
|
418
|
-
*
|
|
419
|
-
* @deprecated
|
|
420
|
-
*/
|
|
421
|
-
toReversed(): never;
|
|
422
|
-
/**
|
|
423
|
-
* ## Method not available
|
|
424
|
-
*
|
|
425
|
-
* Built-in array methods not available on {@link Result} types.
|
|
426
|
-
*
|
|
427
|
-
* @deprecated
|
|
428
|
-
*/
|
|
429
|
-
toSorted(): never;
|
|
430
|
-
/**
|
|
431
|
-
* ## Method not available
|
|
432
|
-
*
|
|
433
|
-
* Built-in array methods not available on {@link Result} types.
|
|
434
|
-
*
|
|
435
|
-
* @deprecated
|
|
436
|
-
*/
|
|
437
|
-
toSpliced(): never;
|
|
438
|
-
/**
|
|
439
|
-
* ## Method not available
|
|
440
|
-
*
|
|
441
|
-
* Built-in array methods not available on {@link Result} types.
|
|
442
|
-
*
|
|
443
|
-
* @deprecated
|
|
444
|
-
*/
|
|
445
|
-
unshift(): never;
|
|
446
|
-
/**
|
|
447
|
-
* ## Method not available
|
|
448
|
-
*
|
|
449
|
-
* Built-in array methods not available on {@link Result} types.
|
|
450
|
-
*
|
|
451
|
-
* @deprecated
|
|
452
|
-
*/
|
|
453
|
-
values(): never;
|
|
454
|
-
/**
|
|
455
|
-
* ## Method not available
|
|
456
|
-
*
|
|
457
|
-
* Built-in array methods not available on {@link Result} types.
|
|
458
|
-
*
|
|
459
|
-
* @deprecated
|
|
460
|
-
*/
|
|
461
|
-
with(): never;
|
|
462
|
-
}
|
|
463
151
|
/**
|
|
464
152
|
* ## ResultAsync
|
|
465
153
|
*
|
|
@@ -733,7 +421,7 @@ declare class ResultRetry<T, E> extends ResultAsync<T, E> implements PromiseLike
|
|
|
733
421
|
$handle(f: (controller: ResultRetryController<E>) => void): ResultRetry<T, E>;
|
|
734
422
|
private drain;
|
|
735
423
|
}
|
|
736
|
-
interface Retuple<T, E> extends
|
|
424
|
+
interface Retuple<T, E> extends ResultLike<T, E> {
|
|
737
425
|
/**
|
|
738
426
|
* Returns true when this result is `Ok`. Acts as a type guard.
|
|
739
427
|
*
|
package/dist/index.js
CHANGED
|
@@ -273,400 +273,12 @@ function $safeRetry(f, mapError = ensureError) {
|
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
|
-
/**
|
|
277
|
-
* ## RetupleArray
|
|
278
|
-
*
|
|
279
|
-
* Using built-in array methods on a `Result` is probably a mistake. This class
|
|
280
|
-
* makes the built-in methods throw `RetupleArrayMethodUnavailableError`.
|
|
281
|
-
*/
|
|
282
|
-
class RetupleArray extends Array {
|
|
283
|
-
/**
|
|
284
|
-
* ## Method not available
|
|
285
|
-
*
|
|
286
|
-
* Built-in array methods not available on {@link Result} types.
|
|
287
|
-
*
|
|
288
|
-
* @deprecated
|
|
289
|
-
*/
|
|
290
|
-
at() {
|
|
291
|
-
throw new RetupleArrayMethodUnavailableError(this, "at");
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* ## Method not available
|
|
295
|
-
*
|
|
296
|
-
* Built-in array methods not available on {@link Result} types.
|
|
297
|
-
*
|
|
298
|
-
* @deprecated
|
|
299
|
-
*/
|
|
300
|
-
concat() {
|
|
301
|
-
throw new RetupleArrayMethodUnavailableError(this, "concat");
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* ## Method not available
|
|
305
|
-
*
|
|
306
|
-
* Built-in array methods not available on {@link Result} types.
|
|
307
|
-
*
|
|
308
|
-
* @deprecated
|
|
309
|
-
*/
|
|
310
|
-
copyWithin() {
|
|
311
|
-
throw new RetupleArrayMethodUnavailableError(this, "copyWithin");
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* ## Method not available
|
|
315
|
-
*
|
|
316
|
-
* Built-in array methods not available on {@link Result} types.
|
|
317
|
-
*
|
|
318
|
-
* @deprecated
|
|
319
|
-
*/
|
|
320
|
-
entries() {
|
|
321
|
-
throw new RetupleArrayMethodUnavailableError(this, "entries");
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* ## Method not available
|
|
325
|
-
*
|
|
326
|
-
* Built-in array methods not available on {@link Result} types.
|
|
327
|
-
*
|
|
328
|
-
* @deprecated
|
|
329
|
-
*/
|
|
330
|
-
every() {
|
|
331
|
-
throw new RetupleArrayMethodUnavailableError(this, "every");
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* ## Method not available
|
|
335
|
-
*
|
|
336
|
-
* Built-in array methods not available on {@link Result} types.
|
|
337
|
-
*
|
|
338
|
-
* @deprecated
|
|
339
|
-
*/
|
|
340
|
-
fill() {
|
|
341
|
-
throw new RetupleArrayMethodUnavailableError(this, "fill");
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* ## Method not available
|
|
345
|
-
*
|
|
346
|
-
* Built-in array methods not available on {@link Result} types.
|
|
347
|
-
*
|
|
348
|
-
* @deprecated
|
|
349
|
-
*/
|
|
350
|
-
filter() {
|
|
351
|
-
throw new RetupleArrayMethodUnavailableError(this, "filter");
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* ## Method not available
|
|
355
|
-
*
|
|
356
|
-
* Built-in array methods not available on {@link Result} types.
|
|
357
|
-
*
|
|
358
|
-
* @deprecated
|
|
359
|
-
*/
|
|
360
|
-
find() {
|
|
361
|
-
throw new RetupleArrayMethodUnavailableError(this, "find");
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* ## Method not available
|
|
365
|
-
*
|
|
366
|
-
* Built-in array methods not available on {@link Result} types.
|
|
367
|
-
*
|
|
368
|
-
* @deprecated
|
|
369
|
-
*/
|
|
370
|
-
findIndex() {
|
|
371
|
-
throw new RetupleArrayMethodUnavailableError(this, "findIndex");
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* ## Method not available
|
|
375
|
-
*
|
|
376
|
-
* Built-in array methods not available on {@link Result} types.
|
|
377
|
-
*
|
|
378
|
-
* @deprecated
|
|
379
|
-
*/
|
|
380
|
-
findLast() {
|
|
381
|
-
throw new RetupleArrayMethodUnavailableError(this, "findLast");
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* ## Method not available
|
|
385
|
-
*
|
|
386
|
-
* Built-in array methods not available on {@link Result} types.
|
|
387
|
-
*
|
|
388
|
-
* @deprecated
|
|
389
|
-
*/
|
|
390
|
-
findLastIndex() {
|
|
391
|
-
throw new RetupleArrayMethodUnavailableError(this, "findLastIndex");
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* ## Method not available
|
|
395
|
-
*
|
|
396
|
-
* Built-in array methods not available on {@link Result} types.
|
|
397
|
-
*
|
|
398
|
-
* @deprecated
|
|
399
|
-
*/
|
|
400
|
-
flat() {
|
|
401
|
-
throw new RetupleArrayMethodUnavailableError(this, "flat");
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* ## Method not available
|
|
405
|
-
*
|
|
406
|
-
* Built-in array methods not available on {@link Result} types.
|
|
407
|
-
*
|
|
408
|
-
* @deprecated
|
|
409
|
-
*/
|
|
410
|
-
flatMap() {
|
|
411
|
-
throw new RetupleArrayMethodUnavailableError(this, "flatMap");
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* ## Method not available
|
|
415
|
-
*
|
|
416
|
-
* Built-in array methods not available on {@link Result} types.
|
|
417
|
-
*
|
|
418
|
-
* @deprecated
|
|
419
|
-
*/
|
|
420
|
-
forEach() {
|
|
421
|
-
throw new RetupleArrayMethodUnavailableError(this, "forEach");
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* ## Method not available
|
|
425
|
-
*
|
|
426
|
-
* Built-in array methods not available on {@link Result} types.
|
|
427
|
-
*
|
|
428
|
-
* @deprecated
|
|
429
|
-
*/
|
|
430
|
-
includes() {
|
|
431
|
-
throw new RetupleArrayMethodUnavailableError(this, "includes");
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
* ## Method not available
|
|
435
|
-
*
|
|
436
|
-
* Built-in array methods not available on {@link Result} types.
|
|
437
|
-
*
|
|
438
|
-
* @deprecated
|
|
439
|
-
*/
|
|
440
|
-
indexOf() {
|
|
441
|
-
throw new RetupleArrayMethodUnavailableError(this, "indexOf");
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* ## Method not available
|
|
445
|
-
*
|
|
446
|
-
* Built-in array methods not available on {@link Result} types.
|
|
447
|
-
*
|
|
448
|
-
* @deprecated
|
|
449
|
-
*/
|
|
450
|
-
join() {
|
|
451
|
-
throw new RetupleArrayMethodUnavailableError(this, "join");
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* ## Method not available
|
|
455
|
-
*
|
|
456
|
-
* Built-in array methods not available on {@link Result} types.
|
|
457
|
-
*
|
|
458
|
-
* @deprecated
|
|
459
|
-
*/
|
|
460
|
-
keys() {
|
|
461
|
-
throw new RetupleArrayMethodUnavailableError(this, "keys");
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* ## Method not available
|
|
465
|
-
*
|
|
466
|
-
* Built-in array methods not available on {@link Result} types.
|
|
467
|
-
*
|
|
468
|
-
* @deprecated
|
|
469
|
-
*/
|
|
470
|
-
lastIndexOf() {
|
|
471
|
-
throw new RetupleArrayMethodUnavailableError(this, "lastIndexOf");
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* ## Method not available
|
|
475
|
-
*
|
|
476
|
-
* Built-in array methods not available on {@link Result} types.
|
|
477
|
-
*
|
|
478
|
-
* @deprecated
|
|
479
|
-
*/
|
|
480
|
-
map() {
|
|
481
|
-
throw new RetupleArrayMethodUnavailableError(this, "map");
|
|
482
|
-
}
|
|
483
|
-
/**
|
|
484
|
-
* ## Method not available
|
|
485
|
-
*
|
|
486
|
-
* Built-in array methods not available on {@link Result} types.
|
|
487
|
-
*
|
|
488
|
-
* @deprecated
|
|
489
|
-
*/
|
|
490
|
-
pop() {
|
|
491
|
-
throw new RetupleArrayMethodUnavailableError(this, "pop");
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* ## Method not available
|
|
495
|
-
*
|
|
496
|
-
* Built-in array methods not available on {@link Result} types.
|
|
497
|
-
*
|
|
498
|
-
* @deprecated
|
|
499
|
-
*/
|
|
500
|
-
push() {
|
|
501
|
-
throw new RetupleArrayMethodUnavailableError(this, "push");
|
|
502
|
-
}
|
|
503
|
-
/**
|
|
504
|
-
* ## Method not available
|
|
505
|
-
*
|
|
506
|
-
* Built-in array methods not available on {@link Result} types.
|
|
507
|
-
*
|
|
508
|
-
* @deprecated
|
|
509
|
-
*/
|
|
510
|
-
reduce() {
|
|
511
|
-
throw new RetupleArrayMethodUnavailableError(this, "reduce");
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* ## Method not available
|
|
515
|
-
*
|
|
516
|
-
* Built-in array methods not available on {@link Result} types.
|
|
517
|
-
*
|
|
518
|
-
* @deprecated
|
|
519
|
-
*/
|
|
520
|
-
reduceRight() {
|
|
521
|
-
throw new RetupleArrayMethodUnavailableError(this, "reduceRight");
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* ## Method not available
|
|
525
|
-
*
|
|
526
|
-
* Built-in array methods not available on {@link Result} types.
|
|
527
|
-
*
|
|
528
|
-
* @deprecated
|
|
529
|
-
*/
|
|
530
|
-
reverse() {
|
|
531
|
-
throw new RetupleArrayMethodUnavailableError(this, "reverse");
|
|
532
|
-
}
|
|
533
|
-
/**
|
|
534
|
-
* ## Method not available
|
|
535
|
-
*
|
|
536
|
-
* Built-in array methods not available on {@link Result} types.
|
|
537
|
-
*
|
|
538
|
-
* @deprecated
|
|
539
|
-
*/
|
|
540
|
-
shift() {
|
|
541
|
-
throw new RetupleArrayMethodUnavailableError(this, "shift");
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
* ## Method not available
|
|
545
|
-
*
|
|
546
|
-
* Built-in array methods not available on {@link Result} types.
|
|
547
|
-
*
|
|
548
|
-
* @deprecated
|
|
549
|
-
*/
|
|
550
|
-
slice() {
|
|
551
|
-
throw new RetupleArrayMethodUnavailableError(this, "slice");
|
|
552
|
-
}
|
|
553
|
-
/**
|
|
554
|
-
* ## Method not available
|
|
555
|
-
*
|
|
556
|
-
* Built-in array methods not available on {@link Result} types.
|
|
557
|
-
*
|
|
558
|
-
* @deprecated
|
|
559
|
-
*/
|
|
560
|
-
some() {
|
|
561
|
-
throw new RetupleArrayMethodUnavailableError(this, "some");
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* ## Method not available
|
|
565
|
-
*
|
|
566
|
-
* Built-in array methods not available on {@link Result} types.
|
|
567
|
-
*
|
|
568
|
-
* @deprecated
|
|
569
|
-
*/
|
|
570
|
-
sort() {
|
|
571
|
-
throw new RetupleArrayMethodUnavailableError(this, "sort");
|
|
572
|
-
}
|
|
573
|
-
/**
|
|
574
|
-
* ## Method not available
|
|
575
|
-
*
|
|
576
|
-
* Built-in array methods not available on {@link Result} types.
|
|
577
|
-
*
|
|
578
|
-
* @deprecated
|
|
579
|
-
*/
|
|
580
|
-
splice() {
|
|
581
|
-
throw new RetupleArrayMethodUnavailableError(this, "splice");
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* ## Method not available
|
|
585
|
-
*
|
|
586
|
-
* Built-in array methods not available on {@link Result} types.
|
|
587
|
-
*
|
|
588
|
-
* @deprecated
|
|
589
|
-
*/
|
|
590
|
-
toString() {
|
|
591
|
-
throw new RetupleArrayMethodUnavailableError(this, "toString");
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* ## Method not available
|
|
595
|
-
*
|
|
596
|
-
* Built-in array methods not available on {@link Result} types.
|
|
597
|
-
*
|
|
598
|
-
* @deprecated
|
|
599
|
-
*/
|
|
600
|
-
toLocaleString() {
|
|
601
|
-
throw new RetupleArrayMethodUnavailableError(this, "toLocaleString");
|
|
602
|
-
}
|
|
603
|
-
/**
|
|
604
|
-
* ## Method not available
|
|
605
|
-
*
|
|
606
|
-
* Built-in array methods not available on {@link Result} types.
|
|
607
|
-
*
|
|
608
|
-
* @deprecated
|
|
609
|
-
*/
|
|
610
|
-
toReversed() {
|
|
611
|
-
throw new RetupleArrayMethodUnavailableError(this, "toReversed");
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
* ## Method not available
|
|
615
|
-
*
|
|
616
|
-
* Built-in array methods not available on {@link Result} types.
|
|
617
|
-
*
|
|
618
|
-
* @deprecated
|
|
619
|
-
*/
|
|
620
|
-
toSorted() {
|
|
621
|
-
throw new RetupleArrayMethodUnavailableError(this, "toSorted");
|
|
622
|
-
}
|
|
623
|
-
/**
|
|
624
|
-
* ## Method not available
|
|
625
|
-
*
|
|
626
|
-
* Built-in array methods not available on {@link Result} types.
|
|
627
|
-
*
|
|
628
|
-
* @deprecated
|
|
629
|
-
*/
|
|
630
|
-
toSpliced() {
|
|
631
|
-
throw new RetupleArrayMethodUnavailableError(this, "toSpliced");
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* ## Method not available
|
|
635
|
-
*
|
|
636
|
-
* Built-in array methods not available on {@link Result} types.
|
|
637
|
-
*
|
|
638
|
-
* @deprecated
|
|
639
|
-
*/
|
|
640
|
-
unshift() {
|
|
641
|
-
throw new RetupleArrayMethodUnavailableError(this, "unshift");
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* ## Method not available
|
|
645
|
-
*
|
|
646
|
-
* Built-in array methods not available on {@link Result} types.
|
|
647
|
-
*
|
|
648
|
-
* @deprecated
|
|
649
|
-
*/
|
|
650
|
-
values() {
|
|
651
|
-
throw new RetupleArrayMethodUnavailableError(this, "values");
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* ## Method not available
|
|
655
|
-
*
|
|
656
|
-
* Built-in array methods not available on {@link Result} types.
|
|
657
|
-
*
|
|
658
|
-
* @deprecated
|
|
659
|
-
*/
|
|
660
|
-
with() {
|
|
661
|
-
throw new RetupleArrayMethodUnavailableError(this, "with");
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
276
|
/**
|
|
665
277
|
* ## ResultOk
|
|
666
278
|
*
|
|
667
279
|
* This is the `Ok` variant of a `Result`, used internally and not exported.
|
|
668
280
|
*/
|
|
669
|
-
class ResultOk extends
|
|
281
|
+
class ResultOk extends Array {
|
|
670
282
|
constructor(value) {
|
|
671
283
|
super(2);
|
|
672
284
|
this[0] = undefined;
|
|
@@ -806,7 +418,7 @@ class ResultOk extends RetupleArray {
|
|
|
806
418
|
*
|
|
807
419
|
* This is the `Err` variant of a `Result`, used internally and not exported.
|
|
808
420
|
*/
|
|
809
|
-
class ResultErr extends
|
|
421
|
+
class ResultErr extends Array {
|
|
810
422
|
constructor(err) {
|
|
811
423
|
super(2);
|
|
812
424
|
this[0] = err;
|