effect 3.13.9 → 3.13.11
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/cjs/Arbitrary.js +38 -22
- package/dist/cjs/Arbitrary.js.map +1 -1
- package/dist/cjs/Array.js +50 -50
- package/dist/cjs/Array.js.map +1 -1
- package/dist/cjs/Brand.js +9 -4
- package/dist/cjs/Brand.js.map +1 -1
- package/dist/cjs/Cause.js +1 -0
- package/dist/cjs/Cause.js.map +1 -1
- package/dist/cjs/Chunk.js +25 -23
- package/dist/cjs/Chunk.js.map +1 -1
- package/dist/cjs/Config.js +2 -1
- package/dist/cjs/Config.js.map +1 -1
- package/dist/cjs/Context.js +4 -4
- package/dist/cjs/Effect.js +823 -632
- package/dist/cjs/Effect.js.map +1 -1
- package/dist/cjs/Either.js +12 -12
- package/dist/cjs/Either.js.map +1 -1
- package/dist/cjs/LogLevel.js +1 -1
- package/dist/cjs/Logger.js +12 -12
- package/dist/cjs/Match.js +26 -26
- package/dist/cjs/Option.js +43 -43
- package/dist/cjs/Predicate.js +6 -2
- package/dist/cjs/Predicate.js.map +1 -1
- package/dist/cjs/Schema.js +21 -17
- package/dist/cjs/Schema.js.map +1 -1
- package/dist/cjs/SchemaAST.js +49 -25
- package/dist/cjs/SchemaAST.js.map +1 -1
- package/dist/cjs/Scope.js +2 -0
- package/dist/cjs/Scope.js.map +1 -1
- package/dist/cjs/Stream.js +93 -93
- package/dist/cjs/internal/core.js +1 -1
- package/dist/cjs/internal/core.js.map +1 -1
- package/dist/cjs/internal/schema/util.js +23 -14
- package/dist/cjs/internal/schema/util.js.map +1 -1
- package/dist/cjs/internal/version.js +1 -1
- package/dist/cjs/internal/version.js.map +1 -1
- package/dist/dts/Array.d.ts +47 -47
- package/dist/dts/Array.d.ts.map +1 -1
- package/dist/dts/Brand.d.ts +14 -6
- package/dist/dts/Brand.d.ts.map +1 -1
- package/dist/dts/Cause.d.ts +1 -0
- package/dist/dts/Cause.d.ts.map +1 -1
- package/dist/dts/Chunk.d.ts +91 -89
- package/dist/dts/Chunk.d.ts.map +1 -1
- package/dist/dts/Config.d.ts +2 -1
- package/dist/dts/Config.d.ts.map +1 -1
- package/dist/dts/Context.d.ts +4 -4
- package/dist/dts/Effect.d.ts +2107 -1621
- package/dist/dts/Effect.d.ts.map +1 -1
- package/dist/dts/Either.d.ts +33 -33
- package/dist/dts/LogLevel.d.ts +3 -3
- package/dist/dts/Logger.d.ts +16 -16
- package/dist/dts/Match.d.ts +26 -26
- package/dist/dts/Option.d.ts +84 -84
- package/dist/dts/Predicate.d.ts.map +1 -1
- package/dist/dts/Schema.d.ts +53 -21
- package/dist/dts/Schema.d.ts.map +1 -1
- package/dist/dts/SchemaAST.d.ts.map +1 -1
- package/dist/dts/Scope.d.ts +2 -0
- package/dist/dts/Scope.d.ts.map +1 -1
- package/dist/dts/Stream.d.ts +229 -229
- package/dist/esm/Arbitrary.js +38 -22
- package/dist/esm/Arbitrary.js.map +1 -1
- package/dist/esm/Array.js +50 -50
- package/dist/esm/Array.js.map +1 -1
- package/dist/esm/Brand.js +9 -4
- package/dist/esm/Brand.js.map +1 -1
- package/dist/esm/Cause.js +1 -0
- package/dist/esm/Cause.js.map +1 -1
- package/dist/esm/Chunk.js +25 -23
- package/dist/esm/Chunk.js.map +1 -1
- package/dist/esm/Config.js +2 -1
- package/dist/esm/Config.js.map +1 -1
- package/dist/esm/Context.js +4 -4
- package/dist/esm/Effect.js +845 -648
- package/dist/esm/Effect.js.map +1 -1
- package/dist/esm/Either.js +17 -17
- package/dist/esm/Either.js.map +1 -1
- package/dist/esm/LogLevel.js +1 -1
- package/dist/esm/Logger.js +12 -12
- package/dist/esm/Match.js +26 -26
- package/dist/esm/Option.js +48 -48
- package/dist/esm/Predicate.js +3 -0
- package/dist/esm/Predicate.js.map +1 -1
- package/dist/esm/Schema.js +21 -17
- package/dist/esm/Schema.js.map +1 -1
- package/dist/esm/SchemaAST.js +46 -22
- package/dist/esm/SchemaAST.js.map +1 -1
- package/dist/esm/Scope.js +2 -0
- package/dist/esm/Scope.js.map +1 -1
- package/dist/esm/Stream.js +101 -101
- package/dist/esm/internal/core.js +1 -1
- package/dist/esm/internal/core.js.map +1 -1
- package/dist/esm/internal/schema/util.js +23 -14
- package/dist/esm/internal/schema/util.js.map +1 -1
- package/dist/esm/internal/version.js +1 -1
- package/dist/esm/internal/version.js.map +1 -1
- package/package.json +1 -1
- package/src/Arbitrary.ts +39 -24
- package/src/Array.ts +116 -113
- package/src/Brand.ts +14 -6
- package/src/Cause.ts +1 -0
- package/src/Chunk.ts +97 -95
- package/src/Config.ts +2 -1
- package/src/Context.ts +4 -4
- package/src/Effect.ts +2107 -1621
- package/src/Either.ts +34 -34
- package/src/LogLevel.ts +3 -3
- package/src/Logger.ts +16 -16
- package/src/Match.ts +26 -26
- package/src/Option.ts +84 -84
- package/src/Predicate.ts +4 -0
- package/src/Schema.ts +87 -41
- package/src/SchemaAST.ts +47 -22
- package/src/Scope.ts +2 -0
- package/src/Stream.ts +229 -229
- package/src/internal/core.ts +2 -1
- package/src/internal/schema/util.ts +34 -25
- package/src/internal/version.ts +1 -1
package/dist/dts/Array.d.ts
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @since 2.0.0
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import * as Either from "./Either.js";
|
|
7
7
|
import * as Equivalence from "./Equivalence.js";
|
|
8
8
|
import type { LazyArg } from "./Function.js";
|
|
9
9
|
import type { TypeLambda } from "./HKT.js";
|
|
10
|
-
import
|
|
10
|
+
import * as Option from "./Option.js";
|
|
11
11
|
import * as Order from "./Order.js";
|
|
12
|
-
import
|
|
12
|
+
import * as Predicate from "./Predicate.js";
|
|
13
13
|
import * as Record from "./Record.js";
|
|
14
14
|
import type { NoInfer } from "./Types.js";
|
|
15
15
|
/**
|
|
@@ -253,7 +253,7 @@ export declare const fromRecord: <K extends string, A>(self: Readonly<Record<K,
|
|
|
253
253
|
* @category conversions
|
|
254
254
|
* @since 2.0.0
|
|
255
255
|
*/
|
|
256
|
-
export declare const fromOption: <A>(self: Option<A>) => Array<A>;
|
|
256
|
+
export declare const fromOption: <A>(self: Option.Option<A>) => Array<A>;
|
|
257
257
|
/**
|
|
258
258
|
* Matches the elements of an array, applying functions to cases of empty and non-empty arrays.
|
|
259
259
|
*
|
|
@@ -945,14 +945,14 @@ export declare const get: {
|
|
|
945
945
|
* @category getters
|
|
946
946
|
* @since 2.0.0
|
|
947
947
|
*/
|
|
948
|
-
(index: number): <A>(self: ReadonlyArray<A>) => Option<A>;
|
|
948
|
+
(index: number): <A>(self: ReadonlyArray<A>) => Option.Option<A>;
|
|
949
949
|
/**
|
|
950
950
|
* This function provides a safe way to read a value at a particular index from a `ReadonlyArray`.
|
|
951
951
|
*
|
|
952
952
|
* @category getters
|
|
953
953
|
* @since 2.0.0
|
|
954
954
|
*/
|
|
955
|
-
<A>(self: ReadonlyArray<A>, index: number): Option<A>;
|
|
955
|
+
<A>(self: ReadonlyArray<A>, index: number): Option.Option<A>;
|
|
956
956
|
};
|
|
957
957
|
/**
|
|
958
958
|
* Gets an element unsafely, will throw on out of bounds.
|
|
@@ -1014,7 +1014,7 @@ export declare const unappend: <A>(self: NonEmptyReadonlyArray<A>) => [arrayWith
|
|
|
1014
1014
|
* @category getters
|
|
1015
1015
|
* @since 2.0.0
|
|
1016
1016
|
*/
|
|
1017
|
-
export declare const head: <A>(self: ReadonlyArray<A>) => Option<A>;
|
|
1017
|
+
export declare const head: <A>(self: ReadonlyArray<A>) => Option.Option<A>;
|
|
1018
1018
|
/**
|
|
1019
1019
|
* Get the first element of a non empty array.
|
|
1020
1020
|
*
|
|
@@ -1037,7 +1037,7 @@ export declare const headNonEmpty: <A>(self: NonEmptyReadonlyArray<A>) => A;
|
|
|
1037
1037
|
* @category getters
|
|
1038
1038
|
* @since 2.0.0
|
|
1039
1039
|
*/
|
|
1040
|
-
export declare const last: <A>(self: ReadonlyArray<A>) => Option<A>;
|
|
1040
|
+
export declare const last: <A>(self: ReadonlyArray<A>) => Option.Option<A>;
|
|
1041
1041
|
/**
|
|
1042
1042
|
* Get the last element of a non empty array.
|
|
1043
1043
|
*
|
|
@@ -1060,7 +1060,7 @@ export declare const lastNonEmpty: <A>(self: NonEmptyReadonlyArray<A>) => A;
|
|
|
1060
1060
|
* @category getters
|
|
1061
1061
|
* @since 2.0.0
|
|
1062
1062
|
*/
|
|
1063
|
-
export declare const tail: <A>(self: Iterable<A>) => Option<Array<A>>;
|
|
1063
|
+
export declare const tail: <A>(self: Iterable<A>) => Option.Option<Array<A>>;
|
|
1064
1064
|
/**
|
|
1065
1065
|
* Get all but the first element of a `NonEmptyReadonlyArray`.
|
|
1066
1066
|
*
|
|
@@ -1083,7 +1083,7 @@ export declare const tailNonEmpty: <A>(self: NonEmptyReadonlyArray<A>) => Array<
|
|
|
1083
1083
|
* @category getters
|
|
1084
1084
|
* @since 2.0.0
|
|
1085
1085
|
*/
|
|
1086
|
-
export declare const init: <A>(self: Iterable<A>) => Option<Array<A>>;
|
|
1086
|
+
export declare const init: <A>(self: Iterable<A>) => Option.Option<Array<A>>;
|
|
1087
1087
|
/**
|
|
1088
1088
|
* Get all but the last element of a non empty array, creating a new array.
|
|
1089
1089
|
*
|
|
@@ -1562,7 +1562,7 @@ export declare const findFirstIndex: {
|
|
|
1562
1562
|
* @category elements
|
|
1563
1563
|
* @since 2.0.0
|
|
1564
1564
|
*/
|
|
1565
|
-
<A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Option<number>;
|
|
1565
|
+
<A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Option.Option<number>;
|
|
1566
1566
|
/**
|
|
1567
1567
|
* Return the first index for which a predicate holds.
|
|
1568
1568
|
*
|
|
@@ -1578,7 +1578,7 @@ export declare const findFirstIndex: {
|
|
|
1578
1578
|
* @category elements
|
|
1579
1579
|
* @since 2.0.0
|
|
1580
1580
|
*/
|
|
1581
|
-
<A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Option<number>;
|
|
1581
|
+
<A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Option.Option<number>;
|
|
1582
1582
|
};
|
|
1583
1583
|
/**
|
|
1584
1584
|
* Return the last index for which a predicate holds.
|
|
@@ -1611,7 +1611,7 @@ export declare const findLastIndex: {
|
|
|
1611
1611
|
* @category elements
|
|
1612
1612
|
* @since 2.0.0
|
|
1613
1613
|
*/
|
|
1614
|
-
<A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Option<number>;
|
|
1614
|
+
<A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Option.Option<number>;
|
|
1615
1615
|
/**
|
|
1616
1616
|
* Return the last index for which a predicate holds.
|
|
1617
1617
|
*
|
|
@@ -1627,7 +1627,7 @@ export declare const findLastIndex: {
|
|
|
1627
1627
|
* @category elements
|
|
1628
1628
|
* @since 2.0.0
|
|
1629
1629
|
*/
|
|
1630
|
-
<A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Option<number>;
|
|
1630
|
+
<A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Option.Option<number>;
|
|
1631
1631
|
};
|
|
1632
1632
|
/**
|
|
1633
1633
|
* Returns the first element that satisfies the specified
|
|
@@ -1662,7 +1662,7 @@ export declare const findFirst: {
|
|
|
1662
1662
|
* @category elements
|
|
1663
1663
|
* @since 2.0.0
|
|
1664
1664
|
*/
|
|
1665
|
-
<A, B>(f: (a: NoInfer<A>, i: number) => Option<B>): (self: Iterable<A>) => Option<B>;
|
|
1665
|
+
<A, B>(f: (a: NoInfer<A>, i: number) => Option.Option<B>): (self: Iterable<A>) => Option.Option<B>;
|
|
1666
1666
|
/**
|
|
1667
1667
|
* Returns the first element that satisfies the specified
|
|
1668
1668
|
* predicate, or `None` if no such element exists.
|
|
@@ -1679,7 +1679,7 @@ export declare const findFirst: {
|
|
|
1679
1679
|
* @category elements
|
|
1680
1680
|
* @since 2.0.0
|
|
1681
1681
|
*/
|
|
1682
|
-
<A, B extends A>(refinement: (a: NoInfer<A>, i: number) => a is B): (self: Iterable<A>) => Option<B>;
|
|
1682
|
+
<A, B extends A>(refinement: (a: NoInfer<A>, i: number) => a is B): (self: Iterable<A>) => Option.Option<B>;
|
|
1683
1683
|
/**
|
|
1684
1684
|
* Returns the first element that satisfies the specified
|
|
1685
1685
|
* predicate, or `None` if no such element exists.
|
|
@@ -1696,7 +1696,7 @@ export declare const findFirst: {
|
|
|
1696
1696
|
* @category elements
|
|
1697
1697
|
* @since 2.0.0
|
|
1698
1698
|
*/
|
|
1699
|
-
<A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Option<A>;
|
|
1699
|
+
<A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Option.Option<A>;
|
|
1700
1700
|
/**
|
|
1701
1701
|
* Returns the first element that satisfies the specified
|
|
1702
1702
|
* predicate, or `None` if no such element exists.
|
|
@@ -1713,7 +1713,7 @@ export declare const findFirst: {
|
|
|
1713
1713
|
* @category elements
|
|
1714
1714
|
* @since 2.0.0
|
|
1715
1715
|
*/
|
|
1716
|
-
<A, B>(self: Iterable<A>, f: (a: A, i: number) => Option<B>): Option<B>;
|
|
1716
|
+
<A, B>(self: Iterable<A>, f: (a: A, i: number) => Option.Option<B>): Option.Option<B>;
|
|
1717
1717
|
/**
|
|
1718
1718
|
* Returns the first element that satisfies the specified
|
|
1719
1719
|
* predicate, or `None` if no such element exists.
|
|
@@ -1730,7 +1730,7 @@ export declare const findFirst: {
|
|
|
1730
1730
|
* @category elements
|
|
1731
1731
|
* @since 2.0.0
|
|
1732
1732
|
*/
|
|
1733
|
-
<A, B extends A>(self: Iterable<A>, refinement: (a: A, i: number) => a is B): Option<B>;
|
|
1733
|
+
<A, B extends A>(self: Iterable<A>, refinement: (a: A, i: number) => a is B): Option.Option<B>;
|
|
1734
1734
|
/**
|
|
1735
1735
|
* Returns the first element that satisfies the specified
|
|
1736
1736
|
* predicate, or `None` if no such element exists.
|
|
@@ -1747,7 +1747,7 @@ export declare const findFirst: {
|
|
|
1747
1747
|
* @category elements
|
|
1748
1748
|
* @since 2.0.0
|
|
1749
1749
|
*/
|
|
1750
|
-
<A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Option<A>;
|
|
1750
|
+
<A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Option.Option<A>;
|
|
1751
1751
|
};
|
|
1752
1752
|
/**
|
|
1753
1753
|
* Finds the last element in an iterable collection that satisfies the given predicate or refinement.
|
|
@@ -1782,7 +1782,7 @@ export declare const findLast: {
|
|
|
1782
1782
|
* @category elements
|
|
1783
1783
|
* @since 2.0.0
|
|
1784
1784
|
*/
|
|
1785
|
-
<A, B>(f: (a: NoInfer<A>, i: number) => Option<B>): (self: Iterable<A>) => Option<B>;
|
|
1785
|
+
<A, B>(f: (a: NoInfer<A>, i: number) => Option.Option<B>): (self: Iterable<A>) => Option.Option<B>;
|
|
1786
1786
|
/**
|
|
1787
1787
|
* Finds the last element in an iterable collection that satisfies the given predicate or refinement.
|
|
1788
1788
|
* Returns an `Option` containing the found element, or `Option.none` if no element matches.
|
|
@@ -1799,7 +1799,7 @@ export declare const findLast: {
|
|
|
1799
1799
|
* @category elements
|
|
1800
1800
|
* @since 2.0.0
|
|
1801
1801
|
*/
|
|
1802
|
-
<A, B extends A>(refinement: (a: NoInfer<A>, i: number) => a is B): (self: Iterable<A>) => Option<B>;
|
|
1802
|
+
<A, B extends A>(refinement: (a: NoInfer<A>, i: number) => a is B): (self: Iterable<A>) => Option.Option<B>;
|
|
1803
1803
|
/**
|
|
1804
1804
|
* Finds the last element in an iterable collection that satisfies the given predicate or refinement.
|
|
1805
1805
|
* Returns an `Option` containing the found element, or `Option.none` if no element matches.
|
|
@@ -1816,7 +1816,7 @@ export declare const findLast: {
|
|
|
1816
1816
|
* @category elements
|
|
1817
1817
|
* @since 2.0.0
|
|
1818
1818
|
*/
|
|
1819
|
-
<A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Option<A>;
|
|
1819
|
+
<A>(predicate: (a: NoInfer<A>, i: number) => boolean): (self: Iterable<A>) => Option.Option<A>;
|
|
1820
1820
|
/**
|
|
1821
1821
|
* Finds the last element in an iterable collection that satisfies the given predicate or refinement.
|
|
1822
1822
|
* Returns an `Option` containing the found element, or `Option.none` if no element matches.
|
|
@@ -1833,7 +1833,7 @@ export declare const findLast: {
|
|
|
1833
1833
|
* @category elements
|
|
1834
1834
|
* @since 2.0.0
|
|
1835
1835
|
*/
|
|
1836
|
-
<A, B>(self: Iterable<A>, f: (a: A, i: number) => Option<B>): Option<B>;
|
|
1836
|
+
<A, B>(self: Iterable<A>, f: (a: A, i: number) => Option.Option<B>): Option.Option<B>;
|
|
1837
1837
|
/**
|
|
1838
1838
|
* Finds the last element in an iterable collection that satisfies the given predicate or refinement.
|
|
1839
1839
|
* Returns an `Option` containing the found element, or `Option.none` if no element matches.
|
|
@@ -1850,7 +1850,7 @@ export declare const findLast: {
|
|
|
1850
1850
|
* @category elements
|
|
1851
1851
|
* @since 2.0.0
|
|
1852
1852
|
*/
|
|
1853
|
-
<A, B extends A>(self: Iterable<A>, refinement: (a: A, i: number) => a is B): Option<B>;
|
|
1853
|
+
<A, B extends A>(self: Iterable<A>, refinement: (a: A, i: number) => a is B): Option.Option<B>;
|
|
1854
1854
|
/**
|
|
1855
1855
|
* Finds the last element in an iterable collection that satisfies the given predicate or refinement.
|
|
1856
1856
|
* Returns an `Option` containing the found element, or `Option.none` if no element matches.
|
|
@@ -1867,7 +1867,7 @@ export declare const findLast: {
|
|
|
1867
1867
|
* @category elements
|
|
1868
1868
|
* @since 2.0.0
|
|
1869
1869
|
*/
|
|
1870
|
-
<A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Option<A>;
|
|
1870
|
+
<A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): Option.Option<A>;
|
|
1871
1871
|
};
|
|
1872
1872
|
/**
|
|
1873
1873
|
* Insert an element at the specified index, creating a new `NonEmptyArray`,
|
|
@@ -1900,7 +1900,7 @@ export declare const insertAt: {
|
|
|
1900
1900
|
*
|
|
1901
1901
|
* @since 2.0.0
|
|
1902
1902
|
*/
|
|
1903
|
-
<B>(i: number, b: B): <A>(self: Iterable<A>) => Option<NonEmptyArray<A | B>>;
|
|
1903
|
+
<B>(i: number, b: B): <A>(self: Iterable<A>) => Option.Option<NonEmptyArray<A | B>>;
|
|
1904
1904
|
/**
|
|
1905
1905
|
* Insert an element at the specified index, creating a new `NonEmptyArray`,
|
|
1906
1906
|
* or return `None` if the index is out of bounds.
|
|
@@ -1916,7 +1916,7 @@ export declare const insertAt: {
|
|
|
1916
1916
|
*
|
|
1917
1917
|
* @since 2.0.0
|
|
1918
1918
|
*/
|
|
1919
|
-
<A, B>(self: Iterable<A>, i: number, b: B): Option<NonEmptyArray<A | B>>;
|
|
1919
|
+
<A, B>(self: Iterable<A>, i: number, b: B): Option.Option<NonEmptyArray<A | B>>;
|
|
1920
1920
|
};
|
|
1921
1921
|
/**
|
|
1922
1922
|
* Change the element at the specified index, creating a new `Array`,
|
|
@@ -1996,7 +1996,7 @@ export declare const replaceOption: {
|
|
|
1996
1996
|
*
|
|
1997
1997
|
* @since 2.0.0
|
|
1998
1998
|
*/
|
|
1999
|
-
<B>(i: number, b: B): <A, S extends Iterable<A> = Iterable<A>>(self: S) => Option<ReadonlyArray.With<S, ReadonlyArray.Infer<S> | B>>;
|
|
1999
|
+
<B>(i: number, b: B): <A, S extends Iterable<A> = Iterable<A>>(self: S) => Option.Option<ReadonlyArray.With<S, ReadonlyArray.Infer<S> | B>>;
|
|
2000
2000
|
/**
|
|
2001
2001
|
* Replaces an element in an array with the given value, returning an option of the updated array.
|
|
2002
2002
|
*
|
|
@@ -2011,7 +2011,7 @@ export declare const replaceOption: {
|
|
|
2011
2011
|
*
|
|
2012
2012
|
* @since 2.0.0
|
|
2013
2013
|
*/
|
|
2014
|
-
<A, B, S extends Iterable<A> = Iterable<A>>(self: S, i: number, b: B): Option<ReadonlyArray.With<S, ReadonlyArray.Infer<S> | B>>;
|
|
2014
|
+
<A, B, S extends Iterable<A> = Iterable<A>>(self: S, i: number, b: B): Option.Option<ReadonlyArray.With<S, ReadonlyArray.Infer<S> | B>>;
|
|
2015
2015
|
};
|
|
2016
2016
|
/**
|
|
2017
2017
|
* Apply a function to the element at the specified index, creating a new `Array`,
|
|
@@ -2101,7 +2101,7 @@ export declare const modifyOption: {
|
|
|
2101
2101
|
*
|
|
2102
2102
|
* @since 2.0.0
|
|
2103
2103
|
*/
|
|
2104
|
-
<A, B, S extends Iterable<A> = Iterable<A>>(i: number, f: (a: ReadonlyArray.Infer<S>) => B): (self: S) => Option<ReadonlyArray.With<S, ReadonlyArray.Infer<S> | B>>;
|
|
2104
|
+
<A, B, S extends Iterable<A> = Iterable<A>>(i: number, f: (a: ReadonlyArray.Infer<S>) => B): (self: S) => Option.Option<ReadonlyArray.With<S, ReadonlyArray.Infer<S> | B>>;
|
|
2105
2105
|
/**
|
|
2106
2106
|
* Apply a function to the element at the specified index, creating a new `Array`,
|
|
2107
2107
|
* or return `None` if the index is out of bounds.
|
|
@@ -2121,7 +2121,7 @@ export declare const modifyOption: {
|
|
|
2121
2121
|
*
|
|
2122
2122
|
* @since 2.0.0
|
|
2123
2123
|
*/
|
|
2124
|
-
<A, B, S extends Iterable<A> = Iterable<A>>(self: S, i: number, f: (a: ReadonlyArray.Infer<S>) => B): Option<ReadonlyArray.With<S, ReadonlyArray.Infer<S> | B>>;
|
|
2124
|
+
<A, B, S extends Iterable<A> = Iterable<A>>(self: S, i: number, f: (a: ReadonlyArray.Infer<S>) => B): Option.Option<ReadonlyArray.With<S, ReadonlyArray.Infer<S> | B>>;
|
|
2125
2125
|
};
|
|
2126
2126
|
/**
|
|
2127
2127
|
* Delete the element at the specified index, creating a new `Array`,
|
|
@@ -4035,7 +4035,7 @@ export declare const filterMap: {
|
|
|
4035
4035
|
* @category filtering
|
|
4036
4036
|
* @since 2.0.0
|
|
4037
4037
|
*/
|
|
4038
|
-
<A, B>(f: (a: A, i: number) => Option<B>): (self: Iterable<A>) => Array<B>;
|
|
4038
|
+
<A, B>(f: (a: A, i: number) => Option.Option<B>): (self: Iterable<A>) => Array<B>;
|
|
4039
4039
|
/**
|
|
4040
4040
|
* Applies a function to each element of the `Iterable` and filters based on the result, keeping the transformed values where the function returns `Some`.
|
|
4041
4041
|
* This method combines filtering and mapping functionalities, allowing transformations and filtering of elements based on a single function pass.
|
|
@@ -4054,7 +4054,7 @@ export declare const filterMap: {
|
|
|
4054
4054
|
* @category filtering
|
|
4055
4055
|
* @since 2.0.0
|
|
4056
4056
|
*/
|
|
4057
|
-
<A, B>(self: Iterable<A>, f: (a: A, i: number) => Option<B>): Array<B>;
|
|
4057
|
+
<A, B>(self: Iterable<A>, f: (a: A, i: number) => Option.Option<B>): Array<B>;
|
|
4058
4058
|
};
|
|
4059
4059
|
/**
|
|
4060
4060
|
* Applies a function to each element of the array and filters based on the result, stopping when a condition is not met.
|
|
@@ -4095,7 +4095,7 @@ export declare const filterMapWhile: {
|
|
|
4095
4095
|
* @category filtering
|
|
4096
4096
|
* @since 2.0.0
|
|
4097
4097
|
*/
|
|
4098
|
-
<A, B>(f: (a: A, i: number) => Option<B>): (self: Iterable<A>) => Array<B>;
|
|
4098
|
+
<A, B>(f: (a: A, i: number) => Option.Option<B>): (self: Iterable<A>) => Array<B>;
|
|
4099
4099
|
/**
|
|
4100
4100
|
* Applies a function to each element of the array and filters based on the result, stopping when a condition is not met.
|
|
4101
4101
|
* This method combines filtering and mapping in a single pass, and short-circuits, i.e., stops processing, as soon as the function returns `None`.
|
|
@@ -4115,7 +4115,7 @@ export declare const filterMapWhile: {
|
|
|
4115
4115
|
* @category filtering
|
|
4116
4116
|
* @since 2.0.0
|
|
4117
4117
|
*/
|
|
4118
|
-
<A, B>(self: Iterable<A>, f: (a: A, i: number) => Option<B>): Array<B>;
|
|
4118
|
+
<A, B>(self: Iterable<A>, f: (a: A, i: number) => Option.Option<B>): Array<B>;
|
|
4119
4119
|
};
|
|
4120
4120
|
/**
|
|
4121
4121
|
* Applies a function to each element of the `Iterable`, categorizing the results into two separate arrays.
|
|
@@ -4170,7 +4170,7 @@ export declare const partitionMap: {
|
|
|
4170
4170
|
* @category filtering
|
|
4171
4171
|
* @since 2.0.0
|
|
4172
4172
|
*/
|
|
4173
|
-
<A, B, C>(f: (a: A, i: number) => Either<C, B>): (self: Iterable<A>) => [left: Array<B>, right: Array<C>];
|
|
4173
|
+
<A, B, C>(f: (a: A, i: number) => Either.Either<C, B>): (self: Iterable<A>) => [left: Array<B>, right: Array<C>];
|
|
4174
4174
|
/**
|
|
4175
4175
|
* Applies a function to each element of the `Iterable`, categorizing the results into two separate arrays.
|
|
4176
4176
|
* This function is particularly useful for operations where each element can result in two possible types,
|
|
@@ -4197,7 +4197,7 @@ export declare const partitionMap: {
|
|
|
4197
4197
|
* @category filtering
|
|
4198
4198
|
* @since 2.0.0
|
|
4199
4199
|
*/
|
|
4200
|
-
<A, B, C>(self: Iterable<A>, f: (a: A, i: number) => Either<C, B>): [left: Array<B>, right: Array<C>];
|
|
4200
|
+
<A, B, C>(self: Iterable<A>, f: (a: A, i: number) => Either.Either<C, B>): [left: Array<B>, right: Array<C>];
|
|
4201
4201
|
};
|
|
4202
4202
|
/**
|
|
4203
4203
|
* Retrieves the `Some` values from an `Iterable` of `Option`s, collecting them into an array.
|
|
@@ -4214,7 +4214,7 @@ export declare const partitionMap: {
|
|
|
4214
4214
|
* @category filtering
|
|
4215
4215
|
* @since 2.0.0
|
|
4216
4216
|
*/
|
|
4217
|
-
export declare const getSomes: <T extends Iterable<Option<X>>, X = any>(self: T) => Array<Option.Value<ReadonlyArray.Infer<T>>>;
|
|
4217
|
+
export declare const getSomes: <T extends Iterable<Option.Option<X>>, X = any>(self: T) => Array<Option.Option.Value<ReadonlyArray.Infer<T>>>;
|
|
4218
4218
|
/**
|
|
4219
4219
|
* Retrieves the `Left` values from an `Iterable` of `Either`s, collecting them into an array.
|
|
4220
4220
|
*
|
|
@@ -4230,7 +4230,7 @@ export declare const getSomes: <T extends Iterable<Option<X>>, X = any>(self: T)
|
|
|
4230
4230
|
* @category filtering
|
|
4231
4231
|
* @since 2.0.0
|
|
4232
4232
|
*/
|
|
4233
|
-
export declare const getLefts: <T extends Iterable<Either<any, any>>>(self: T) => Array<Either.Left<ReadonlyArray.Infer<T>>>;
|
|
4233
|
+
export declare const getLefts: <T extends Iterable<Either.Either<any, any>>>(self: T) => Array<Either.Either.Left<ReadonlyArray.Infer<T>>>;
|
|
4234
4234
|
/**
|
|
4235
4235
|
* Retrieves the `Right` values from an `Iterable` of `Either`s, collecting them into an array.
|
|
4236
4236
|
*
|
|
@@ -4246,7 +4246,7 @@ export declare const getLefts: <T extends Iterable<Either<any, any>>>(self: T) =
|
|
|
4246
4246
|
* @category filtering
|
|
4247
4247
|
* @since 2.0.0
|
|
4248
4248
|
*/
|
|
4249
|
-
export declare const getRights: <T extends Iterable<Either<any, any>>>(self: T) => Array<Either.Right<ReadonlyArray.Infer<T>>>;
|
|
4249
|
+
export declare const getRights: <T extends Iterable<Either.Either<any, any>>>(self: T) => Array<Either.Either.Right<ReadonlyArray.Infer<T>>>;
|
|
4250
4250
|
/**
|
|
4251
4251
|
* @category filtering
|
|
4252
4252
|
* @since 2.0.0
|
|
@@ -4360,7 +4360,7 @@ export declare const partition: {
|
|
|
4360
4360
|
* @category filtering
|
|
4361
4361
|
* @since 2.0.0
|
|
4362
4362
|
*/
|
|
4363
|
-
export declare const separate: <T extends Iterable<Either<any, any>>>(self: T) => [Array<Either.Left<ReadonlyArray.Infer<T>>>, Array<Either.Right<ReadonlyArray.Infer<T>>>];
|
|
4363
|
+
export declare const separate: <T extends Iterable<Either.Either<any, any>>>(self: T) => [Array<Either.Either.Left<ReadonlyArray.Infer<T>>>, Array<Either.Either.Right<ReadonlyArray.Infer<T>>>];
|
|
4364
4364
|
/**
|
|
4365
4365
|
* Reduces an array from the left.
|
|
4366
4366
|
*
|
|
@@ -4477,7 +4477,7 @@ export declare const reduceRight: {
|
|
|
4477
4477
|
* @since 2.0.0
|
|
4478
4478
|
*/
|
|
4479
4479
|
export declare const liftPredicate: {
|
|
4480
|
-
<A, B extends A>(refinement: Refinement<A, B>): (a: A) => Array<B>;
|
|
4480
|
+
<A, B extends A>(refinement: Predicate.Refinement<A, B>): (a: A) => Array<B>;
|
|
4481
4481
|
/**
|
|
4482
4482
|
* Lifts a predicate into an array.
|
|
4483
4483
|
*
|
|
@@ -4495,13 +4495,13 @@ export declare const liftPredicate: {
|
|
|
4495
4495
|
* @category lifting
|
|
4496
4496
|
* @since 2.0.0
|
|
4497
4497
|
*/
|
|
4498
|
-
<A>(predicate: Predicate<A>): <B extends A>(b: B) => Array<B>;
|
|
4498
|
+
<A>(predicate: Predicate.Predicate<A>): <B extends A>(b: B) => Array<B>;
|
|
4499
4499
|
};
|
|
4500
4500
|
/**
|
|
4501
4501
|
* @category lifting
|
|
4502
4502
|
* @since 2.0.0
|
|
4503
4503
|
*/
|
|
4504
|
-
export declare const liftOption: <A extends Array<unknown>, B>(f: (...a: A) => Option<B>) => (...a: A) => Array<B>;
|
|
4504
|
+
export declare const liftOption: <A extends Array<unknown>, B>(f: (...a: A) => Option.Option<B>) => (...a: A) => Array<B>;
|
|
4505
4505
|
/**
|
|
4506
4506
|
* @category conversions
|
|
4507
4507
|
* @since 2.0.0
|
|
@@ -4606,7 +4606,7 @@ export declare const flatMapNullable: {
|
|
|
4606
4606
|
* @category lifting
|
|
4607
4607
|
* @since 2.0.0
|
|
4608
4608
|
*/
|
|
4609
|
-
export declare const liftEither: <A extends Array<unknown>, E, B>(f: (...a: A) => Either<B, E>) => (...a: A) => Array<B>;
|
|
4609
|
+
export declare const liftEither: <A extends Array<unknown>, E, B>(f: (...a: A) => Either.Either<B, E>) => (...a: A) => Array<B>;
|
|
4610
4610
|
/**
|
|
4611
4611
|
* Check if a predicate holds true for every `ReadonlyArray` element.
|
|
4612
4612
|
*
|
|
@@ -4825,7 +4825,7 @@ export declare const max: {
|
|
|
4825
4825
|
* @category constructors
|
|
4826
4826
|
* @since 2.0.0
|
|
4827
4827
|
*/
|
|
4828
|
-
export declare const unfold: <B, A>(b: B, f: (b: B) => Option<readonly [A, B]>) => Array<A>;
|
|
4828
|
+
export declare const unfold: <B, A>(b: B, f: (b: B) => Option.Option<readonly [A, B]>) => Array<A>;
|
|
4829
4829
|
/**
|
|
4830
4830
|
* This function creates and returns a new `Order` for an array of values based on a given `Order` for the elements of the array.
|
|
4831
4831
|
* The returned `Order` compares two arrays by applying the given `Order` to each element in the arrays.
|