functype 0.58.1 → 0.59.1
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/{Tuple-DwyoW0ZP.d.ts → Tuple-De-FhPDq.d.ts} +4 -4
- package/dist/cli/exports.js +1 -1
- package/dist/cli/index.js +4 -4
- package/dist/do/index.d.ts +1 -1
- package/dist/do/index.js +1 -1
- package/dist/either/index.d.ts +1 -1
- package/dist/either/index.js +1 -1
- package/dist/{full-interfaces-CFgKdoOy.js → full-interfaces-B4FY6xGA.js} +21 -52
- package/dist/{index-VSAy-IRN.d.ts → index-BPe5pcCH.d.ts} +137 -70
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/list/index.d.ts +1 -1
- package/dist/list/index.js +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/map/index.js +1 -1
- package/dist/option/index.d.ts +1 -1
- package/dist/option/index.js +1 -1
- package/dist/set/index.d.ts +1 -1
- package/dist/set/index.js +1 -1
- package/dist/src-Co3npRp-.js +19 -0
- package/dist/try/index.d.ts +1 -1
- package/dist/try/index.js +1 -1
- package/dist/tuple/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/src-CmTVH4Yo.js +0 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Brand } from "./Brand-BJIRbUKB.js";
|
|
2
|
-
import { c as Pipe, l as Foldable, o as Serializable, r as Typeable, t as Tuple, u as Type } from "./Tuple-
|
|
2
|
+
import { c as Pipe, l as Foldable, o as Serializable, r as Typeable, t as Tuple, u as Type } from "./Tuple-De-FhPDq.js";
|
|
3
3
|
|
|
4
4
|
//#region src/error/ParseError.d.ts
|
|
5
5
|
declare const ParseError: (message?: string) => Error & {
|
|
@@ -36,7 +36,7 @@ type DoResult<T> = {
|
|
|
36
36
|
* The doUnwrap method should return a DoResult indicating success/failure
|
|
37
37
|
* and the contained value or error information
|
|
38
38
|
*/
|
|
39
|
-
interface Doable<T> {
|
|
39
|
+
interface Doable<out T> {
|
|
40
40
|
doUnwrap(): DoResult<T>;
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
@@ -48,7 +48,7 @@ interface Doable<T> {
|
|
|
48
48
|
* @interface Unsafe
|
|
49
49
|
* @template T The type of value that can be extracted
|
|
50
50
|
*/
|
|
51
|
-
interface Unsafe<T extends Type> {
|
|
51
|
+
interface Unsafe<out T extends Type> {
|
|
52
52
|
/**
|
|
53
53
|
* Extract the value or throw an error
|
|
54
54
|
* @param error Optional custom error to throw. If not provided, uses type-appropriate default error
|
|
@@ -61,24 +61,30 @@ interface Unsafe<T extends Type> {
|
|
|
61
61
|
* Extractable type class for data structures that can extract their values
|
|
62
62
|
* with various fallback strategies.
|
|
63
63
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
64
|
+
* Covariance: T is declared `<out T>`. The fallback methods `orElse` and `or`
|
|
65
|
+
* widen the result via `<T2>`, matching Scala's `getOrElse[B1 >: B](default: => B1): B1`
|
|
66
|
+
* shape — when the caller passes a T-typed default the result is just T, and when
|
|
67
|
+
* they pass a wider T2 the result union widens accordingly.
|
|
66
68
|
*
|
|
67
|
-
*
|
|
69
|
+
* Implementers that previously overrode `or`/`orElse` with widened signatures
|
|
70
|
+
* (Option, Either, Try) can inherit from this base directly; their 0.58-era
|
|
71
|
+
* `Omit<Extractable<T>, "or" | "orElse">` workarounds are no longer needed.
|
|
68
72
|
*/
|
|
69
|
-
interface Extractable<T extends Type> extends Unsafe<T> {
|
|
73
|
+
interface Extractable<out T extends Type> extends Unsafe<T> {
|
|
70
74
|
/**
|
|
71
|
-
* Returns the contained value or a default value
|
|
75
|
+
* Returns the contained value or a default value. The default may be of a
|
|
76
|
+
* different type; the result widens to `T | T2`.
|
|
72
77
|
* @param defaultValue - The value to return if extraction fails
|
|
73
78
|
* @returns The contained value or defaultValue
|
|
74
79
|
*/
|
|
75
|
-
orElse(defaultValue:
|
|
80
|
+
orElse<T2 extends Type>(defaultValue: T2): T | T2;
|
|
76
81
|
/**
|
|
77
|
-
* Returns this container if it has a value, otherwise returns the alternative container
|
|
82
|
+
* Returns this container if it has a value, otherwise returns the alternative container.
|
|
83
|
+
* The alternative may carry a different type; the result widens to `Extractable<T | T2>`.
|
|
78
84
|
* @param alternative - The alternative container
|
|
79
85
|
* @returns This container or the alternative
|
|
80
86
|
*/
|
|
81
|
-
or(alternative: Extractable<
|
|
87
|
+
or<T2 extends Type>(alternative: Extractable<T2>): Extractable<T | T2>;
|
|
82
88
|
/**
|
|
83
89
|
* Returns the contained value or null
|
|
84
90
|
* @returns The contained value or null
|
|
@@ -114,7 +120,7 @@ declare function isExtractable<T extends Type>(value: unknown): value is Extract
|
|
|
114
120
|
* .take(10)
|
|
115
121
|
* .toArray() // [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
|
|
116
122
|
*/
|
|
117
|
-
interface LazyList<A extends Type> extends Foldable<A>, Pipe<LazyList<A>>, Serializable<LazyList<A>>, Typeable<"LazyList"> {
|
|
123
|
+
interface LazyList<out A extends Type> extends Foldable<A>, Pipe<LazyList<A>>, Serializable<LazyList<A>>, Typeable<"LazyList"> {
|
|
118
124
|
readonly [Symbol.toStringTag]: string;
|
|
119
125
|
[Symbol.iterator](): Iterator<A>;
|
|
120
126
|
map<B extends Type>(f: (a: A) => B): LazyList<B>;
|
|
@@ -124,7 +130,8 @@ interface LazyList<A extends Type> extends Foldable<A>, Pipe<LazyList<A>>, Seria
|
|
|
124
130
|
drop(n: number): LazyList<A>;
|
|
125
131
|
takeWhile(predicate: (a: A) => boolean): LazyList<A>;
|
|
126
132
|
dropWhile(predicate: (a: A) => boolean): LazyList<A>;
|
|
127
|
-
|
|
133
|
+
/** Concatenate with another lazy list, possibly widening (Scala: `++[B >: A]`). */
|
|
134
|
+
concat<B extends Type>(other: LazyList<B>): LazyList<A | B>;
|
|
128
135
|
zip<B extends Type>(other: LazyList<B>): LazyList<[A, B]>;
|
|
129
136
|
takeRight(n: number): LazyList<A>;
|
|
130
137
|
reverse(): LazyList<A>;
|
|
@@ -244,7 +251,7 @@ declare const LazyList: (<A extends Type>(iterable: Iterable<A>) => LazyList<A>)
|
|
|
244
251
|
*
|
|
245
252
|
* @typeParam A - The type of value(s) in the container
|
|
246
253
|
*/
|
|
247
|
-
interface ContainerOps<A extends Type> {
|
|
254
|
+
interface ContainerOps<out A extends Type> {
|
|
248
255
|
/**
|
|
249
256
|
* Counts elements that satisfy the predicate.
|
|
250
257
|
* For single-value containers: returns 0 or 1
|
|
@@ -277,7 +284,7 @@ interface ContainerOps<A extends Type> {
|
|
|
277
284
|
* @typeParam A - The element type
|
|
278
285
|
* @typeParam Self - The collection type itself for proper return types
|
|
279
286
|
*/
|
|
280
|
-
interface CollectionOps<A extends Type, Self> {
|
|
287
|
+
interface CollectionOps<out A extends Type, Self> {
|
|
281
288
|
/**
|
|
282
289
|
* Left-associative fold over all elements using an initial value and combining function.
|
|
283
290
|
* Unlike foldLeft (which is curried), this provides a convenient uncurried signature.
|
|
@@ -358,7 +365,7 @@ interface CollectionOps<A extends Type, Self> {
|
|
|
358
365
|
* - Identity: fa.map(x => x) ≡ fa
|
|
359
366
|
* - Composition: fa.map(f).map(g) ≡ fa.map(x => g(f(x)))
|
|
360
367
|
*/
|
|
361
|
-
interface Functor<A extends Type> {
|
|
368
|
+
interface Functor<out A extends Type> {
|
|
362
369
|
map<B extends Type>(f: (value: A) => B): Functor<B>;
|
|
363
370
|
}
|
|
364
371
|
/**
|
|
@@ -370,7 +377,7 @@ interface Functor<A extends Type> {
|
|
|
370
377
|
* - Homomorphism: pure(f).ap(pure(x)) ≡ pure(f(x))
|
|
371
378
|
* - Interchange: u.ap(pure(y)) ≡ pure(f => f(y)).ap(u)
|
|
372
379
|
*/
|
|
373
|
-
interface Applicative<A extends Type> extends Functor<A> {
|
|
380
|
+
interface Applicative<out A extends Type> extends Functor<A> {
|
|
374
381
|
ap<B extends Type>(ff: Applicative<(value: A) => B>): Applicative<B>;
|
|
375
382
|
}
|
|
376
383
|
/**
|
|
@@ -381,14 +388,14 @@ interface Applicative<A extends Type> extends Functor<A> {
|
|
|
381
388
|
* - Right identity: m.flatMap(pure) ≡ m
|
|
382
389
|
* - Associativity: m.flatMap(f).flatMap(g) ≡ m.flatMap(x => f(x).flatMap(g))
|
|
383
390
|
*/
|
|
384
|
-
interface Monad<A extends Type> extends Applicative<A> {
|
|
391
|
+
interface Monad<out A extends Type> extends Applicative<A> {
|
|
385
392
|
flatMap<B extends Type>(f: (value: A) => Monad<B>): Monad<B>;
|
|
386
393
|
}
|
|
387
394
|
/**
|
|
388
395
|
* Async monad - supports asynchronous monadic operations
|
|
389
396
|
* Extends Monad so it has map, ap, and flatMap in addition to flatMapAsync
|
|
390
397
|
*/
|
|
391
|
-
interface AsyncMonad<A extends Type> extends Monad<A> {
|
|
398
|
+
interface AsyncMonad<out A extends Type> extends Monad<A> {
|
|
392
399
|
flatMapAsync<B extends Type>(f: (value: A) => PromiseLike<AsyncMonad<B>>): PromiseLike<AsyncMonad<B>>;
|
|
393
400
|
}
|
|
394
401
|
//#endregion
|
|
@@ -413,7 +420,7 @@ interface AsyncMonad<A extends Type> extends Monad<A> {
|
|
|
413
420
|
* // Promise rejects with "error"
|
|
414
421
|
* ```
|
|
415
422
|
*/
|
|
416
|
-
interface Promisable<A extends Type> {
|
|
423
|
+
interface Promisable<out A extends Type> {
|
|
417
424
|
/**
|
|
418
425
|
* Converts this container to a Promise
|
|
419
426
|
*
|
|
@@ -426,12 +433,68 @@ interface Promisable<A extends Type> {
|
|
|
426
433
|
toPromise(): Promise<A>;
|
|
427
434
|
}
|
|
428
435
|
//#endregion
|
|
436
|
+
//#region src/typeclass/variance.d.ts
|
|
437
|
+
/**
|
|
438
|
+
* Variance helpers — small utilities for expressing covariance-safe signatures
|
|
439
|
+
* when TypeScript's type system doesn't offer the exact constraint we need.
|
|
440
|
+
*
|
|
441
|
+
* Motivation: Scala has lower-bound type parameters like `def reduce[B >: A](op: (B, B) => B): B`
|
|
442
|
+
* — B must be a supertype of A. TypeScript lacks lower bounds, so a naive port
|
|
443
|
+
* (`reduce<B = A>(op: (b: B, a: B) => B): B`) lets the caller pick ANY B, including
|
|
444
|
+
* unrelated types. At runtime that's a footgun: `List<number>.reduce<string>(...)` would
|
|
445
|
+
* compile but run as number addition typed as string.
|
|
446
|
+
*
|
|
447
|
+
* `Widen<A, B>` closes that gap using a conditional type. When B is truly a supertype
|
|
448
|
+
* of A (including the default case B = A), `Widen<A, B>` is B. When B is unrelated,
|
|
449
|
+
* it resolves to `never`, which makes the callback uncallable and produces a compile
|
|
450
|
+
* error at the call site.
|
|
451
|
+
*
|
|
452
|
+
* @module typeclass/variance
|
|
453
|
+
*/
|
|
454
|
+
/**
|
|
455
|
+
* The TypeScript equivalent of Scala's `B >: A` (B is a supertype of A).
|
|
456
|
+
*
|
|
457
|
+
* Resolves to `B` when `A extends B` (i.e., B is a legitimate supertype of A, or B = A).
|
|
458
|
+
* Resolves to `never` otherwise, which renders any callback position using Widen
|
|
459
|
+
* uncallable — the user gets a compile-time error rather than a runtime type lie.
|
|
460
|
+
*
|
|
461
|
+
* @example
|
|
462
|
+
* ```ts
|
|
463
|
+
* // Inside a container interface:
|
|
464
|
+
* reduce<B = A>(op: (b: Widen<A, B>, a: Widen<A, B>) => Widen<A, B>): Widen<A, B>
|
|
465
|
+
*
|
|
466
|
+
* // Callers:
|
|
467
|
+
* list.reduce((a, b) => a + b) // B defaults to A, Widen<A,A> = A, fine
|
|
468
|
+
* list.reduce<A | "extra">(...) // A extends A | "extra", Widen = B, fine
|
|
469
|
+
* list.reduce<UnrelatedType>(...) // A doesn't extend Unrelated, Widen = never, compile error
|
|
470
|
+
* ```
|
|
471
|
+
*/
|
|
472
|
+
type Widen<A, B> = A extends B ? B : never;
|
|
473
|
+
/**
|
|
474
|
+
* Runtime-safe `reduce` over an array whose element type `A` may be narrower than
|
|
475
|
+
* the accumulator type `B`. Centralizes the single `as unknown as B` cast that's
|
|
476
|
+
* otherwise spread across every container's implementation.
|
|
477
|
+
*
|
|
478
|
+
* Safety: the cast is sound because the `Widen<A, B>` type-level constraint at the
|
|
479
|
+
* public API layer guarantees `A <: B`. When that holds, A values flowing into the
|
|
480
|
+
* callback are valid B values at runtime — exactly what Scala's `[B >: A]` provides.
|
|
481
|
+
*
|
|
482
|
+
* @param arr - source array of A values
|
|
483
|
+
* @param op - accumulator operation typed over B (where B is A or a supertype)
|
|
484
|
+
* @returns the folded value, typed as B
|
|
485
|
+
*/
|
|
486
|
+
declare const reduceWiden: <A, B>(arr: readonly A[], op: (b: B, a: B) => B) => B;
|
|
487
|
+
/**
|
|
488
|
+
* Right-associative variant of {@link reduceWiden}. Same safety argument.
|
|
489
|
+
*/
|
|
490
|
+
declare const reduceRightWiden: <A, B>(arr: readonly A[], op: (b: B, a: B) => B) => B;
|
|
491
|
+
//#endregion
|
|
429
492
|
//#region src/try/Try.d.ts
|
|
430
493
|
/**
|
|
431
494
|
* Possible types of Try instances
|
|
432
495
|
*/
|
|
433
496
|
type TypeNames = "Success" | "Failure";
|
|
434
|
-
interface Try<out T> extends FunctypeSum<T, TypeNames>,
|
|
497
|
+
interface Try<out T> extends FunctypeSum<T, TypeNames>, Extractable<T>, Pipe<T>, Promisable<T>, Doable<T>, Reshapeable<T> {
|
|
435
498
|
readonly _tag: TypeNames;
|
|
436
499
|
readonly error: Error | undefined;
|
|
437
500
|
isSuccess(): this is Try<T> & {
|
|
@@ -583,7 +646,7 @@ declare const Try: (<T>(f: () => T) => Try<T>) & {
|
|
|
583
646
|
* const asOption = result.toOption()
|
|
584
647
|
* asOption.map(x => x * 2).orElse(0)
|
|
585
648
|
*/
|
|
586
|
-
interface Reshapeable<T extends Type> {
|
|
649
|
+
interface Reshapeable<out T extends Type> {
|
|
587
650
|
/**
|
|
588
651
|
* Converts this monad to an Option.
|
|
589
652
|
*
|
|
@@ -1301,7 +1364,7 @@ interface TaskMetadata {
|
|
|
1301
1364
|
readonly name: string;
|
|
1302
1365
|
readonly description: string;
|
|
1303
1366
|
}
|
|
1304
|
-
interface TaskOutcome<T> extends FunctypeBase<T, "Ok" | "Err">, Extractable<T>, AsyncMonad<T>, Promisable<T>, Doable<T> {
|
|
1367
|
+
interface TaskOutcome<out T> extends FunctypeBase<T, "Ok" | "Err">, Extractable<T>, AsyncMonad<T>, Promisable<T>, Doable<T> {
|
|
1305
1368
|
readonly _tag: "Ok" | "Err";
|
|
1306
1369
|
readonly _meta: TaskMetadata;
|
|
1307
1370
|
readonly value?: T;
|
|
@@ -1312,8 +1375,8 @@ interface TaskOutcome<T> extends FunctypeBase<T, "Ok" | "Err">, Extractable<T>,
|
|
|
1312
1375
|
readonly mapAsync: <U>(f: (value: T) => Promise<U>) => Promise<TaskOutcome<U>>;
|
|
1313
1376
|
readonly flatMapAsync: <U>(f: (value: T) => Promise<TaskOutcome<U>>) => Promise<TaskOutcome<U>>;
|
|
1314
1377
|
readonly mapError: (f: (error: Throwable) => Throwable) => TaskOutcome<T>;
|
|
1315
|
-
|
|
1316
|
-
|
|
1378
|
+
recover<U extends Type>(value: U): Ok<T | U>;
|
|
1379
|
+
recoverWith<U extends Type>(f: (error: Throwable) => U): Ok<T | U>;
|
|
1317
1380
|
readonly isSuccess: () => this is Ok<T>;
|
|
1318
1381
|
readonly isFailure: () => this is Err<T>;
|
|
1319
1382
|
readonly isOk: () => this is Ok<T>;
|
|
@@ -1328,12 +1391,12 @@ interface TaskOutcome<T> extends FunctypeBase<T, "Ok" | "Err">, Extractable<T>,
|
|
|
1328
1391
|
Err: (error: Throwable) => U;
|
|
1329
1392
|
}) => U;
|
|
1330
1393
|
}
|
|
1331
|
-
interface Ok<T> extends TaskOutcome<T> {
|
|
1394
|
+
interface Ok<out T> extends TaskOutcome<T> {
|
|
1332
1395
|
readonly _tag: "Ok";
|
|
1333
1396
|
readonly value: T;
|
|
1334
1397
|
readonly error: undefined;
|
|
1335
1398
|
}
|
|
1336
|
-
interface Err<T> extends TaskOutcome<T> {
|
|
1399
|
+
interface Err<out T> extends TaskOutcome<T> {
|
|
1337
1400
|
readonly _tag: "Err";
|
|
1338
1401
|
readonly value: undefined;
|
|
1339
1402
|
readonly error: Throwable;
|
|
@@ -3394,9 +3457,16 @@ declare const HKT: {
|
|
|
3394
3457
|
};
|
|
3395
3458
|
//#endregion
|
|
3396
3459
|
//#region src/identity/Identity.d.ts
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3460
|
+
/**
|
|
3461
|
+
* Identity — a trivial container carrying a single tagged value.
|
|
3462
|
+
* Covariant in T (`<out T>`). `isSame` takes `Identity<unknown>` so that
|
|
3463
|
+
* cross-type equality checks (semantically always `false` for unrelated types)
|
|
3464
|
+
* don't block variance — mirroring the `contains(unknown)` pattern used on
|
|
3465
|
+
* List/Set/Map.
|
|
3466
|
+
*/
|
|
3467
|
+
type Identity<out T> = {
|
|
3468
|
+
readonly id: T;
|
|
3469
|
+
isSame?: (other: Identity<unknown>) => boolean;
|
|
3400
3470
|
};
|
|
3401
3471
|
declare const Identity: (<T>(value: T) => Identity<T>) & {
|
|
3402
3472
|
/**
|
|
@@ -3424,17 +3494,16 @@ declare const Identity: (<T>(value: T) => Identity<T>) & {
|
|
|
3424
3494
|
* It provides memoization and safe evaluation with integration to Option, Either, and Try.
|
|
3425
3495
|
* @typeParam T - The type of the value to be computed
|
|
3426
3496
|
*/
|
|
3427
|
-
interface Lazy<T extends Type> extends FunctypeBase<T, "Lazy">, Extractable<T>, Pipe<T> {
|
|
3497
|
+
interface Lazy<out T extends Type> extends FunctypeBase<T, "Lazy">, Extractable<T>, Pipe<T> {
|
|
3428
3498
|
/** Tag identifying this as a Lazy type */
|
|
3429
3499
|
readonly _tag: "Lazy";
|
|
3430
3500
|
/** Whether the computation has been evaluated */
|
|
3431
3501
|
readonly isEvaluated: boolean;
|
|
3432
3502
|
/**
|
|
3433
|
-
* Returns the computed value or a default value if computation fails
|
|
3434
|
-
*
|
|
3435
|
-
* @returns The computed value or defaultValue
|
|
3503
|
+
* Returns the computed value or a default value if computation fails.
|
|
3504
|
+
* Result widens to `T | T2` (Scala: `getOrElse[B >: A](default: B): B`).
|
|
3436
3505
|
*/
|
|
3437
|
-
orElse(defaultValue:
|
|
3506
|
+
orElse<T2 extends Type>(defaultValue: T2): T | T2;
|
|
3438
3507
|
/**
|
|
3439
3508
|
* Returns the computed value or null if computation fails
|
|
3440
3509
|
* @returns The computed value or null
|
|
@@ -3448,11 +3517,10 @@ interface Lazy<T extends Type> extends FunctypeBase<T, "Lazy">, Extractable<T>,
|
|
|
3448
3517
|
*/
|
|
3449
3518
|
orThrow(error?: Error): T;
|
|
3450
3519
|
/**
|
|
3451
|
-
* Returns this Lazy if computation succeeds, otherwise returns the alternative Lazy
|
|
3452
|
-
*
|
|
3453
|
-
* @returns This Lazy or the alternative
|
|
3520
|
+
* Returns this Lazy if computation succeeds, otherwise returns the alternative Lazy.
|
|
3521
|
+
* The alternative may carry a different type; result is `Lazy<T | T2>`.
|
|
3454
3522
|
*/
|
|
3455
|
-
or(alternative: Lazy<
|
|
3523
|
+
or<T2 extends Type>(alternative: Lazy<T2>): Lazy<T | T2>;
|
|
3456
3524
|
/**
|
|
3457
3525
|
* Maps the value inside the Lazy using the provided function
|
|
3458
3526
|
* @param f - The mapping function
|
|
@@ -3669,14 +3737,24 @@ declare const Lazy: (<T extends Type>(thunk: () => T) => Lazy<T>) & {
|
|
|
3669
3737
|
//#endregion
|
|
3670
3738
|
//#region src/traversable/Traversable.d.ts
|
|
3671
3739
|
/**
|
|
3672
|
-
* Traversable typeclass for data structures that can be traversed through
|
|
3740
|
+
* Traversable typeclass for data structures that can be traversed through.
|
|
3741
|
+
*
|
|
3742
|
+
* Covariance: A is declared `<out A>`. Query (`contains`) accepts `unknown` —
|
|
3743
|
+
* mirroring Scala's `contains(elem: Any)` — so an unrelated-type arg is a
|
|
3744
|
+
* sound `false` rather than a type error. Aggregations (`reduce`, `reduceRight`)
|
|
3745
|
+
* widen the accumulator via `<B = A>`, matching Scala's `reduce[B >: A]`; when
|
|
3746
|
+
* called without an explicit type arg the behavior is identical to the pre-0.59
|
|
3747
|
+
* signature, so existing call sites compile unchanged.
|
|
3748
|
+
*
|
|
3749
|
+
* Implementers that previously overrode these methods with the widened shape
|
|
3750
|
+
* (List, Set) can inherit from this base without a per-type override.
|
|
3673
3751
|
*/
|
|
3674
|
-
interface Traversable<A extends Type> extends AsyncMonad<A> {
|
|
3752
|
+
interface Traversable<out A extends Type> extends AsyncMonad<A> {
|
|
3675
3753
|
get size(): number;
|
|
3676
3754
|
get isEmpty(): boolean;
|
|
3677
|
-
contains(value:
|
|
3678
|
-
reduce(
|
|
3679
|
-
reduceRight(
|
|
3755
|
+
contains(value: unknown): boolean;
|
|
3756
|
+
reduce<B = A>(op: (b: Widen<A, B>, a: Widen<A, B>) => Widen<A, B>): Widen<A, B>;
|
|
3757
|
+
reduceRight<B = A>(op: (b: Widen<A, B>, a: Widen<A, B>) => Widen<A, B>): Widen<A, B>;
|
|
3680
3758
|
}
|
|
3681
3759
|
//#endregion
|
|
3682
3760
|
//#region src/traversable/KVTraversable.d.ts
|
|
@@ -3694,7 +3772,7 @@ interface Traversable<A extends Type> extends AsyncMonad<A> {
|
|
|
3694
3772
|
type KVTraversable<A> = Omit<Traversable<A>, "map" | "flatMap" | "flatMapAsync" | "ap">;
|
|
3695
3773
|
//#endregion
|
|
3696
3774
|
//#region src/map/Map.d.ts
|
|
3697
|
-
interface Map$1<K, V> extends KVTraversable<Tuple<[K, V]>>, Collection<Tuple<[K, V]>>, Typeable<"Map">, Serializable<[K, V][]>, Pipe<[K, V][]>, Foldable<Tuple<[K, V]>>, Iterable<[K, V]> {
|
|
3775
|
+
interface Map$1<K, out V> extends KVTraversable<Tuple<[K, V]>>, Collection<Tuple<[K, V]>>, Typeable<"Map">, Serializable<[K, V][]>, Pipe<[K, V][]>, Foldable<Tuple<[K, V]>>, Iterable<[K, V]> {
|
|
3698
3776
|
readonly [Symbol.toStringTag]: string;
|
|
3699
3777
|
readonly _tag: "Map";
|
|
3700
3778
|
add(item: Tuple<[K, V]>): Map$1<K, V>;
|
|
@@ -3778,7 +3856,7 @@ declare const ESMap: MapConstructor;
|
|
|
3778
3856
|
* @typeParam A - The type of elements in the data structure
|
|
3779
3857
|
* @typeParam Tags - The type of tags used for pattern matching
|
|
3780
3858
|
*/
|
|
3781
|
-
interface Matchable<A, Tags extends string = string> {
|
|
3859
|
+
interface Matchable<out A, Tags extends string = string> {
|
|
3782
3860
|
/**
|
|
3783
3861
|
* Pattern matches against this data structure, applying handlers for each variant based on tag.
|
|
3784
3862
|
* Similar to fold but with stronger type safety for tag-based variants.
|
|
@@ -4001,6 +4079,14 @@ declare const Obj: (<T extends Record<string, Type>>(data: T) => Obj<T>) & {
|
|
|
4001
4079
|
* A mutable reference container that holds a value of type A.
|
|
4002
4080
|
* This provides controlled mutability in a functional context.
|
|
4003
4081
|
*
|
|
4082
|
+
* **Variance: invariant in A by design.** Ref is a mutable cell — `set(A)`
|
|
4083
|
+
* writes A (contravariant) and `get(): A` reads A (covariant), so A is
|
|
4084
|
+
* genuinely invariant. Unlike the other containers in functype, Ref has no
|
|
4085
|
+
* `<out A>` annotation and cannot be widened via subtyping. This mirrors
|
|
4086
|
+
* Scala's `scala.concurrent.stm.Ref` and reflects the fundamental nature of
|
|
4087
|
+
* mutable state: you can't safely treat a `Ref[Narrow]` as a `Ref[Wide]`
|
|
4088
|
+
* because someone could `set` a Wide value that isn't a Narrow.
|
|
4089
|
+
*
|
|
4004
4090
|
* @example
|
|
4005
4091
|
* const counter = Ref(0)
|
|
4006
4092
|
* counter.get() // 0
|
|
@@ -4131,15 +4217,12 @@ declare const createSerializationCompanion: <T>(reconstructor: (parsed: {
|
|
|
4131
4217
|
interface Set<out A> extends FunctypeCollection<A, "Set">, Collection<A> {
|
|
4132
4218
|
add<B>(value: B): Set<A | B>;
|
|
4133
4219
|
remove: (value: unknown) => Set<A>;
|
|
4134
|
-
contains(value: unknown): boolean;
|
|
4135
4220
|
has(value: unknown): boolean;
|
|
4136
4221
|
map: <B>(f: (a: A) => B) => Set<B>;
|
|
4137
4222
|
flatMap: <B>(f: (a: A) => Iterable<B>) => Set<B>;
|
|
4138
4223
|
filter: (p: (a: A) => boolean) => Set<A>;
|
|
4139
4224
|
filterNot: (p: (a: A) => boolean) => Set<A>;
|
|
4140
4225
|
fold: <B>(initial: B, fn: (acc: B, a: A) => B) => B;
|
|
4141
|
-
reduce<B = A>(op: (b: B, a: B) => B): B;
|
|
4142
|
-
reduceRight<B = A>(op: (b: B, a: B) => B): B;
|
|
4143
4226
|
toList: () => List<A>;
|
|
4144
4227
|
toSet: () => Set<A>;
|
|
4145
4228
|
toArray: <B = A>() => B[];
|
|
@@ -4215,11 +4298,12 @@ type Valuable<Tag extends string, V, T = object> = Typeable<Tag, T> & {
|
|
|
4215
4298
|
type Stack<A extends Type> = {
|
|
4216
4299
|
readonly [Symbol.toStringTag]: string;
|
|
4217
4300
|
/**
|
|
4218
|
-
* Push a value onto the top of the stack
|
|
4301
|
+
* Push a value onto the top of the stack. The value may be a wider type;
|
|
4302
|
+
* the result widens to `Stack<A | B>` (Scala: `:+[B >: A]`).
|
|
4219
4303
|
* @param value - The value to push
|
|
4220
4304
|
* @returns A new Stack with the value added
|
|
4221
4305
|
*/
|
|
4222
|
-
push(value:
|
|
4306
|
+
push<B extends Type>(value: B): Stack<A | B>;
|
|
4223
4307
|
/**
|
|
4224
4308
|
* Remove and return the top value from the stack
|
|
4225
4309
|
* @returns A tuple containing the new Stack and the value
|
|
@@ -4408,18 +4492,6 @@ interface Option<out T extends Type> extends Functype<T, "Some" | "None">, Promi
|
|
|
4408
4492
|
* @returns Promise of the result of applying f to the contained value, or None if this Option is None
|
|
4409
4493
|
*/
|
|
4410
4494
|
flatMapAsync<U extends Type>(f: (value: T) => Promise<Option<U>>): Promise<Option<U>>;
|
|
4411
|
-
/**
|
|
4412
|
-
* Applies a binary operator to a start value and the contained value
|
|
4413
|
-
* @param f - The binary operator
|
|
4414
|
-
* @returns The result of the reduction
|
|
4415
|
-
*/
|
|
4416
|
-
reduce<U>(f: (acc: U, value: T) => U): U;
|
|
4417
|
-
/**
|
|
4418
|
-
* Applies a binary operator to the contained value and a start value
|
|
4419
|
-
* @param f - The binary operator
|
|
4420
|
-
* @returns The result of the reduction
|
|
4421
|
-
*/
|
|
4422
|
-
reduceRight<U>(f: (acc: U, value: T) => U): U;
|
|
4423
4495
|
/**
|
|
4424
4496
|
* Pattern matches over the Option, applying onNone if None and onSome if Some
|
|
4425
4497
|
* @param onNone - Function to apply if the Option is None
|
|
@@ -4614,11 +4686,6 @@ interface List<out A> extends FunctypeCollection<A, "List">, Doable<A>, Reshapea
|
|
|
4614
4686
|
partition: (p: (a: A) => boolean) => [List<A>, List<A>];
|
|
4615
4687
|
span: (p: (a: A) => boolean) => [List<A>, List<A>];
|
|
4616
4688
|
slice: (start: number, end: number) => List<A>;
|
|
4617
|
-
/** Contains check. Accepts `unknown` (Scala: `contains(elem: Any)`). */
|
|
4618
|
-
contains(value: unknown): boolean;
|
|
4619
|
-
/** Reduce with a possibly-wider accumulator type (Scala: `reduce[B >: A]`). Defaults to `B = A`. */
|
|
4620
|
-
reduce<B = A>(op: (b: B, a: B) => B): B;
|
|
4621
|
-
reduceRight<B = A>(op: (b: B, a: B) => B): B;
|
|
4622
4689
|
/**
|
|
4623
4690
|
* Pattern matches over the List, applying a handler function based on whether it's empty
|
|
4624
4691
|
* @param patterns - Object with handler functions for Empty and NonEmpty variants
|
|
@@ -4768,7 +4835,7 @@ interface FunctypeSum<A extends Type, Tag extends string = string> extends Async
|
|
|
4768
4835
|
* union. After `if (e.isLeft())`, the else branch narrows `e` to RightOf<L,R> and
|
|
4769
4836
|
* `e.value` narrows to R without a cast.
|
|
4770
4837
|
*/
|
|
4771
|
-
interface EitherBase<out L extends Type, out R extends Type> extends FunctypeSum<R, "Left" | "Right">, Promisable<R>, Doable<R>, Reshapeable<R>,
|
|
4838
|
+
interface EitherBase<out L extends Type, out R extends Type> extends FunctypeSum<R, "Left" | "Right">, Promisable<R>, Doable<R>, Reshapeable<R>, Extractable<R> {
|
|
4772
4839
|
isLeft(): this is LeftOf<L, R>;
|
|
4773
4840
|
isRight(): this is RightOf<L, R>;
|
|
4774
4841
|
orElse<R2 extends Type>(defaultValue: R2): R | R2;
|
|
@@ -5128,4 +5195,4 @@ interface FailureErrorType extends Error {
|
|
|
5128
5195
|
}
|
|
5129
5196
|
declare const FailureError: (cause: Error, message?: string) => FailureErrorType;
|
|
5130
5197
|
//#endregion
|
|
5131
|
-
export { Map$1 as $,
|
|
5198
|
+
export { Map$1 as $, reduceWiden as $n, TypedErrorContext as $t, Collection as A, Cond as An, Task as At, SerializationResult as B, NonEmptyString as Bn, ContextServices as Bt, isRight as C, isTaggedThrowable as Cn, HttpClientConfig as Ct, Functype as D, Base as Dn, IO as Dt, FunctypeSum as E, ThrowableType as En, TestContext as Et, Some as F, BoundedNumber as Fn, LayerInput as Ft, fromJSON as G, UUID as Gn, FormValidation as Gt, createSerializationCompanion as H, PatternString as Hn, Tag as Ht, Stack as I, BoundedString as In, LayerOutput as It, Obj as J, ValidatedBrandCompanion as Jn, Validator as Jt, fromYAML as K, UrlString as Kn, Validation as Kt, Valuable as L, EmailAddress as Ln, Exit as Lt, None as M, InstanceType as Mn, UIO as Mt, Option as N, isCompanion as Nn, Layer as Nt, FunctypeBase as O, Match as On, InterruptedError as Ot, OptionConstructor as P, Companion as Pn, LayerError as Pt, ESMapType as Q, reduceRightWiden as Qn, TypedError as Qt, ValuableParams as R, ISO8601Date as Rn, ExitTag as Rt, isLeft as S, createCancellationTokenSource as Sn, HttpClient as St, tryCatchAsync as T, Throwable as Tn, TestClockTag as Tt, createSerializer as U, PositiveInteger as Un, TagService as Ut, createCustomSerializer as V, NonNegativeNumber as Vn, HasService as Vt, fromBinary as W, PositiveNumber as Wn, FieldValidation as Wt, MatchableUtils as X, TypeNames as Xn, ErrorMessage as Xt, Matchable as Y, Try as Yn, ErrorCode as Yt, ESMap as Z, Widen as Zn, ErrorStatus as Zt, Right as _, TaskMetadata as _n, DecodeError as _t, EmptyListError as a, formatError as an, CollectionOps as ar, HKT as at, TypeCheckLeft as b, TaskResult as bn, HttpStatusError as bt, LeftError as c, Async as cn, Extractable as cr, OptionKind as ct, isDoCapable as d, Err as dn, Doable as dr, FoldableUtils as dt, ErrorChainElement as en, Promisable as er, KVTraversable as et, unwrap as f, Ok as fn, ParseError as fr, Http as ft, LeftOf as g, TaskFailure as gn, ParseMode as gt, Left as h, Task$1 as hn, HttpResponse as ht, DoGenerator as i, createErrorSerializer as in, Monad as ir, EitherKind as it, List as j, CompanionMethods as jn, TimeoutError as jt, FunctypeCollection as k, UntypedMatch as kn, RIO as kt, LeftErrorType as l, CancellationToken as ln, isExtractable as lr, TryKind as lt, EitherBase as m, TaggedThrowable as mn, HttpRequestOptions as mt, Do as n, ErrorWithTaskInfo as nn, AsyncMonad as nr, Lazy as nt, FailureError as o, formatStackTrace as on, ContainerOps as or, Kind as ot, Either as p, Sync as pn, HttpMethodOptions as pt, Ref as q, ValidatedBrand as qn, ValidationRule as qt, DoAsync as r, TaskErrorInfo as rn, Functor as rr, Identity as rt, FailureErrorType as s, safeStringify as sn, LazyList as sr, ListKind as st, $ as t, ErrorFormatterOptions as tn, Applicative as tr, Traversable as tt, NoneError as u, CancellationTokenSource as un, DoResult as ur, UniversalContainer as ut, RightOf as v, TaskOutcome as vn, HttpError as vt, tryCatch as w, NAME as wn, TestClock as wt, TypeCheckRight as x, TaskSuccess as xn, NetworkError as xt, TestEither as y, TaskParams as yn, HttpMethod as yt, Set as z, IntegerNumber as zn, Context as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as ExtractBrand, c as hasBrand, i as BrandedString, l as unwrapBrand, n as BrandedBoolean, o as Unwrap, r as BrandedNumber, s as createBrander, t as Brand } from "./Brand-BJIRbUKB.js";
|
|
2
|
-
import { $ as Map, $n as
|
|
3
|
-
import { a as isTypeable, c as Pipe, i as TypeableParams, l as Foldable, n as ExtractTag, o as Serializable, r as Typeable, s as SerializationMethods, t as Tuple, u as Type } from "./Tuple-
|
|
4
|
-
export { $, Applicative, Async, AsyncMonad, Base, BoundedNumber, BoundedString, Brand, BrandedBoolean, BrandedBoolean as BrandedBooleanType, BrandedNumber, BrandedNumber as BrandedNumberType, BrandedString, BrandedString as BrandedStringType, CancellationToken, CancellationTokenSource, Collection, CollectionOps, Companion, CompanionMethods, Cond, ContainerOps, Context, Context as ContextType, ContextServices, DecodeError, Do, DoAsync, DoGenerator, DoResult, Doable, ESMap, ESMapType, Either, EitherBase, EitherKind, EmailAddress, EmptyListError, Err, ErrorChainElement, ErrorCode, ErrorFormatterOptions, ErrorMessage, ErrorStatus, ErrorWithTaskInfo, Exit, Exit as ExitType, ExitTag, ExtractBrand, ExtractTag, Extractable, FailureError, FailureErrorType, FieldValidation, Foldable, FoldableUtils, FormValidation, Functor, Functype, FunctypeBase, FunctypeCollection, FunctypeSum, HKT, HasService, Http, HttpClient, HttpClientConfig, HttpError, HttpError as HttpErrors, HttpMethod, HttpMethodOptions, HttpRequestOptions, HttpResponse, HttpStatusError, IO, IO as IOType, Task as IOTask, ISO8601Date, Identity, InstanceType, IntegerNumber, InterruptedError, KVTraversable, Kind, Layer, Layer as LayerType, LayerError, LayerInput, LayerOutput, Lazy, Lazy as LazyType, LazyList, Left, LeftError, LeftErrorType, LeftOf, List, ListKind, Map, Match, Matchable, MatchableUtils, Monad, NAME, NetworkError, NonEmptyString, NonNegativeNumber, None, NoneError, Obj, Ok, Option, OptionConstructor, OptionKind, ParseError, ParseMode, PatternString, Pipe, PositiveInteger, PositiveNumber, Promisable, RIO, Ref, Ref as RefType, Right, RightOf, Serializable, SerializationMethods, SerializationResult, Set, Some, Stack, Sync, Tag, Tag as TagType, TagService, TaggedThrowable, Task$1 as Task, TaskErrorInfo, TaskFailure, TaskMetadata, TaskOutcome, TaskParams, TaskResult, TaskSuccess, TestClock, TestClock as TestClockType, TestClockTag, TestContext, TestContext as TestContextType, TestEither, Throwable, ThrowableType, TimeoutError, Traversable, Try, TryKind, Tuple, Type, TypeCheckLeft, TypeCheckRight, TypeNames, Typeable, TypeableParams, TypedError, TypedErrorContext, UIO, UUID, UniversalContainer, UntypedMatch, Unwrap, UrlString, ValidatedBrand, ValidatedBrand as ValidatedBrandType, ValidatedBrandCompanion, Validation, ValidationRule, Validator, Valuable, ValuableParams, createBrander, createCancellationTokenSource, createCustomSerializer, createErrorSerializer, createSerializationCompanion, createSerializer, formatError, formatStackTrace, fromBinary, fromJSON, fromYAML, hasBrand, isCompanion, isDoCapable, isExtractable, isLeft, isRight, isTaggedThrowable, isTypeable, safeStringify, tryCatch, tryCatchAsync, unwrap, unwrapBrand };
|
|
2
|
+
import { $ as Map, $n as reduceWiden, $t as TypedErrorContext, A as Collection, An as Cond, At as Task, B as SerializationResult, Bn as NonEmptyString, Bt as ContextServices, C as isRight, Cn as isTaggedThrowable, Ct as HttpClientConfig, D as Functype, Dn as Base, Dt as IO, E as FunctypeSum, En as ThrowableType, Et as TestContext, F as Some, Fn as BoundedNumber, Ft as LayerInput, G as fromJSON, Gn as UUID, Gt as FormValidation, H as createSerializationCompanion, Hn as PatternString, Ht as Tag, I as Stack, In as BoundedString, It as LayerOutput, J as Obj, Jn as ValidatedBrandCompanion, Jt as Validator, K as fromYAML, Kn as UrlString, Kt as Validation, L as Valuable, Ln as EmailAddress, Lt as Exit, M as None, Mn as InstanceType, Mt as UIO, N as Option, Nn as isCompanion, Nt as Layer, O as FunctypeBase, On as Match, Ot as InterruptedError, P as OptionConstructor, Pn as Companion, Pt as LayerError, Q as ESMapType, Qn as reduceRightWiden, Qt as TypedError, R as ValuableParams, Rn as ISO8601Date, Rt as ExitTag, S as isLeft, Sn as createCancellationTokenSource, St as HttpClient, T as tryCatchAsync, Tn as Throwable, Tt as TestClockTag, U as createSerializer, Un as PositiveInteger, Ut as TagService, V as createCustomSerializer, Vn as NonNegativeNumber, Vt as HasService, W as fromBinary, Wn as PositiveNumber, Wt as FieldValidation, X as MatchableUtils, Xn as TypeNames, Xt as ErrorMessage, Y as Matchable, Yn as Try, Yt as ErrorCode, Z as ESMap, Zn as Widen, Zt as ErrorStatus, _ as Right, _n as TaskMetadata, _t as DecodeError, a as EmptyListError, an as formatError, ar as CollectionOps, at as HKT, b as TypeCheckLeft, bn as TaskResult, bt as HttpStatusError, c as LeftError, cn as Async, cr as Extractable, ct as OptionKind, d as isDoCapable, dn as Err, dr as Doable, dt as FoldableUtils, en as ErrorChainElement, er as Promisable, et as KVTraversable, f as unwrap, fn as Ok, fr as ParseError, ft as Http, g as LeftOf, gn as TaskFailure, gt as ParseMode, h as Left, hn as Task$1, ht as HttpResponse, i as DoGenerator, in as createErrorSerializer, ir as Monad, it as EitherKind, j as List, jn as CompanionMethods, jt as TimeoutError, k as FunctypeCollection, kn as UntypedMatch, kt as RIO, l as LeftErrorType, ln as CancellationToken, lr as isExtractable, lt as TryKind, m as EitherBase, mn as TaggedThrowable, mt as HttpRequestOptions, n as Do, nn as ErrorWithTaskInfo, nr as AsyncMonad, nt as Lazy, o as FailureError, on as formatStackTrace, or as ContainerOps, ot as Kind, p as Either, pn as Sync, pt as HttpMethodOptions, q as Ref, qn as ValidatedBrand, qt as ValidationRule, r as DoAsync, rn as TaskErrorInfo, rr as Functor, rt as Identity, s as FailureErrorType, sn as safeStringify, sr as LazyList, st as ListKind, t as $, tn as ErrorFormatterOptions, tr as Applicative, tt as Traversable, u as NoneError, un as CancellationTokenSource, ur as DoResult, ut as UniversalContainer, v as RightOf, vn as TaskOutcome, vt as HttpError, w as tryCatch, wn as NAME, wt as TestClock, x as TypeCheckRight, xn as TaskSuccess, xt as NetworkError, y as TestEither, yn as TaskParams, yt as HttpMethod, z as Set, zn as IntegerNumber, zt as Context } from "./index-BPe5pcCH.js";
|
|
3
|
+
import { a as isTypeable, c as Pipe, i as TypeableParams, l as Foldable, n as ExtractTag, o as Serializable, r as Typeable, s as SerializationMethods, t as Tuple, u as Type } from "./Tuple-De-FhPDq.js";
|
|
4
|
+
export { $, Applicative, Async, AsyncMonad, Base, BoundedNumber, BoundedString, Brand, BrandedBoolean, BrandedBoolean as BrandedBooleanType, BrandedNumber, BrandedNumber as BrandedNumberType, BrandedString, BrandedString as BrandedStringType, CancellationToken, CancellationTokenSource, Collection, CollectionOps, Companion, CompanionMethods, Cond, ContainerOps, Context, Context as ContextType, ContextServices, DecodeError, Do, DoAsync, DoGenerator, DoResult, Doable, ESMap, ESMapType, Either, EitherBase, EitherKind, EmailAddress, EmptyListError, Err, ErrorChainElement, ErrorCode, ErrorFormatterOptions, ErrorMessage, ErrorStatus, ErrorWithTaskInfo, Exit, Exit as ExitType, ExitTag, ExtractBrand, ExtractTag, Extractable, FailureError, FailureErrorType, FieldValidation, Foldable, FoldableUtils, FormValidation, Functor, Functype, FunctypeBase, FunctypeCollection, FunctypeSum, HKT, HasService, Http, HttpClient, HttpClientConfig, HttpError, HttpError as HttpErrors, HttpMethod, HttpMethodOptions, HttpRequestOptions, HttpResponse, HttpStatusError, IO, IO as IOType, Task as IOTask, ISO8601Date, Identity, InstanceType, IntegerNumber, InterruptedError, KVTraversable, Kind, Layer, Layer as LayerType, LayerError, LayerInput, LayerOutput, Lazy, Lazy as LazyType, LazyList, Left, LeftError, LeftErrorType, LeftOf, List, ListKind, Map, Match, Matchable, MatchableUtils, Monad, NAME, NetworkError, NonEmptyString, NonNegativeNumber, None, NoneError, Obj, Ok, Option, OptionConstructor, OptionKind, ParseError, ParseMode, PatternString, Pipe, PositiveInteger, PositiveNumber, Promisable, RIO, Ref, Ref as RefType, Right, RightOf, Serializable, SerializationMethods, SerializationResult, Set, Some, Stack, Sync, Tag, Tag as TagType, TagService, TaggedThrowable, Task$1 as Task, TaskErrorInfo, TaskFailure, TaskMetadata, TaskOutcome, TaskParams, TaskResult, TaskSuccess, TestClock, TestClock as TestClockType, TestClockTag, TestContext, TestContext as TestContextType, TestEither, Throwable, ThrowableType, TimeoutError, Traversable, Try, TryKind, Tuple, Type, TypeCheckLeft, TypeCheckRight, TypeNames, Typeable, TypeableParams, TypedError, TypedErrorContext, UIO, UUID, UniversalContainer, UntypedMatch, Unwrap, UrlString, ValidatedBrand, ValidatedBrand as ValidatedBrandType, ValidatedBrandCompanion, Validation, ValidationRule, Validator, Valuable, ValuableParams, Widen, createBrander, createCancellationTokenSource, createCustomSerializer, createErrorSerializer, createSerializationCompanion, createSerializer, formatError, formatStackTrace, fromBinary, fromJSON, fromYAML, hasBrand, isCompanion, isDoCapable, isExtractable, isLeft, isRight, isTaggedThrowable, isTypeable, reduceRightWiden, reduceWiden, safeStringify, tryCatch, tryCatchAsync, unwrap, unwrapBrand };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Brand as e,BrandedBoolean as t,BrandedNumber as n,BrandedString as r,createBrander as i,hasBrand as a,unwrap as o}from"./branded/index.js";import{$ as s,A as c,At as l,B as u,C as d,Ct as f,D as p,Dt as m,E as h,Et as g,F as _,Ft as v,G as y,H as b,I as x,It as S,J as C,K as w,L as T,
|
|
1
|
+
import{Brand as e,BrandedBoolean as t,BrandedNumber as n,BrandedString as r,createBrander as i,hasBrand as a,unwrap as o}from"./branded/index.js";import{$ as s,A as c,At as l,B as u,C as d,Ct as f,D as p,Dt as m,E as h,Et as g,F as _,Ft as v,G as y,H as b,I as x,It as S,J as C,K as w,L as T,Lt as E,M as D,Mt as O,N as k,Nt as A,O as j,Ot as M,P as N,Pt as P,Q as F,R as I,Rt as L,S as R,St as z,T as B,Tt as V,U as H,V as U,W,X as G,Y as K,Z as q,_ as J,_t as Y,a as X,at as Z,b as Q,bt as $,c as ee,ct as te,d as ne,dt as re,et as ie,f as ae,ft as oe,g as se,gt as ce,h as le,ht as ue,i as de,it as fe,j as pe,jt as me,k as he,kt as ge,l as _e,lt as ve,m as ye,mt as be,n as xe,nt as Se,o as Ce,ot as we,p as Te,pt as Ee,q as De,r as Oe,rt as ke,s as Ae,st as je,t as Me,tt as Ne,u as Pe,ut as Fe,v as Ie,vt as Le,w as Re,wt as ze,x as Be,xt as Ve,y as He,yt as Ue,z as We}from"./src-Co3npRp-.js";import{r as Ge,t as Ke}from"./Tuple-DY00RBep.js";export{pe as $,De as Base,q as BoundedNumber,F as BoundedString,e as Brand,t as BrandedBoolean,n as BrandedNumber,r as BrandedString,Ge as Companion,K as Cond,d as Context,D as Do,k as DoAsync,Ce as ESMap,Fe as Either,s as EmailAddress,N as EmptyListError,u as Err,R as Exit,_ as FailureError,Pe as FoldableUtils,_e as HKT,ne as Http,Te as HttpClient,ae as HttpErrors,He as IO,ie as ISO8601Date,ee as Identity,Ne as IntegerNumber,Q as InterruptedError,Ie as Layer,Ae as Lazy,f as LazyList,re as Left,x as LeftError,Ue as List,X as Map,C as Match,de as MatchableUtils,y as NAME,Se as NonEmptyString,ke as NonNegativeNumber,M as None,T as NoneError,Oe as Obj,U as Ok,ge as Option,l as OptionConstructor,L as ParseError,fe as PatternString,Z as PositiveInteger,we as PositiveNumber,ze as Ref,oe as Right,V as Set,me as Some,xe as Stack,J as Tag,b as Task,ye as TestClock,le as TestClockTag,se as TestContext,w as Throwable,Be as TimeoutError,z as Try,Ke as Tuple,Ee as TypeCheckLeft,be as TypeCheckRight,$ as Typeable,h as TypedError,je as UUID,te as UrlString,ve as ValidatedBrand,B as Validation,Me as Valuable,i as createBrander,H as createCancellationTokenSource,O as createCustomSerializer,p as createErrorSerializer,A as createSerializationCompanion,P as createSerializer,j as formatError,he as formatStackTrace,v as fromBinary,S as fromJSON,E as fromYAML,a as hasBrand,G as isCompanion,I as isDoCapable,Re as isExtractable,ue as isLeft,ce as isRight,W as isTaggedThrowable,Ve as isTypeable,g as reduceRightWiden,m as reduceWiden,c as safeStringify,Y as tryCatch,Le as tryCatchAsync,We as unwrap,o as unwrapBrand};
|
package/dist/list/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { j as List } from "../index-
|
|
1
|
+
import { j as List } from "../index-BPe5pcCH.js";
|
|
2
2
|
export { List };
|
package/dist/list/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"../src-
|
|
1
|
+
import{yt as e}from"../src-Co3npRp-.js";export{e as List};
|
package/dist/map/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as Map } from "../index-
|
|
1
|
+
import { $ as Map } from "../index-BPe5pcCH.js";
|
|
2
2
|
export { Map };
|
package/dist/map/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"../src-
|
|
1
|
+
import{a as e}from"../src-Co3npRp-.js";export{e as Map};
|
package/dist/option/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as Some, M as None, N as Option, P as OptionConstructor } from "../index-
|
|
1
|
+
import { F as Some, M as None, N as Option, P as OptionConstructor } from "../index-BPe5pcCH.js";
|
|
2
2
|
export { None, Option, OptionConstructor, Some };
|
package/dist/option/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{At as e,Ot as t,jt as n,kt as r}from"../src-Co3npRp-.js";export{t as None,r as Option,e as OptionConstructor,n as Some};
|
package/dist/set/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { z as Set } from "../index-
|
|
1
|
+
import { z as Set } from "../index-BPe5pcCH.js";
|
|
2
2
|
export { Set };
|
package/dist/set/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Tt as e}from"../src-
|
|
1
|
+
import{Tt as e}from"../src-Co3npRp-.js";export{e as Set};
|