effect 3.13.1 → 3.13.2
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/Array.js.map +1 -1
- package/dist/cjs/Channel.js.map +1 -1
- package/dist/cjs/Chunk.js.map +1 -1
- package/dist/cjs/Context.js.map +1 -1
- package/dist/cjs/DateTime.js.map +1 -1
- package/dist/cjs/Duration.js +1 -3
- package/dist/cjs/Duration.js.map +1 -1
- package/dist/cjs/Effect.js.map +1 -1
- package/dist/cjs/Either.js.map +1 -1
- package/dist/cjs/Exit.js.map +1 -1
- package/dist/cjs/Function.js.map +1 -1
- package/dist/cjs/HashSet.js.map +1 -1
- package/dist/cjs/Iterable.js.map +1 -1
- package/dist/cjs/Layer.js.map +1 -1
- package/dist/cjs/List.js.map +1 -1
- package/dist/cjs/Logger.js.map +1 -1
- package/dist/cjs/Metric.js.map +1 -1
- package/dist/cjs/MetricKey.js.map +1 -1
- package/dist/cjs/MetricPolling.js.map +1 -1
- package/dist/cjs/Micro.js.map +1 -1
- package/dist/cjs/MutableHashMap.js.map +1 -1
- package/dist/cjs/Option.js.map +1 -1
- package/dist/cjs/ParseResult.js.map +1 -1
- package/dist/cjs/Predicate.js.map +1 -1
- package/dist/cjs/Record.js.map +1 -1
- package/dist/cjs/Request.js.map +1 -1
- package/dist/cjs/RequestResolver.js.map +1 -1
- package/dist/cjs/STM.js.map +1 -1
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Schema.js.map +1 -1
- package/dist/cjs/SchemaAST.js +1 -1
- package/dist/cjs/SchemaAST.js.map +1 -1
- package/dist/cjs/Sink.js.map +1 -1
- package/dist/cjs/SortedMap.js.map +1 -1
- package/dist/cjs/Stream.js.map +1 -1
- package/dist/cjs/Struct.js.map +1 -1
- package/dist/cjs/Subscribable.js.map +1 -1
- package/dist/cjs/SubscriptionRef.js.map +1 -1
- package/dist/cjs/SynchronizedRef.js.map +1 -1
- package/dist/cjs/TArray.js.map +1 -1
- package/dist/cjs/TMap.js.map +1 -1
- package/dist/cjs/Take.js.map +1 -1
- package/dist/cjs/TestServices.js.map +1 -1
- package/dist/cjs/Unify.js.map +1 -1
- package/dist/cjs/internal/version.js +1 -1
- package/dist/dts/Array.d.ts.map +1 -1
- package/dist/dts/Cause.d.ts.map +1 -1
- package/dist/dts/Channel.d.ts.map +1 -1
- package/dist/dts/ChildExecutorDecision.d.ts.map +1 -1
- package/dist/dts/Chunk.d.ts.map +1 -1
- package/dist/dts/Config.d.ts.map +1 -1
- package/dist/dts/ConfigProvider.d.ts.map +1 -1
- package/dist/dts/Console.d.ts.map +1 -1
- package/dist/dts/Context.d.ts.map +1 -1
- package/dist/dts/DateTime.d.ts.map +1 -1
- package/dist/dts/Duration.d.ts +1 -3
- package/dist/dts/Duration.d.ts.map +1 -1
- package/dist/dts/Effect.d.ts.map +1 -1
- package/dist/dts/Either.d.ts.map +1 -1
- package/dist/dts/ExecutionStrategy.d.ts.map +1 -1
- package/dist/dts/Exit.d.ts.map +1 -1
- package/dist/dts/Fiber.d.ts.map +1 -1
- package/dist/dts/FiberRefsPatch.d.ts.map +1 -1
- package/dist/dts/Function.d.ts.map +1 -1
- package/dist/dts/GroupBy.d.ts.map +1 -1
- package/dist/dts/HashSet.d.ts.map +1 -1
- package/dist/dts/Iterable.d.ts.map +1 -1
- package/dist/dts/Layer.d.ts.map +1 -1
- package/dist/dts/List.d.ts.map +1 -1
- package/dist/dts/Logger.d.ts.map +1 -1
- package/dist/dts/Mailbox.d.ts.map +1 -1
- package/dist/dts/MergeDecision.d.ts.map +1 -1
- package/dist/dts/MergeStrategy.d.ts.map +1 -1
- package/dist/dts/Metric.d.ts.map +1 -1
- package/dist/dts/MetricKey.d.ts.map +1 -1
- package/dist/dts/MetricPolling.d.ts.map +1 -1
- package/dist/dts/Micro.d.ts.map +1 -1
- package/dist/dts/MutableHashMap.d.ts.map +1 -1
- package/dist/dts/Option.d.ts.map +1 -1
- package/dist/dts/ParseResult.d.ts.map +1 -1
- package/dist/dts/Predicate.d.ts.map +1 -1
- package/dist/dts/RcMap.d.ts.map +1 -1
- package/dist/dts/Record.d.ts.map +1 -1
- package/dist/dts/RedBlackTree.d.ts.map +1 -1
- package/dist/dts/Request.d.ts.map +1 -1
- package/dist/dts/RequestResolver.d.ts.map +1 -1
- package/dist/dts/Runtime.d.ts.map +1 -1
- package/dist/dts/STM.d.ts.map +1 -1
- package/dist/dts/Schedule.d.ts.map +1 -1
- package/dist/dts/Schema.d.ts.map +1 -1
- package/dist/dts/Sink.d.ts.map +1 -1
- package/dist/dts/SortedMap.d.ts.map +1 -1
- package/dist/dts/Stream.d.ts.map +1 -1
- package/dist/dts/StreamHaltStrategy.d.ts.map +1 -1
- package/dist/dts/Struct.d.ts.map +1 -1
- package/dist/dts/Subscribable.d.ts.map +1 -1
- package/dist/dts/SubscriptionRef.d.ts.map +1 -1
- package/dist/dts/SynchronizedRef.d.ts.map +1 -1
- package/dist/dts/TArray.d.ts.map +1 -1
- package/dist/dts/TMap.d.ts.map +1 -1
- package/dist/dts/TSubscriptionRef.d.ts.map +1 -1
- package/dist/dts/Take.d.ts.map +1 -1
- package/dist/dts/TestServices.d.ts.map +1 -1
- package/dist/dts/Unify.d.ts.map +1 -1
- package/dist/dts/UpstreamPullRequest.d.ts.map +1 -1
- package/dist/dts/UpstreamPullStrategy.d.ts.map +1 -1
- package/dist/esm/Array.js.map +1 -1
- package/dist/esm/Channel.js.map +1 -1
- package/dist/esm/Chunk.js.map +1 -1
- package/dist/esm/Context.js.map +1 -1
- package/dist/esm/DateTime.js.map +1 -1
- package/dist/esm/Duration.js +1 -3
- package/dist/esm/Duration.js.map +1 -1
- package/dist/esm/Effect.js.map +1 -1
- package/dist/esm/Either.js.map +1 -1
- package/dist/esm/Exit.js.map +1 -1
- package/dist/esm/Function.js.map +1 -1
- package/dist/esm/HashSet.js.map +1 -1
- package/dist/esm/Iterable.js.map +1 -1
- package/dist/esm/Layer.js.map +1 -1
- package/dist/esm/List.js.map +1 -1
- package/dist/esm/Logger.js.map +1 -1
- package/dist/esm/Metric.js.map +1 -1
- package/dist/esm/MetricKey.js.map +1 -1
- package/dist/esm/MetricPolling.js.map +1 -1
- package/dist/esm/Micro.js.map +1 -1
- package/dist/esm/MutableHashMap.js.map +1 -1
- package/dist/esm/Option.js.map +1 -1
- package/dist/esm/ParseResult.js.map +1 -1
- package/dist/esm/Predicate.js.map +1 -1
- package/dist/esm/Record.js.map +1 -1
- package/dist/esm/Request.js.map +1 -1
- package/dist/esm/RequestResolver.js.map +1 -1
- package/dist/esm/STM.js.map +1 -1
- package/dist/esm/Schedule.js.map +1 -1
- package/dist/esm/Schema.js.map +1 -1
- package/dist/esm/SchemaAST.js +1 -1
- package/dist/esm/SchemaAST.js.map +1 -1
- package/dist/esm/Sink.js.map +1 -1
- package/dist/esm/SortedMap.js.map +1 -1
- package/dist/esm/Stream.js.map +1 -1
- package/dist/esm/Struct.js.map +1 -1
- package/dist/esm/Subscribable.js.map +1 -1
- package/dist/esm/SubscriptionRef.js.map +1 -1
- package/dist/esm/SynchronizedRef.js.map +1 -1
- package/dist/esm/TArray.js.map +1 -1
- package/dist/esm/TMap.js.map +1 -1
- package/dist/esm/Take.js.map +1 -1
- package/dist/esm/TestServices.js.map +1 -1
- package/dist/esm/Unify.js.map +1 -1
- package/dist/esm/internal/version.js +1 -1
- package/package.json +1 -1
- package/src/Array.ts +22 -82
- package/src/Cause.ts +20 -20
- package/src/Channel.ts +14 -44
- package/src/ChildExecutorDecision.ts +11 -11
- package/src/Chunk.ts +23 -36
- package/src/Config.ts +27 -27
- package/src/ConfigProvider.ts +3 -3
- package/src/Console.ts +9 -9
- package/src/Context.ts +2 -9
- package/src/DateTime.ts +96 -104
- package/src/Duration.ts +1 -3
- package/src/Effect.ts +64 -229
- package/src/Either.ts +2 -8
- package/src/ExecutionStrategy.ts +11 -11
- package/src/Exit.ts +27 -29
- package/src/Fiber.ts +9 -9
- package/src/FiberRefsPatch.ts +3 -3
- package/src/Function.ts +2 -8
- package/src/GroupBy.ts +5 -5
- package/src/HashSet.ts +2 -7
- package/src/Iterable.ts +2 -7
- package/src/Layer.ts +22 -77
- package/src/List.ts +32 -43
- package/src/Logger.ts +21 -55
- package/src/Mailbox.ts +9 -9
- package/src/MergeDecision.ts +9 -9
- package/src/MergeStrategy.ts +9 -9
- package/src/Metric.ts +13 -47
- package/src/MetricKey.ts +4 -16
- package/src/MetricPolling.ts +1 -3
- package/src/Micro.ts +43 -104
- package/src/MutableHashMap.ts +1 -4
- package/src/Option.ts +1 -4
- package/src/ParseResult.ts +4 -14
- package/src/Predicate.ts +2 -6
- package/src/RcMap.ts +10 -10
- package/src/Record.ts +24 -90
- package/src/RedBlackTree.ts +14 -14
- package/src/Request.ts +2 -7
- package/src/RequestResolver.ts +6 -22
- package/src/Runtime.ts +4 -4
- package/src/STM.ts +17 -67
- package/src/Schedule.ts +37 -126
- package/src/Schema.ts +99 -123
- package/src/SchemaAST.ts +1 -1
- package/src/Sink.ts +20 -68
- package/src/SortedMap.ts +1 -3
- package/src/Stream.ts +86 -311
- package/src/StreamHaltStrategy.ts +13 -13
- package/src/Struct.ts +2 -7
- package/src/Subscribable.ts +1 -3
- package/src/SubscriptionRef.ts +1 -3
- package/src/SynchronizedRef.ts +17 -19
- package/src/TArray.ts +7 -10
- package/src/TMap.ts +4 -13
- package/src/TSubscriptionRef.ts +3 -3
- package/src/Take.ts +24 -29
- package/src/TestServices.ts +1 -3
- package/src/Unify.ts +1 -3
- package/src/UpstreamPullRequest.ts +9 -9
- package/src/UpstreamPullStrategy.ts +9 -9
- package/src/internal/version.ts +1 -1
package/src/Either.ts
CHANGED
|
@@ -828,10 +828,7 @@ export const filterOrLeft: {
|
|
|
828
828
|
* @since 2.0.0
|
|
829
829
|
* @category filtering & conditionals
|
|
830
830
|
*/
|
|
831
|
-
<R, L2>(
|
|
832
|
-
predicate: Predicate<NoInfer<R>>,
|
|
833
|
-
orLeftWith: (right: NoInfer<R>) => L2
|
|
834
|
-
): <L>(self: Either<R, L>) => Either<R, L2 | L>
|
|
831
|
+
<R, L2>(predicate: Predicate<NoInfer<R>>, orLeftWith: (right: NoInfer<R>) => L2): <L>(self: Either<R, L>) => Either<R, L2 | L>
|
|
835
832
|
/**
|
|
836
833
|
* Filter the right value with the provided function.
|
|
837
834
|
* If the predicate fails, set the left value with the result of the provided function.
|
|
@@ -1445,10 +1442,7 @@ export const bind: {
|
|
|
1445
1442
|
* @category do notation
|
|
1446
1443
|
* @since 2.0.0
|
|
1447
1444
|
*/
|
|
1448
|
-
<N extends string, A extends object, B, L2>(
|
|
1449
|
-
name: Exclude<N, keyof A>,
|
|
1450
|
-
f: (a: NoInfer<A>) => Either<B, L2>
|
|
1451
|
-
): <L1>(self: Either<A, L1>) => Either<{ [K in N | keyof A]: K extends keyof A ? A[K] : B }, L1 | L2>
|
|
1445
|
+
<N extends string, A extends object, B, L2>(name: Exclude<N, keyof A>, f: (a: NoInfer<A>) => Either<B, L2>): <L1>(self: Either<A, L1>) => Either<{ [K in N | keyof A]: K extends keyof A ? A[K] : B }, L1 | L2>
|
|
1452
1446
|
/**
|
|
1453
1447
|
* The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`.
|
|
1454
1448
|
*
|
package/src/ExecutionStrategy.ts
CHANGED
|
@@ -114,11 +114,11 @@ export const match: {
|
|
|
114
114
|
* @category folding
|
|
115
115
|
*/
|
|
116
116
|
<A>(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
options: {
|
|
118
|
+
readonly onSequential: LazyArg<A>
|
|
119
|
+
readonly onParallel: LazyArg<A>
|
|
120
|
+
readonly onParallelN: (n: number) => A
|
|
121
|
+
}
|
|
122
122
|
): (self: ExecutionStrategy) => A
|
|
123
123
|
/**
|
|
124
124
|
* Folds over the specified `ExecutionStrategy` using the provided case
|
|
@@ -128,11 +128,11 @@ export const match: {
|
|
|
128
128
|
* @category folding
|
|
129
129
|
*/
|
|
130
130
|
<A>(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
self: ExecutionStrategy,
|
|
132
|
+
options: {
|
|
133
|
+
readonly onSequential: LazyArg<A>
|
|
134
|
+
readonly onParallel: LazyArg<A>
|
|
135
|
+
readonly onParallelN: (n: number) => A
|
|
136
|
+
}
|
|
137
137
|
): A
|
|
138
138
|
} = internal.match
|
package/src/Exit.ts
CHANGED
|
@@ -258,9 +258,7 @@ export const flatMapEffect: {
|
|
|
258
258
|
* @since 2.0.0
|
|
259
259
|
* @category sequencing
|
|
260
260
|
*/
|
|
261
|
-
<A, E, A2, E2, R>(
|
|
262
|
-
f: (a: A) => Effect.Effect<Exit<A2, E>, E2, R>
|
|
263
|
-
): (self: Exit<A, E>) => Effect.Effect<Exit<A2, E>, E2, R>
|
|
261
|
+
<A, E, A2, E2, R>(f: (a: A) => Effect.Effect<Exit<A2, E>, E2, R>): (self: Exit<A, E>) => Effect.Effect<Exit<A2, E>, E2, R>
|
|
264
262
|
/**
|
|
265
263
|
* @since 2.0.0
|
|
266
264
|
* @category sequencing
|
|
@@ -387,7 +385,7 @@ export const mapBoth: {
|
|
|
387
385
|
* @category mapping
|
|
388
386
|
*/
|
|
389
387
|
<E, A, E2, A2>(
|
|
390
|
-
|
|
388
|
+
options: { readonly onFailure: (e: E) => E2; readonly onSuccess: (a: A) => A2 }
|
|
391
389
|
): (self: Exit<A, E>) => Exit<A2, E2>
|
|
392
390
|
/**
|
|
393
391
|
* Maps over the `Success` and `Failure` cases of the specified exit using the
|
|
@@ -397,8 +395,8 @@ export const mapBoth: {
|
|
|
397
395
|
* @category mapping
|
|
398
396
|
*/
|
|
399
397
|
<A, E, E2, A2>(
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
self: Exit<A, E>,
|
|
399
|
+
options: { readonly onFailure: (e: E) => E2; readonly onSuccess: (a: A) => A2 }
|
|
402
400
|
): Exit<A2, E2>
|
|
403
401
|
} = core.exitMapBoth
|
|
404
402
|
|
|
@@ -464,15 +462,15 @@ export const match: {
|
|
|
464
462
|
* @category folding
|
|
465
463
|
*/
|
|
466
464
|
<E, A, Z1, Z2>(
|
|
467
|
-
|
|
465
|
+
options: { readonly onFailure: (cause: Cause.Cause<E>) => Z1; readonly onSuccess: (a: A) => Z2 }
|
|
468
466
|
): (self: Exit<A, E>) => Z1 | Z2
|
|
469
467
|
/**
|
|
470
468
|
* @since 2.0.0
|
|
471
469
|
* @category folding
|
|
472
470
|
*/
|
|
473
471
|
<A, E, Z1, Z2>(
|
|
474
|
-
|
|
475
|
-
|
|
472
|
+
self: Exit<A, E>,
|
|
473
|
+
options: { readonly onFailure: (cause: Cause.Cause<E>) => Z1; readonly onSuccess: (a: A) => Z2 }
|
|
476
474
|
): Z1 | Z2
|
|
477
475
|
} = core.exitMatch
|
|
478
476
|
|
|
@@ -486,21 +484,21 @@ export const matchEffect: {
|
|
|
486
484
|
* @category folding
|
|
487
485
|
*/
|
|
488
486
|
<E, A2, E2, R, A, A3, E3, R2>(
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
487
|
+
options: {
|
|
488
|
+
readonly onFailure: (cause: Cause.Cause<E>) => Effect.Effect<A2, E2, R>
|
|
489
|
+
readonly onSuccess: (a: A) => Effect.Effect<A3, E3, R2>
|
|
490
|
+
}
|
|
493
491
|
): (self: Exit<A, E>) => Effect.Effect<A2 | A3, E2 | E3, R | R2>
|
|
494
492
|
/**
|
|
495
493
|
* @since 2.0.0
|
|
496
494
|
* @category folding
|
|
497
495
|
*/
|
|
498
496
|
<A, E, A2, E2, R, A3, E3, R2>(
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
497
|
+
self: Exit<A, E>,
|
|
498
|
+
options: {
|
|
499
|
+
readonly onFailure: (cause: Cause.Cause<E>) => Effect.Effect<A2, E2, R>
|
|
500
|
+
readonly onSuccess: (a: A) => Effect.Effect<A3, E3, R2>
|
|
501
|
+
}
|
|
504
502
|
): Effect.Effect<A2 | A3, E2 | E3, R | R2>
|
|
505
503
|
} = core.exitMatchEffect
|
|
506
504
|
|
|
@@ -695,11 +693,11 @@ export const zipWith: {
|
|
|
695
693
|
* @category zipping
|
|
696
694
|
*/
|
|
697
695
|
<B, E2, A, C, E>(
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
696
|
+
that: Exit<B, E2>,
|
|
697
|
+
options: {
|
|
698
|
+
readonly onSuccess: (a: A, b: B) => C
|
|
699
|
+
readonly onFailure: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<any>
|
|
700
|
+
}
|
|
703
701
|
): (self: Exit<A, E>) => Exit<C, any>
|
|
704
702
|
/**
|
|
705
703
|
* Zips this exit together with that exit using the specified combination
|
|
@@ -709,11 +707,11 @@ export const zipWith: {
|
|
|
709
707
|
* @category zipping
|
|
710
708
|
*/
|
|
711
709
|
<A, E, B, E2, C>(
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
710
|
+
self: Exit<A, E>,
|
|
711
|
+
that: Exit<B, E2>,
|
|
712
|
+
options: {
|
|
713
|
+
readonly onSuccess: (a: A, b: B) => C
|
|
714
|
+
readonly onFailure: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2>
|
|
715
|
+
}
|
|
718
716
|
): Exit<C, E | E2>
|
|
719
717
|
} = core.exitZipWith
|
package/src/Fiber.ts
CHANGED
|
@@ -668,10 +668,10 @@ export const match: {
|
|
|
668
668
|
* @category folding
|
|
669
669
|
*/
|
|
670
670
|
<A, E, Z>(
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
671
|
+
options: {
|
|
672
|
+
readonly onFiber: (fiber: Fiber<A, E>) => Z
|
|
673
|
+
readonly onRuntimeFiber: (fiber: RuntimeFiber<A, E>) => Z
|
|
674
|
+
}
|
|
675
675
|
): (self: Fiber<A, E>) => Z
|
|
676
676
|
/**
|
|
677
677
|
* Folds over the `Fiber` or `RuntimeFiber`.
|
|
@@ -680,11 +680,11 @@ export const match: {
|
|
|
680
680
|
* @category folding
|
|
681
681
|
*/
|
|
682
682
|
<A, E, Z>(
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
683
|
+
self: Fiber<A, E>,
|
|
684
|
+
options: {
|
|
685
|
+
readonly onFiber: (fiber: Fiber<A, E>) => Z
|
|
686
|
+
readonly onRuntimeFiber: (fiber: RuntimeFiber<A, E>) => Z
|
|
687
|
+
}
|
|
688
688
|
): Z
|
|
689
689
|
} = internal.match
|
|
690
690
|
|
package/src/FiberRefsPatch.ts
CHANGED
|
@@ -132,8 +132,8 @@ export const patch: {
|
|
|
132
132
|
* @category destructors
|
|
133
133
|
*/
|
|
134
134
|
(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
self: FiberRefsPatch,
|
|
136
|
+
fiberId: FiberId.Runtime,
|
|
137
|
+
oldValue: FiberRefs.FiberRefs
|
|
138
138
|
): FiberRefs.FiberRefs
|
|
139
139
|
} = internal.patch
|
package/src/Function.ts
CHANGED
|
@@ -116,10 +116,7 @@ export const dual: {
|
|
|
116
116
|
*
|
|
117
117
|
* @since 2.0.0
|
|
118
118
|
*/
|
|
119
|
-
<DataLast extends (...args: Array<any>) => any, DataFirst extends (...args: Array<any>) => any>(
|
|
120
|
-
arity: Parameters<DataFirst>["length"],
|
|
121
|
-
body: DataFirst
|
|
122
|
-
): DataLast & DataFirst
|
|
119
|
+
<DataLast extends (...args: Array<any>) => any, DataFirst extends (...args: Array<any>) => any>(arity: Parameters<DataFirst>["length"], body: DataFirst): DataLast & DataFirst
|
|
123
120
|
/**
|
|
124
121
|
* Creates a function that can be used in a data-last (aka `pipe`able) or
|
|
125
122
|
* data-first style.
|
|
@@ -163,10 +160,7 @@ export const dual: {
|
|
|
163
160
|
*
|
|
164
161
|
* @since 2.0.0
|
|
165
162
|
*/
|
|
166
|
-
<DataLast extends (...args: Array<any>) => any, DataFirst extends (...args: Array<any>) => any>(
|
|
167
|
-
isDataFirst: (args: IArguments) => boolean,
|
|
168
|
-
body: DataFirst
|
|
169
|
-
): DataLast & DataFirst
|
|
163
|
+
<DataLast extends (...args: Array<any>) => any, DataFirst extends (...args: Array<any>) => any>(isDataFirst: (args: IArguments) => boolean, body: DataFirst): DataLast & DataFirst
|
|
170
164
|
} = function(arity, body) {
|
|
171
165
|
if (typeof arity === "function") {
|
|
172
166
|
return function() {
|
package/src/GroupBy.ts
CHANGED
|
@@ -67,8 +67,8 @@ export const evaluate: {
|
|
|
67
67
|
* @category destructors
|
|
68
68
|
*/
|
|
69
69
|
<K, V, E, A, E2, R2>(
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
f: (key: K, stream: Stream.Stream<V, E, never>) => Stream.Stream<A, E2, R2>,
|
|
71
|
+
options?: { readonly bufferSize?: number | undefined } | undefined
|
|
72
72
|
): <R>(self: GroupBy<K, V, E, R>) => Stream.Stream<A, E | E2, R2 | R>
|
|
73
73
|
/**
|
|
74
74
|
* Run the function across all groups, collecting the results in an
|
|
@@ -78,9 +78,9 @@ export const evaluate: {
|
|
|
78
78
|
* @category destructors
|
|
79
79
|
*/
|
|
80
80
|
<K, V, E, R, A, E2, R2>(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
self: GroupBy<K, V, E, R>,
|
|
82
|
+
f: (key: K, stream: Stream.Stream<V, E, never>) => Stream.Stream<A, E2, R2>,
|
|
83
|
+
options?: { readonly bufferSize?: number | undefined } | undefined
|
|
84
84
|
): Stream.Stream<A, E | E2, R | R2>
|
|
85
85
|
} = internal.evaluate
|
|
86
86
|
|
package/src/HashSet.ts
CHANGED
|
@@ -551,9 +551,7 @@ export const partition: {
|
|
|
551
551
|
* @since 2.0.0
|
|
552
552
|
* @category partitioning
|
|
553
553
|
*/
|
|
554
|
-
<A, B extends A>(
|
|
555
|
-
refinement: Refinement<NoInfer<A>, B>
|
|
556
|
-
): (self: HashSet<A>) => [excluded: HashSet<Exclude<A, B>>, satisfying: HashSet<B>]
|
|
554
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: HashSet<A>) => [excluded: HashSet<Exclude<A, B>>, satisfying: HashSet<B>]
|
|
557
555
|
/**
|
|
558
556
|
* Partition the values of a `HashSet` using the specified predicate.
|
|
559
557
|
*
|
|
@@ -575,10 +573,7 @@ export const partition: {
|
|
|
575
573
|
* @since 2.0.0
|
|
576
574
|
* @category partitioning
|
|
577
575
|
*/
|
|
578
|
-
<A, B extends A>(
|
|
579
|
-
self: HashSet<A>,
|
|
580
|
-
refinement: Refinement<A, B>
|
|
581
|
-
): [excluded: HashSet<Exclude<A, B>>, satisfying: HashSet<B>]
|
|
576
|
+
<A, B extends A>(self: HashSet<A>, refinement: Refinement<A, B>): [excluded: HashSet<Exclude<A, B>>, satisfying: HashSet<B>]
|
|
582
577
|
/**
|
|
583
578
|
* Partition the values of a `HashSet` using the specified predicate.
|
|
584
579
|
*
|
package/src/Iterable.ts
CHANGED
|
@@ -977,9 +977,7 @@ export const groupBy: {
|
|
|
977
977
|
* @category grouping
|
|
978
978
|
* @since 2.0.0
|
|
979
979
|
*/
|
|
980
|
-
<A, K extends string | symbol>(
|
|
981
|
-
f: (a: A) => K
|
|
982
|
-
): (self: Iterable<A>) => Record<Record.ReadonlyRecord.NonLiteralKey<K>, NonEmptyArray<A>>
|
|
980
|
+
<A, K extends string | symbol>(f: (a: A) => K): (self: Iterable<A>) => Record<Record.ReadonlyRecord.NonLiteralKey<K>, NonEmptyArray<A>>
|
|
983
981
|
/**
|
|
984
982
|
* Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning
|
|
985
983
|
* function on each element, and grouping the results according to values returned
|
|
@@ -987,10 +985,7 @@ export const groupBy: {
|
|
|
987
985
|
* @category grouping
|
|
988
986
|
* @since 2.0.0
|
|
989
987
|
*/
|
|
990
|
-
<A, K extends string | symbol>(
|
|
991
|
-
self: Iterable<A>,
|
|
992
|
-
f: (a: A) => K
|
|
993
|
-
): Record<Record.ReadonlyRecord.NonLiteralKey<K>, NonEmptyArray<A>>
|
|
988
|
+
<A, K extends string | symbol>(self: Iterable<A>, f: (a: A) => K): Record<Record.ReadonlyRecord.NonLiteralKey<K>, NonEmptyArray<A>>
|
|
994
989
|
} = dual(2, <A, K extends string | symbol>(
|
|
995
990
|
self: Iterable<A>,
|
|
996
991
|
f: (a: A) => K
|
package/src/Layer.ts
CHANGED
|
@@ -262,19 +262,14 @@ export const catchAll: {
|
|
|
262
262
|
* @since 2.0.0
|
|
263
263
|
* @category error handling
|
|
264
264
|
*/
|
|
265
|
-
<E, RIn2, E2, ROut2>(
|
|
266
|
-
onError: (error: E) => Layer<ROut2, E2, RIn2>
|
|
267
|
-
): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut & ROut2, E2, RIn2 | RIn>
|
|
265
|
+
<E, RIn2, E2, ROut2>(onError: (error: E) => Layer<ROut2, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut & ROut2, E2, RIn2 | RIn>
|
|
268
266
|
/**
|
|
269
267
|
* Recovers from all errors.
|
|
270
268
|
*
|
|
271
269
|
* @since 2.0.0
|
|
272
270
|
* @category error handling
|
|
273
271
|
*/
|
|
274
|
-
<RIn, E, ROut, RIn2, E2, ROut2>(
|
|
275
|
-
self: Layer<ROut, E, RIn>,
|
|
276
|
-
onError: (error: E) => Layer<ROut2, E2, RIn2>
|
|
277
|
-
): Layer<ROut & ROut2, E2, RIn | RIn2>
|
|
272
|
+
<RIn, E, ROut, RIn2, E2, ROut2>(self: Layer<ROut, E, RIn>, onError: (error: E) => Layer<ROut2, E2, RIn2>): Layer<ROut & ROut2, E2, RIn | RIn2>
|
|
278
273
|
} = internal.catchAll
|
|
279
274
|
|
|
280
275
|
/**
|
|
@@ -290,9 +285,7 @@ export const catchAllCause: {
|
|
|
290
285
|
* @since 2.0.0
|
|
291
286
|
* @category error handling
|
|
292
287
|
*/
|
|
293
|
-
<E, RIn2, E2, ROut2>(
|
|
294
|
-
onError: (cause: Cause.Cause<E>) => Layer<ROut2, E2, RIn2>
|
|
295
|
-
): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut & ROut2, E2, RIn2 | RIn>
|
|
288
|
+
<E, RIn2, E2, ROut2>(onError: (cause: Cause.Cause<E>) => Layer<ROut2, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut & ROut2, E2, RIn2 | RIn>
|
|
296
289
|
/**
|
|
297
290
|
* Recovers from all errors.
|
|
298
291
|
*
|
|
@@ -445,9 +438,7 @@ export const flatMap: {
|
|
|
445
438
|
* @since 2.0.0
|
|
446
439
|
* @category sequencing
|
|
447
440
|
*/
|
|
448
|
-
<A, A2, E2, R2>(
|
|
449
|
-
f: (context: Context.Context<A>) => Layer<A2, E2, R2>
|
|
450
|
-
): <E, R>(self: Layer<A, E, R>) => Layer<A2, E2 | E, R2 | R>
|
|
441
|
+
<A, A2, E2, R2>(f: (context: Context.Context<A>) => Layer<A2, E2, R2>): <E, R>(self: Layer<A, E, R>) => Layer<A2, E2 | E, R2 | R>
|
|
451
442
|
/**
|
|
452
443
|
* Constructs a layer dynamically based on the output of this layer.
|
|
453
444
|
*
|
|
@@ -669,19 +660,14 @@ export const merge: {
|
|
|
669
660
|
* @since 2.0.0
|
|
670
661
|
* @category zipping
|
|
671
662
|
*/
|
|
672
|
-
<RIn2, E2, ROut2>(
|
|
673
|
-
that: Layer<ROut2, E2, RIn2>
|
|
674
|
-
): <RIn, E1, ROut>(self: Layer<ROut, E1, RIn>) => Layer<ROut2 | ROut, E2 | E1, RIn2 | RIn>
|
|
663
|
+
<RIn2, E2, ROut2>(that: Layer<ROut2, E2, RIn2>): <RIn, E1, ROut>(self: Layer<ROut, E1, RIn>) => Layer<ROut2 | ROut, E2 | E1, RIn2 | RIn>
|
|
675
664
|
/**
|
|
676
665
|
* Merges this layer with the specified layer concurrently, producing a new layer with combined input and output types.
|
|
677
666
|
*
|
|
678
667
|
* @since 2.0.0
|
|
679
668
|
* @category zipping
|
|
680
669
|
*/
|
|
681
|
-
<RIn, E1, ROut, RIn2, E2, ROut2>(
|
|
682
|
-
self: Layer<ROut, E1, RIn>,
|
|
683
|
-
that: Layer<ROut2, E2, RIn2>
|
|
684
|
-
): Layer<ROut | ROut2, E1 | E2, RIn | RIn2>
|
|
670
|
+
<RIn, E1, ROut, RIn2, E2, ROut2>(self: Layer<ROut, E1, RIn>, that: Layer<ROut2, E2, RIn2>): Layer<ROut | ROut2, E1 | E2, RIn | RIn2>
|
|
685
671
|
} = internal.merge
|
|
686
672
|
|
|
687
673
|
/**
|
|
@@ -859,19 +845,14 @@ export const retry: {
|
|
|
859
845
|
* @since 2.0.0
|
|
860
846
|
* @category retrying
|
|
861
847
|
*/
|
|
862
|
-
<X, E, RIn2>(
|
|
863
|
-
schedule: Schedule.Schedule<X, NoInfer<E>, RIn2>
|
|
864
|
-
): <ROut, RIn>(self: Layer<ROut, E, RIn>) => Layer<ROut, E, RIn2 | RIn>
|
|
848
|
+
<X, E, RIn2>(schedule: Schedule.Schedule<X, NoInfer<E>, RIn2>): <ROut, RIn>(self: Layer<ROut, E, RIn>) => Layer<ROut, E, RIn2 | RIn>
|
|
865
849
|
/**
|
|
866
850
|
* Retries constructing this layer according to the specified schedule.
|
|
867
851
|
*
|
|
868
852
|
* @since 2.0.0
|
|
869
853
|
* @category retrying
|
|
870
854
|
*/
|
|
871
|
-
<ROut, E, RIn, X, RIn2>(
|
|
872
|
-
self: Layer<ROut, E, RIn>,
|
|
873
|
-
schedule: Schedule.Schedule<X, E, RIn2>
|
|
874
|
-
): Layer<ROut, E, RIn | RIn2>
|
|
855
|
+
<ROut, E, RIn, X, RIn2>(self: Layer<ROut, E, RIn>, schedule: Schedule.Schedule<X, E, RIn2>): Layer<ROut, E, RIn | RIn2>
|
|
875
856
|
} = internal.retry
|
|
876
857
|
|
|
877
858
|
/**
|
|
@@ -898,19 +879,14 @@ export const scoped: {
|
|
|
898
879
|
* @since 2.0.0
|
|
899
880
|
* @category constructors
|
|
900
881
|
*/
|
|
901
|
-
<I, S>(
|
|
902
|
-
tag: Context.Tag<I, S>
|
|
903
|
-
): <E, R>(effect: Effect.Effect<Types.NoInfer<S>, E, R>) => Layer<I, E, Exclude<R, Scope.Scope>>
|
|
882
|
+
<I, S>(tag: Context.Tag<I, S>): <E, R>(effect: Effect.Effect<Types.NoInfer<S>, E, R>) => Layer<I, E, Exclude<R, Scope.Scope>>
|
|
904
883
|
/**
|
|
905
884
|
* Constructs a layer from the specified scoped effect.
|
|
906
885
|
*
|
|
907
886
|
* @since 2.0.0
|
|
908
887
|
* @category constructors
|
|
909
888
|
*/
|
|
910
|
-
<I, S, E, R>(
|
|
911
|
-
tag: Context.Tag<I, S>,
|
|
912
|
-
effect: Effect.Effect<Types.NoInfer<S>, E, R>
|
|
913
|
-
): Layer<I, E, Exclude<R, Scope.Scope>>
|
|
889
|
+
<I, S, E, R>(tag: Context.Tag<I, S>, effect: Effect.Effect<Types.NoInfer<S>, E, R>): Layer<I, E, Exclude<R, Scope.Scope>>
|
|
914
890
|
} = internal.scoped
|
|
915
891
|
|
|
916
892
|
/**
|
|
@@ -1028,9 +1004,7 @@ export const tap: {
|
|
|
1028
1004
|
* @since 2.0.0
|
|
1029
1005
|
* @category sequencing
|
|
1030
1006
|
*/
|
|
1031
|
-
<ROut, XR extends ROut, RIn2, E2, X>(
|
|
1032
|
-
f: (context: Context.Context<XR>) => Effect.Effect<X, E2, RIn2>
|
|
1033
|
-
): <RIn, E>(self: Layer<ROut, E, RIn>) => Layer<ROut, E2 | E, RIn2 | RIn>
|
|
1007
|
+
<ROut, XR extends ROut, RIn2, E2, X>(f: (context: Context.Context<XR>) => Effect.Effect<X, E2, RIn2>): <RIn, E>(self: Layer<ROut, E, RIn>) => Layer<ROut, E2 | E, RIn2 | RIn>
|
|
1034
1008
|
/**
|
|
1035
1009
|
* Performs the specified effect if this layer succeeds.
|
|
1036
1010
|
*
|
|
@@ -1056,19 +1030,14 @@ export const tapError: {
|
|
|
1056
1030
|
* @since 2.0.0
|
|
1057
1031
|
* @category sequencing
|
|
1058
1032
|
*/
|
|
1059
|
-
<E, XE extends E, RIn2, E2, X>(
|
|
1060
|
-
f: (e: XE) => Effect.Effect<X, E2, RIn2>
|
|
1061
|
-
): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn2 | RIn>
|
|
1033
|
+
<E, XE extends E, RIn2, E2, X>(f: (e: XE) => Effect.Effect<X, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn2 | RIn>
|
|
1062
1034
|
/**
|
|
1063
1035
|
* Performs the specified effect if this layer fails.
|
|
1064
1036
|
*
|
|
1065
1037
|
* @since 2.0.0
|
|
1066
1038
|
* @category sequencing
|
|
1067
1039
|
*/
|
|
1068
|
-
<RIn, E, XE extends E, ROut, RIn2, E2, X>(
|
|
1069
|
-
self: Layer<ROut, E, RIn>,
|
|
1070
|
-
f: (e: XE) => Effect.Effect<X, E2, RIn2>
|
|
1071
|
-
): Layer<ROut, E | E2, RIn | RIn2>
|
|
1040
|
+
<RIn, E, XE extends E, ROut, RIn2, E2, X>(self: Layer<ROut, E, RIn>, f: (e: XE) => Effect.Effect<X, E2, RIn2>): Layer<ROut, E | E2, RIn | RIn2>
|
|
1072
1041
|
} = internal.tapError
|
|
1073
1042
|
|
|
1074
1043
|
/**
|
|
@@ -1084,9 +1053,7 @@ export const tapErrorCause: {
|
|
|
1084
1053
|
* @since 2.0.0
|
|
1085
1054
|
* @category sequencing
|
|
1086
1055
|
*/
|
|
1087
|
-
<E, XE extends E, RIn2, E2, X>(
|
|
1088
|
-
f: (cause: Cause.Cause<XE>) => Effect.Effect<X, E2, RIn2>
|
|
1089
|
-
): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn2 | RIn>
|
|
1056
|
+
<E, XE extends E, RIn2, E2, X>(f: (cause: Cause.Cause<XE>) => Effect.Effect<X, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn2 | RIn>
|
|
1090
1057
|
/**
|
|
1091
1058
|
* Performs the specified effect if this layer fails.
|
|
1092
1059
|
*
|
|
@@ -1125,9 +1092,7 @@ export const toRuntimeWithMemoMap: {
|
|
|
1125
1092
|
* @since 2.0.0
|
|
1126
1093
|
* @category conversions
|
|
1127
1094
|
*/
|
|
1128
|
-
(
|
|
1129
|
-
memoMap: MemoMap
|
|
1130
|
-
): <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect.Effect<Runtime.Runtime<ROut>, E, Scope.Scope | RIn>
|
|
1095
|
+
(memoMap: MemoMap): <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect.Effect<Runtime.Runtime<ROut>, E, Scope.Scope | RIn>
|
|
1131
1096
|
/**
|
|
1132
1097
|
* Converts a layer that requires no services into a scoped runtime, which can
|
|
1133
1098
|
* be used to execute effects.
|
|
@@ -1135,10 +1100,7 @@ export const toRuntimeWithMemoMap: {
|
|
|
1135
1100
|
* @since 2.0.0
|
|
1136
1101
|
* @category conversions
|
|
1137
1102
|
*/
|
|
1138
|
-
<RIn, E, ROut>(
|
|
1139
|
-
self: Layer<ROut, E, RIn>,
|
|
1140
|
-
memoMap: MemoMap
|
|
1141
|
-
): Effect.Effect<Runtime.Runtime<ROut>, E, Scope.Scope | RIn>
|
|
1103
|
+
<RIn, E, ROut>(self: Layer<ROut, E, RIn>, memoMap: MemoMap): Effect.Effect<Runtime.Runtime<ROut>, E, Scope.Scope | RIn>
|
|
1142
1104
|
} = internal.toRuntimeWithMemoMap
|
|
1143
1105
|
|
|
1144
1106
|
/**
|
|
@@ -1158,9 +1120,7 @@ export const provide: {
|
|
|
1158
1120
|
* @since 2.0.0
|
|
1159
1121
|
* @category utils
|
|
1160
1122
|
*/
|
|
1161
|
-
<RIn, E, ROut>(
|
|
1162
|
-
that: Layer<ROut, E, RIn>
|
|
1163
|
-
): <RIn2, E2, ROut2>(self: Layer<ROut2, E2, RIn2>) => Layer<ROut2, E | E2, RIn | Exclude<RIn2, ROut>>
|
|
1123
|
+
<RIn, E, ROut>(that: Layer<ROut, E, RIn>): <RIn2, E2, ROut2>(self: Layer<ROut2, E2, RIn2>) => Layer<ROut2, E | E2, RIn | Exclude<RIn2, ROut>>
|
|
1164
1124
|
/**
|
|
1165
1125
|
* Feeds the output services of this builder into the input of the specified
|
|
1166
1126
|
* builder, resulting in a new builder with the inputs of this builder as
|
|
@@ -1185,10 +1145,7 @@ export const provide: {
|
|
|
1185
1145
|
* @since 2.0.0
|
|
1186
1146
|
* @category utils
|
|
1187
1147
|
*/
|
|
1188
|
-
<RIn2, E2, ROut2, RIn, E, ROut>(
|
|
1189
|
-
self: Layer<ROut2, E2, RIn2>,
|
|
1190
|
-
that: Layer<ROut, E, RIn>
|
|
1191
|
-
): Layer<ROut2, E | E2, RIn | Exclude<RIn2, ROut>>
|
|
1148
|
+
<RIn2, E2, ROut2, RIn, E, ROut>(self: Layer<ROut2, E2, RIn2>, that: Layer<ROut, E, RIn>): Layer<ROut2, E | E2, RIn | Exclude<RIn2, ROut>>
|
|
1192
1149
|
/**
|
|
1193
1150
|
* Feeds the output services of this builder into the input of the specified
|
|
1194
1151
|
* builder, resulting in a new builder with the inputs of this builder as
|
|
@@ -1222,9 +1179,7 @@ export const provideMerge: {
|
|
|
1222
1179
|
* @since 2.0.0
|
|
1223
1180
|
* @category utils
|
|
1224
1181
|
*/
|
|
1225
|
-
<RIn, E, ROut>(
|
|
1226
|
-
self: Layer<ROut, E, RIn>
|
|
1227
|
-
): <RIn2, E2, ROut2>(that: Layer<ROut2, E2, RIn2>) => Layer<ROut | ROut2, E | E2, RIn | Exclude<RIn2, ROut>>
|
|
1182
|
+
<RIn, E, ROut>(self: Layer<ROut, E, RIn>): <RIn2, E2, ROut2>(that: Layer<ROut2, E2, RIn2>) => Layer<ROut | ROut2, E | E2, RIn | Exclude<RIn2, ROut>>
|
|
1228
1183
|
/**
|
|
1229
1184
|
* Feeds the output services of this layer into the input of the specified
|
|
1230
1185
|
* layer, resulting in a new layer with the inputs of this layer, and the
|
|
@@ -1233,10 +1188,7 @@ export const provideMerge: {
|
|
|
1233
1188
|
* @since 2.0.0
|
|
1234
1189
|
* @category utils
|
|
1235
1190
|
*/
|
|
1236
|
-
<RIn2, E2, ROut2, RIn, E, ROut>(
|
|
1237
|
-
that: Layer<ROut2, E2, RIn2>,
|
|
1238
|
-
self: Layer<ROut, E, RIn>
|
|
1239
|
-
): Layer<ROut2 | ROut, E2 | E, RIn | Exclude<RIn2, ROut>>
|
|
1191
|
+
<RIn2, E2, ROut2, RIn, E, ROut>(that: Layer<ROut2, E2, RIn2>, self: Layer<ROut, E, RIn>): Layer<ROut2 | ROut, E2 | E, RIn | Exclude<RIn2, ROut>>
|
|
1240
1192
|
} = internal.provideMerge
|
|
1241
1193
|
|
|
1242
1194
|
/**
|
|
@@ -1499,10 +1451,7 @@ export const buildWithMemoMap: {
|
|
|
1499
1451
|
* @since 2.0.0
|
|
1500
1452
|
* @category memo map
|
|
1501
1453
|
*/
|
|
1502
|
-
(
|
|
1503
|
-
memoMap: MemoMap,
|
|
1504
|
-
scope: Scope.Scope
|
|
1505
|
-
): <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect.Effect<Context.Context<ROut>, E, RIn>
|
|
1454
|
+
(memoMap: MemoMap, scope: Scope.Scope): <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect.Effect<Context.Context<ROut>, E, RIn>
|
|
1506
1455
|
/**
|
|
1507
1456
|
* Builds a layer into an `Effect` value, using the specified `MemoMap` to memoize
|
|
1508
1457
|
* the layer construction.
|
|
@@ -1510,11 +1459,7 @@ export const buildWithMemoMap: {
|
|
|
1510
1459
|
* @since 2.0.0
|
|
1511
1460
|
* @category memo map
|
|
1512
1461
|
*/
|
|
1513
|
-
<RIn, E, ROut>(
|
|
1514
|
-
self: Layer<ROut, E, RIn>,
|
|
1515
|
-
memoMap: MemoMap,
|
|
1516
|
-
scope: Scope.Scope
|
|
1517
|
-
): Effect.Effect<Context.Context<ROut>, E, RIn>
|
|
1462
|
+
<RIn, E, ROut>(self: Layer<ROut, E, RIn>, memoMap: MemoMap, scope: Scope.Scope): Effect.Effect<Context.Context<ROut>, E, RIn>
|
|
1518
1463
|
} = internal.buildWithMemoMap
|
|
1519
1464
|
|
|
1520
1465
|
/**
|
package/src/List.ts
CHANGED
|
@@ -457,16 +457,13 @@ export const prepend: {
|
|
|
457
457
|
* @since 2.0.0
|
|
458
458
|
*/
|
|
459
459
|
<A, B>(self: List<A>, element: B): Cons<A | B>
|
|
460
|
-
} = dual(2, <A, B>(self: List<A>, element: B): Cons<A | B> =>
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
*/
|
|
468
|
-
A | B
|
|
469
|
-
>(element, self))
|
|
460
|
+
} = dual(2, <A, B>(self: List<A>, element: B): Cons<A | B> => cons</**
|
|
461
|
+
* Prepends the specified element to the beginning of the list.
|
|
462
|
+
*
|
|
463
|
+
* @category concatenating
|
|
464
|
+
* @since 2.0.0
|
|
465
|
+
*/
|
|
466
|
+
A | B>(element, self))
|
|
470
467
|
|
|
471
468
|
/**
|
|
472
469
|
* Prepends the specified prefix list to the beginning of the specified list.
|
|
@@ -564,8 +561,28 @@ export const prependAll: {
|
|
|
564
561
|
} else if (isNil(prefix)) {
|
|
565
562
|
return self
|
|
566
563
|
} else {
|
|
567
|
-
const result = makeCons
|
|
568
|
-
|
|
564
|
+
const result = makeCons</**
|
|
565
|
+
* Prepends the specified prefix list to the beginning of the specified list.
|
|
566
|
+
* If either list is non-empty, the result is also a non-empty list.
|
|
567
|
+
*
|
|
568
|
+
* @example
|
|
569
|
+
* ```ts
|
|
570
|
+
* import { List } from "effect"
|
|
571
|
+
*
|
|
572
|
+
* assert.deepStrictEqual(
|
|
573
|
+
* List.make(1, 2).pipe(List.prependAll(List.make("a", "b")), List.toArray),
|
|
574
|
+
* ["a", "b", 1, 2]
|
|
575
|
+
* )
|
|
576
|
+
* ```
|
|
577
|
+
*
|
|
578
|
+
* @category concatenating
|
|
579
|
+
* @since 2.0.0
|
|
580
|
+
*/
|
|
581
|
+
A | B>(prefix.head, self)
|
|
582
|
+
let curr = result
|
|
583
|
+
let that = prefix.tail
|
|
584
|
+
while (!isNil(that)) {
|
|
585
|
+
const temp = makeCons</**
|
|
569
586
|
* Prepends the specified prefix list to the beginning of the specified list.
|
|
570
587
|
* If either list is non-empty, the result is also a non-empty list.
|
|
571
588
|
*
|
|
@@ -582,31 +599,7 @@ export const prependAll: {
|
|
|
582
599
|
* @category concatenating
|
|
583
600
|
* @since 2.0.0
|
|
584
601
|
*/
|
|
585
|
-
A | B
|
|
586
|
-
>(prefix.head, self)
|
|
587
|
-
let curr = result
|
|
588
|
-
let that = prefix.tail
|
|
589
|
-
while (!isNil(that)) {
|
|
590
|
-
const temp = makeCons<
|
|
591
|
-
/**
|
|
592
|
-
* Prepends the specified prefix list to the beginning of the specified list.
|
|
593
|
-
* If either list is non-empty, the result is also a non-empty list.
|
|
594
|
-
*
|
|
595
|
-
* @example
|
|
596
|
-
* ```ts
|
|
597
|
-
* import { List } from "effect"
|
|
598
|
-
*
|
|
599
|
-
* assert.deepStrictEqual(
|
|
600
|
-
* List.make(1, 2).pipe(List.prependAll(List.make("a", "b")), List.toArray),
|
|
601
|
-
* ["a", "b", 1, 2]
|
|
602
|
-
* )
|
|
603
|
-
* ```
|
|
604
|
-
*
|
|
605
|
-
* @category concatenating
|
|
606
|
-
* @since 2.0.0
|
|
607
|
-
*/
|
|
608
|
-
A | B
|
|
609
|
-
>(that.head, self)
|
|
602
|
+
A | B>(that.head, self)
|
|
610
603
|
curr.tail = temp
|
|
611
604
|
curr = temp
|
|
612
605
|
that = that.tail
|
|
@@ -999,9 +992,7 @@ export const flatMap: {
|
|
|
999
992
|
* @since 2.0.0
|
|
1000
993
|
* @category sequencing
|
|
1001
994
|
*/
|
|
1002
|
-
<S extends List<any>, T extends List<any>>(
|
|
1003
|
-
f: (a: List.Infer<S>, i: number) => T
|
|
1004
|
-
): (self: S) => List.AndNonEmpty<S, T, List.Infer<T>>
|
|
995
|
+
<S extends List<any>, T extends List<any>>(f: (a: List.Infer<S>, i: number) => T): (self: S) => List.AndNonEmpty<S, T, List.Infer<T>>
|
|
1005
996
|
/**
|
|
1006
997
|
* Applies a function to each element in a list and returns a new list containing the concatenated mapped elements.
|
|
1007
998
|
*
|
|
@@ -1173,9 +1164,7 @@ export const partition: {
|
|
|
1173
1164
|
* @since 2.0.0
|
|
1174
1165
|
* @category combinators
|
|
1175
1166
|
*/
|
|
1176
|
-
<A, B extends A>(
|
|
1177
|
-
refinement: Refinement<NoInfer<A>, B>
|
|
1178
|
-
): (self: List<A>) => [excluded: List<Exclude<A, B>>, satisfying: List<B>]
|
|
1167
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: List<A>) => [excluded: List<Exclude<A, B>>, satisfying: List<B>]
|
|
1179
1168
|
/**
|
|
1180
1169
|
* Partition a list into two lists, where the first list contains all elements
|
|
1181
1170
|
* that did not satisfy the specified predicate, and the second list contains
|