effect 4.0.0-beta.70 → 4.0.0-beta.72
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/Array.d.ts +1483 -239
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +617 -164
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +646 -52
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +331 -28
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +474 -18
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +292 -14
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +239 -19
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +163 -13
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +53 -8
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +82 -11
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +73 -12
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +53 -15
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +488 -200
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +349 -129
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +539 -158
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +222 -89
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +81 -6
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +45 -4
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +179 -54
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +65 -22
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +60 -3
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +31 -1
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +21 -21
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +14 -18
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +135 -50
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +109 -37
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +52 -29
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +21 -21
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +32 -7
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +32 -7
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +503 -48
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +191 -17
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +116 -6
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +92 -6
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +30 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +30 -1
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +92 -47
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +16 -12
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +313 -128
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +167 -68
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +345 -79
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +131 -12
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +5 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Duration.d.ts +203 -50
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +112 -32
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2006 -810
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +785 -350
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +16 -2
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +16 -2
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +100 -8
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +141 -8
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +10 -11
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +7 -8
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +46 -43
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +43 -35
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +135 -16
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +93 -12
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +96 -26
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +28 -2
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +149 -101
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +117 -80
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +321 -72
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +152 -3
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +6 -6
- package/dist/FiberHandle.js +4 -4
- package/dist/FiberMap.d.ts +18 -18
- package/dist/FiberMap.js +8 -8
- package/dist/FiberSet.d.ts +21 -13
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +17 -9
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +79 -16
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +93 -33
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +221 -2
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +155 -2
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +4 -6
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +3 -5
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +164 -18
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +116 -15
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +297 -25
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +75 -12
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +59 -26
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +95 -19
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +119 -17
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +35 -37
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +13 -15
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +210 -9
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +95 -5
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +16 -16
- package/dist/HashSet.js +6 -6
- package/dist/Inspectable.d.ts +47 -4
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +74 -17
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +261 -81
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +123 -43
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +34 -19
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +52 -44
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +5 -5
- package/dist/JsonPointer.js +5 -5
- package/dist/JsonSchema.d.ts +77 -33
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +45 -31
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +158 -13
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +79 -4
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +297 -101
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +94 -36
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +9 -2
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +1 -2
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +96 -21
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +68 -9
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +21 -7
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +26 -13
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +82 -10
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +33 -2
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +215 -42
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +242 -59
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +68 -41
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +60 -33
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +285 -40
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +128 -7
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +111 -4
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +98 -39
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +24 -6
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +23 -5
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +141 -4
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +73 -2
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +20 -11
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +6 -6
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +22 -6
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +6 -1
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +434 -17
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +268 -13
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +26 -33
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +18 -25
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +186 -150
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +75 -72
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +93 -120
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +149 -142
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +37 -5
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +22 -3
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +238 -15
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +106 -8
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +34 -6
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +19 -5
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +29 -4
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +16 -4
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +53 -4
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +45 -4
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +140 -14
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +63 -8
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +98 -168
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +109 -120
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +75 -9
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +70 -9
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +241 -66
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +187 -52
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +148 -3
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +69 -2
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +167 -59
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +163 -55
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +71 -16
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +35 -0
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +171 -9
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +49 -3
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +73 -18
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +23 -3
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +174 -53
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +128 -23
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +27 -23
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +22 -18
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +82 -4
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +64 -4
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +17 -7
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +2 -4
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +168 -32
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +135 -30
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +226 -30
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +162 -23
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +15 -2
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +49 -3
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +218 -35
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +57 -10
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +213 -29
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +99 -11
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +62 -3
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +52 -3
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +380 -57
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +176 -32
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +124 -14
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +150 -25
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +436 -115
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +344 -107
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +53 -4
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +42 -3
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +934 -239
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +655 -217
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +239 -28
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +239 -28
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +127 -129
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +115 -117
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +45 -56
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +39 -50
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +254 -15
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +295 -33
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +106 -77
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +101 -71
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +92 -56
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +86 -50
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +9 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +38 -11
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +127 -25
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +91 -21
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +364 -19
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +155 -7
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +69 -7
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +49 -5
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +348 -29
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +103 -8
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +343 -45
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +194 -26
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +72 -17
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +62 -16
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +774 -224
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +333 -91
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +219 -47
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +179 -29
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +54 -110
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +26 -42
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +341 -105
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +162 -44
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +25 -7
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +25 -7
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +529 -29
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +193 -11
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +36 -13
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +5 -0
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +76 -20
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +41 -5
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +74 -7
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +74 -7
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +67 -30
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +7 -7
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +96 -108
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +42 -52
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +42 -9
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +42 -9
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +85 -2
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +56 -2
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +20 -20
- package/dist/TxHashMap.js +8 -8
- package/dist/TxHashSet.d.ts +14 -14
- package/dist/TxHashSet.js +6 -6
- package/dist/TxPriorityQueue.d.ts +43 -8
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +41 -6
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +98 -8
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +70 -8
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +58 -17
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +10 -10
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +88 -16
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +78 -14
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +113 -8
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +82 -8
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +173 -14
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +130 -14
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +206 -3
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +111 -3
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +68 -13
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.d.ts +171 -30
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +115 -30
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +130 -22
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +36 -12
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +21 -16
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +14 -6
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +0 -5205
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -5205
- package/dist/index.js.map +1 -1
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/request.js +3 -1
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/schema/arbitrary.js +11 -1
- package/dist/internal/schema/arbitrary.js.map +1 -1
- package/dist/internal/schema/representation.js +21 -12
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +69 -0
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +73 -9
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +79 -30
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +69 -31
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.d.ts +0 -107
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +0 -107
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +33 -5
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +33 -5
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +9 -0
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +43 -11
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +45 -6
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +73 -33
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +104 -8
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +103 -7
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +8 -3
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +8 -3
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +51 -7
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +50 -6
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +299 -169
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +278 -147
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +108 -14
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +80 -10
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +35 -13
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +34 -12
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +48 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +24 -3
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +23 -2
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +71 -13
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +35 -1
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +34 -12
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +33 -11
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +40 -27
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +34 -26
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +41 -25
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +41 -25
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +85 -24
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +84 -23
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +1 -1
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +1 -1
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +0 -560
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +0 -560
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/cli/Argument.js +1 -1
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +3 -3
- package/dist/unstable/cli/CliError.js +3 -3
- package/dist/unstable/cli/CliOutput.d.ts +1 -1
- package/dist/unstable/cli/Command.d.ts +136 -8
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +50 -4
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +13 -0
- package/dist/unstable/cli/Completions.d.ts.map +1 -1
- package/dist/unstable/cli/Completions.js +41 -1
- package/dist/unstable/cli/Completions.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +24 -12
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +18 -6
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +39 -8
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +39 -8
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +128 -2
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +59 -7
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -3
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +59 -10
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +37 -7
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +51 -9
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.d.ts +0 -220
- package/dist/unstable/cli/index.d.ts.map +1 -1
- package/dist/unstable/cli/index.js +0 -220
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +61 -22
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +61 -22
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +58 -5
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +58 -5
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +87 -26
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +87 -26
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +49 -10
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +6 -1
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +6 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +33 -6
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +32 -5
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +19 -0
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +19 -0
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts +44 -7
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.js +44 -7
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +5 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +4 -5
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts +19 -0
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityType.js +19 -0
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +11 -11
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +11 -11
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +42 -22
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +42 -22
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +33 -14
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.d.ts +35 -9
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.js +35 -9
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +11 -11
- package/dist/unstable/cluster/Message.js +11 -11
- package/dist/unstable/cluster/MessageStorage.d.ts +38 -24
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +37 -23
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +18 -8
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +18 -8
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +47 -14
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +47 -14
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +52 -10
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +52 -10
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +33 -16
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +33 -16
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +19 -4
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +19 -4
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +25 -1
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +24 -0
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +24 -2
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +24 -2
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +27 -3
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +63 -20
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +60 -16
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +61 -17
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -14
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -15
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +26 -1
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +26 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts +51 -9
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.js +51 -9
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +27 -13
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +27 -13
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +19 -5
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +19 -5
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +27 -1
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +27 -1
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +38 -0
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +73 -13
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +20 -0
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +20 -0
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +25 -14
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +25 -14
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/index.d.ts +0 -790
- package/dist/unstable/cluster/index.d.ts.map +1 -1
- package/dist/unstable/cluster/index.js +0 -790
- package/dist/unstable/cluster/index.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts +41 -11
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/devtools/DevTools.js +41 -11
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +38 -0
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +68 -11
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +24 -16
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +20 -13
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +20 -13
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/devtools/index.d.ts +0 -58
- package/dist/unstable/devtools/index.d.ts.map +1 -1
- package/dist/unstable/devtools/index.js +0 -58
- package/dist/unstable/devtools/index.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +2 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +30 -14
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +28 -14
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +28 -14
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +38 -17
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +3 -3
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/index.d.ts +0 -49
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +0 -49
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +28 -13
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +23 -15
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +22 -14
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +7 -7
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +36 -19
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +63 -25
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +61 -23
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +8 -3
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +8 -3
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +49 -40
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +28 -28
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +14 -4
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +14 -4
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +7 -2
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +7 -2
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +24 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +24 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +82 -7
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +119 -22
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +33 -7
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +68 -24
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +21 -0
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +50 -14
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +39 -15
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +39 -15
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +30 -11
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/index.d.ts +0 -240
- package/dist/unstable/eventlog/index.d.ts.map +1 -1
- package/dist/unstable/eventlog/index.js +0 -240
- package/dist/unstable/eventlog/index.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +99 -52
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +77 -30
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +43 -13
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +43 -13
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +59 -17
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +59 -17
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +60 -22
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +58 -20
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +6 -2
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +59 -15
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +66 -30
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +17 -7
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +15 -14
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +39 -22
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +37 -16
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +37 -16
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +35 -16
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +33 -14
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +3 -3
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +3 -3
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +46 -20
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +46 -20
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +19 -14
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +54 -26
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +34 -21
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +34 -21
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +41 -28
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +39 -26
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +53 -21
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +20 -5
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +28 -14
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +64 -42
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +48 -26
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +30 -13
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +29 -12
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +32 -19
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +32 -19
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +39 -19
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +39 -19
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.d.ts +27 -14
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +25 -12
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +41 -28
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +32 -17
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +43 -28
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +40 -25
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.d.ts +0 -452
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +0 -452
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +50 -26
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +3 -3
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +3 -3
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +39 -25
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +28 -16
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +51 -23
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +37 -17
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +34 -23
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +49 -25
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -25
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +4 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +28 -16
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +43 -43
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +42 -42
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +54 -24
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +54 -24
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +28 -16
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +7 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +45 -27
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/httpapi/index.d.ts +0 -311
- package/dist/unstable/httpapi/index.d.ts.map +1 -1
- package/dist/unstable/httpapi/index.js +0 -311
- package/dist/unstable/httpapi/index.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +31 -16
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +31 -15
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +33 -15
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +27 -16
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +27 -16
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +3 -3
- package/dist/unstable/observability/PrometheusMetrics.js +3 -3
- package/dist/unstable/observability/index.d.ts +0 -183
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +0 -183
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +12 -4
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +10 -2
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +8 -3
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +8 -3
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +29 -16
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +27 -14
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +10 -5
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +9 -4
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +20 -10
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +19 -9
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +33 -15
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/persistence/index.d.ts +0 -147
- package/dist/unstable/persistence/index.d.ts.map +1 -1
- package/dist/unstable/persistence/index.js +0 -147
- package/dist/unstable/persistence/index.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +14 -14
- package/dist/unstable/process/ChildProcess.js +7 -7
- package/dist/unstable/process/ChildProcessSpawner.d.ts +17 -5
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +17 -5
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.d.ts +0 -45
- package/dist/unstable/process/index.d.ts.map +1 -1
- package/dist/unstable/process/index.js +0 -45
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +74 -22
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +52 -20
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +81 -35
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +70 -32
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +32 -16
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +52 -25
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +81 -20
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +81 -20
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +6 -1
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +37 -17
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +44 -21
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +44 -21
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/reactivity/index.d.ts +0 -166
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +0 -166
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +47 -32
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +15 -11
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +27 -12
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +27 -12
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +31 -17
- package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +31 -17
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +29 -18
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +37 -19
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +4 -4
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +31 -21
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +31 -21
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +30 -20
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +30 -20
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +50 -33
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +48 -31
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +22 -17
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +22 -17
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.d.ts +31 -15
- package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcTest.js +31 -15
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +29 -14
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/index.d.ts +0 -272
- package/dist/unstable/rpc/index.d.ts.map +1 -1
- package/dist/unstable/rpc/index.js +0 -272
- package/dist/unstable/rpc/index.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +32 -33
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +25 -26
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -1
- package/dist/unstable/schema/VariantSchema.js +1 -1
- package/dist/unstable/schema/index.d.ts +0 -37
- package/dist/unstable/schema/index.d.ts.map +1 -1
- package/dist/unstable/schema/index.js +0 -37
- package/dist/unstable/schema/index.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +8 -2
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +8 -2
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +2 -2
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/socket/index.d.ts +0 -44
- package/dist/unstable/socket/index.d.ts.map +1 -1
- package/dist/unstable/socket/index.js +0 -44
- package/dist/unstable/socket/index.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +39 -18
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +7 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -2
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/SqlError.d.ts +2 -2
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +33 -17
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +3 -3
- package/dist/unstable/sql/SqlResolver.js +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +51 -21
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +51 -21
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +1 -1
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +34 -14
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +0 -178
- package/dist/unstable/sql/index.d.ts.map +1 -1
- package/dist/unstable/sql/index.js +0 -178
- package/dist/unstable/sql/index.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +32 -21
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +32 -21
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +37 -24
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +35 -22
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +1 -1
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.js +32 -16
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +31 -20
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +31 -20
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.d.ts +0 -80
- package/dist/unstable/workers/index.d.ts.map +1 -1
- package/dist/unstable/workers/index.js +0 -80
- package/dist/unstable/workers/index.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +2 -2
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +25 -13
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +12 -12
- package/dist/unstable/workflow/DurableDeferred.js +7 -7
- package/dist/unstable/workflow/DurableQueue.d.ts +36 -18
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +36 -18
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +22 -23
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +17 -18
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +26 -8
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +25 -7
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/index.d.ts +0 -160
- package/dist/unstable/workflow/index.d.ts.map +1 -1
- package/dist/unstable/workflow/index.js +0 -160
- package/dist/unstable/workflow/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +1557 -312
- package/src/BigDecimal.ts +646 -52
- package/src/BigInt.ts +474 -18
- package/src/Boolean.ts +239 -19
- package/src/Brand.ts +102 -11
- package/src/Cache.ts +96 -24
- package/src/Cause.ts +488 -200
- package/src/Channel.ts +647 -191
- package/src/ChannelSchema.ts +99 -6
- package/src/Chunk.ts +187 -54
- package/src/Clock.ts +60 -3
- package/src/Combiner.ts +21 -21
- package/src/Config.ts +135 -50
- package/src/ConfigProvider.ts +52 -29
- package/src/Console.ts +32 -7
- package/src/Context.ts +516 -50
- package/src/Cron.ts +116 -6
- package/src/Crypto.ts +30 -1
- package/src/Data.ts +92 -47
- package/src/DateTime.ts +313 -128
- package/src/Deferred.ts +345 -79
- package/src/Differ.ts +5 -0
- package/src/Duration.ts +203 -50
- package/src/Effect.ts +2044 -816
- package/src/Effectable.ts +16 -2
- package/src/Encoding.ts +146 -9
- package/src/Equal.ts +10 -11
- package/src/Equivalence.ts +49 -46
- package/src/ErrorReporter.ts +135 -16
- package/src/ExecutionPlan.ts +96 -26
- package/src/Exit.ts +149 -101
- package/src/Fiber.ts +321 -72
- package/src/FiberHandle.ts +6 -6
- package/src/FiberMap.ts +20 -20
- package/src/FiberSet.ts +21 -13
- package/src/FileSystem.ts +119 -39
- package/src/Filter.ts +221 -2
- package/src/Formatter.ts +4 -6
- package/src/Function.ts +164 -18
- package/src/Graph.ts +297 -25
- package/src/HKT.ts +59 -26
- package/src/Hash.ts +143 -23
- package/src/HashMap.ts +35 -37
- package/src/HashRing.ts +210 -9
- package/src/HashSet.ts +16 -16
- package/src/Inspectable.ts +86 -17
- package/src/Iterable.ts +261 -81
- package/src/JsonPatch.ts +79 -56
- package/src/JsonPointer.ts +5 -5
- package/src/JsonSchema.ts +77 -33
- package/src/Latch.ts +164 -13
- package/src/Layer.ts +297 -101
- package/src/LayerMap.ts +9 -2
- package/src/LogLevel.ts +96 -21
- package/src/Logger.ts +31 -15
- package/src/ManagedRuntime.ts +82 -10
- package/src/Match.ts +250 -59
- package/src/Metric.ts +68 -41
- package/src/MutableHashMap.ts +381 -52
- package/src/MutableHashSet.ts +145 -41
- package/src/MutableList.ts +24 -6
- package/src/MutableRef.ts +141 -4
- package/src/Newtype.ts +20 -11
- package/src/NonEmptyIterable.ts +22 -6
- package/src/Number.ts +434 -17
- package/src/Optic.ts +26 -33
- package/src/Option.ts +186 -150
- package/src/Order.ts +163 -161
- package/src/Ordering.ts +37 -5
- package/src/PartitionedSemaphore.ts +238 -15
- package/src/Path.ts +34 -6
- package/src/Pipeable.ts +29 -4
- package/src/PlatformError.ts +53 -4
- package/src/Pool.ts +174 -32
- package/src/Predicate.ts +151 -196
- package/src/PrimaryKey.ts +75 -9
- package/src/PubSub.ts +241 -66
- package/src/Pull.ts +148 -3
- package/src/Queue.ts +167 -59
- package/src/Random.ts +71 -16
- package/src/RcMap.ts +171 -9
- package/src/RcRef.ts +73 -18
- package/src/Record.ts +174 -53
- package/src/Redactable.ts +27 -23
- package/src/Redacted.ts +82 -4
- package/src/Reducer.ts +17 -7
- package/src/Ref.ts +332 -54
- package/src/References.ts +226 -30
- package/src/RegExp.ts +49 -3
- package/src/Request.ts +218 -35
- package/src/RequestResolver.ts +268 -36
- package/src/Resource.ts +62 -3
- package/src/Result.ts +380 -57
- package/src/Runtime.ts +172 -32
- package/src/Schedule.ts +510 -145
- package/src/Scheduler.ts +53 -4
- package/src/Schema.ts +975 -264
- package/src/SchemaAST.ts +239 -28
- package/src/SchemaGetter.ts +127 -129
- package/src/SchemaIssue.ts +45 -56
- package/src/SchemaParser.ts +295 -33
- package/src/SchemaRepresentation.ts +106 -77
- package/src/SchemaTransformation.ts +92 -56
- package/src/SchemaUtils.ts +38 -11
- package/src/Scope.ts +127 -25
- package/src/ScopedCache.ts +418 -21
- package/src/ScopedRef.ts +69 -7
- package/src/Semaphore.ts +348 -29
- package/src/Sink.ts +343 -45
- package/src/Stdio.ts +72 -17
- package/src/Stream.ts +880 -242
- package/src/String.ts +221 -49
- package/src/Struct.ts +54 -110
- package/src/SubscriptionRef.ts +341 -105
- package/src/Symbol.ts +25 -7
- package/src/SynchronizedRef.ts +529 -29
- package/src/Take.ts +36 -13
- package/src/Terminal.ts +76 -20
- package/src/Tracer.ts +74 -7
- package/src/Trie.ts +67 -30
- package/src/Tuple.ts +96 -108
- package/src/TxChunk.ts +42 -9
- package/src/TxDeferred.ts +85 -2
- package/src/TxHashMap.ts +22 -22
- package/src/TxHashSet.ts +22 -22
- package/src/TxPriorityQueue.ts +43 -8
- package/src/TxPubSub.ts +98 -8
- package/src/TxQueue.ts +58 -17
- package/src/TxReentrantLock.ts +88 -16
- package/src/TxRef.ts +113 -8
- package/src/TxSemaphore.ts +173 -14
- package/src/TxSubscriptionRef.ts +206 -3
- package/src/Types.ts +68 -13
- package/src/UndefinedOr.ts +171 -30
- package/src/Unify.ts +130 -22
- package/src/Utils.ts +21 -16
- package/src/index.ts +0 -5205
- package/src/internal/effect.ts +59 -29
- package/src/internal/request.ts +3 -1
- package/src/internal/schema/arbitrary.ts +14 -1
- package/src/internal/schema/representation.ts +37 -14
- package/src/testing/TestConsole.ts +105 -9
- package/src/testing/TestSchema.ts +81 -31
- package/src/testing/index.ts +0 -107
- package/src/unstable/ai/AiError.ts +33 -5
- package/src/unstable/ai/AnthropicStructuredOutput.ts +43 -11
- package/src/unstable/ai/Chat.ts +82 -33
- package/src/unstable/ai/EmbeddingModel.ts +104 -8
- package/src/unstable/ai/IdGenerator.ts +8 -3
- package/src/unstable/ai/LanguageModel.ts +51 -7
- package/src/unstable/ai/McpSchema.ts +299 -169
- package/src/unstable/ai/McpServer.ts +108 -14
- package/src/unstable/ai/Model.ts +35 -13
- package/src/unstable/ai/OpenAiStructuredOutput.ts +48 -1
- package/src/unstable/ai/Prompt.ts +24 -3
- package/src/unstable/ai/Response.ts +71 -13
- package/src/unstable/ai/ResponseIdTracker.ts +34 -12
- package/src/unstable/ai/Telemetry.ts +40 -27
- package/src/unstable/ai/Tokenizer.ts +41 -25
- package/src/unstable/ai/Tool.ts +85 -24
- package/src/unstable/ai/Toolkit.ts +32 -4
- package/src/unstable/ai/index.ts +0 -560
- package/src/unstable/cli/Argument.ts +1 -1
- package/src/unstable/cli/CliError.ts +3 -3
- package/src/unstable/cli/CliOutput.ts +1 -1
- package/src/unstable/cli/Command.ts +136 -8
- package/src/unstable/cli/Completions.ts +41 -1
- package/src/unstable/cli/Flag.ts +24 -12
- package/src/unstable/cli/GlobalFlag.ts +39 -8
- package/src/unstable/cli/Param.ts +137 -11
- package/src/unstable/cli/Primitive.ts +59 -10
- package/src/unstable/cli/Prompt.ts +63 -14
- package/src/unstable/cli/index.ts +0 -220
- package/src/unstable/cli/internal/parser.ts +1 -1
- package/src/unstable/cluster/ClusterCron.ts +1 -1
- package/src/unstable/cluster/ClusterError.ts +61 -22
- package/src/unstable/cluster/ClusterMetrics.ts +58 -5
- package/src/unstable/cluster/ClusterSchema.ts +87 -26
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +63 -11
- package/src/unstable/cluster/DeliverAt.ts +6 -1
- package/src/unstable/cluster/Entity.ts +33 -6
- package/src/unstable/cluster/EntityAddress.ts +19 -0
- package/src/unstable/cluster/EntityId.ts +44 -7
- package/src/unstable/cluster/EntityResource.ts +5 -6
- package/src/unstable/cluster/EntityType.ts +19 -0
- package/src/unstable/cluster/Envelope.ts +11 -11
- package/src/unstable/cluster/HttpRunner.ts +42 -22
- package/src/unstable/cluster/K8sHttpClient.ts +32 -13
- package/src/unstable/cluster/MachineId.ts +35 -9
- package/src/unstable/cluster/Message.ts +11 -11
- package/src/unstable/cluster/MessageStorage.ts +38 -24
- package/src/unstable/cluster/Reply.ts +18 -8
- package/src/unstable/cluster/Runner.ts +47 -14
- package/src/unstable/cluster/RunnerAddress.ts +52 -10
- package/src/unstable/cluster/RunnerHealth.ts +33 -16
- package/src/unstable/cluster/RunnerServer.ts +19 -4
- package/src/unstable/cluster/Runners.ts +25 -1
- package/src/unstable/cluster/ShardId.ts +24 -2
- package/src/unstable/cluster/Sharding.ts +63 -20
- package/src/unstable/cluster/ShardingConfig.ts +60 -16
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +27 -14
- package/src/unstable/cluster/SingleRunner.ts +26 -1
- package/src/unstable/cluster/Singleton.ts +51 -9
- package/src/unstable/cluster/SingletonAddress.ts +27 -13
- package/src/unstable/cluster/Snowflake.ts +19 -5
- package/src/unstable/cluster/SocketRunner.ts +27 -1
- package/src/unstable/cluster/SqlMessageStorage.ts +73 -13
- package/src/unstable/cluster/SqlRunnerStorage.ts +20 -0
- package/src/unstable/cluster/TestRunner.ts +25 -14
- package/src/unstable/cluster/index.ts +0 -790
- package/src/unstable/devtools/DevTools.ts +41 -11
- package/src/unstable/devtools/DevToolsClient.ts +68 -11
- package/src/unstable/devtools/DevToolsSchema.ts +24 -16
- package/src/unstable/devtools/DevToolsServer.ts +18 -11
- package/src/unstable/devtools/index.ts +0 -58
- package/src/unstable/encoding/Msgpack.ts +30 -14
- package/src/unstable/encoding/Ndjson.ts +28 -14
- package/src/unstable/encoding/Sse.ts +38 -17
- package/src/unstable/encoding/index.ts +0 -49
- package/src/unstable/eventlog/Event.ts +30 -15
- package/src/unstable/eventlog/EventGroup.ts +23 -15
- package/src/unstable/eventlog/EventJournal.ts +38 -21
- package/src/unstable/eventlog/EventLog.ts +63 -25
- package/src/unstable/eventlog/EventLogEncryption.ts +8 -3
- package/src/unstable/eventlog/EventLogMessage.ts +49 -40
- package/src/unstable/eventlog/EventLogRemote.ts +14 -4
- package/src/unstable/eventlog/EventLogServer.ts +36 -17
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +24 -2
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +119 -22
- package/src/unstable/eventlog/EventLogSessionAuth.ts +68 -24
- package/src/unstable/eventlog/SqlEventJournal.ts +50 -14
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +39 -15
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +30 -11
- package/src/unstable/eventlog/index.ts +0 -240
- package/src/unstable/http/Cookies.ts +97 -50
- package/src/unstable/http/Etag.ts +43 -13
- package/src/unstable/http/FetchHttpClient.ts +59 -17
- package/src/unstable/http/Headers.ts +62 -24
- package/src/unstable/http/HttpBody.ts +59 -15
- package/src/unstable/http/HttpClient.ts +119 -33
- package/src/unstable/http/HttpClientError.ts +41 -24
- package/src/unstable/http/HttpClientRequest.ts +37 -16
- package/src/unstable/http/HttpClientResponse.ts +33 -14
- package/src/unstable/http/HttpEffect.ts +35 -18
- package/src/unstable/http/HttpMethod.ts +46 -20
- package/src/unstable/http/HttpRouter.ts +58 -30
- package/src/unstable/http/HttpServer.ts +34 -21
- package/src/unstable/http/HttpServerError.ts +41 -28
- package/src/unstable/http/HttpServerRequest.ts +51 -19
- package/src/unstable/http/HttpServerRespondable.ts +28 -14
- package/src/unstable/http/HttpServerResponse.ts +66 -44
- package/src/unstable/http/HttpStaticServer.ts +29 -12
- package/src/unstable/http/HttpTraceContext.ts +32 -19
- package/src/unstable/http/Multipart.ts +39 -19
- package/src/unstable/http/Template.ts +25 -12
- package/src/unstable/http/Url.ts +41 -28
- package/src/unstable/http/UrlParams.ts +43 -28
- package/src/unstable/http/index.ts +0 -452
- package/src/unstable/httpapi/HttpApi.ts +48 -24
- package/src/unstable/httpapi/HttpApiBuilder.ts +40 -26
- package/src/unstable/httpapi/HttpApiClient.ts +28 -16
- package/src/unstable/httpapi/HttpApiEndpoint.ts +51 -23
- package/src/unstable/httpapi/HttpApiError.ts +38 -18
- package/src/unstable/httpapi/HttpApiGroup.ts +34 -23
- package/src/unstable/httpapi/HttpApiMiddleware.ts +49 -25
- package/src/unstable/httpapi/HttpApiScalar.ts +32 -17
- package/src/unstable/httpapi/HttpApiSchema.ts +43 -43
- package/src/unstable/httpapi/HttpApiSecurity.ts +54 -24
- package/src/unstable/httpapi/HttpApiSwagger.ts +28 -16
- package/src/unstable/httpapi/HttpApiTest.ts +1 -1
- package/src/unstable/httpapi/OpenApi.ts +43 -25
- package/src/unstable/httpapi/index.ts +0 -311
- package/src/unstable/observability/Otlp.ts +31 -16
- package/src/unstable/observability/OtlpLogger.ts +31 -15
- package/src/unstable/observability/OtlpResource.ts +33 -15
- package/src/unstable/observability/OtlpSerialization.ts +25 -14
- package/src/unstable/observability/PrometheusMetrics.ts +3 -3
- package/src/unstable/observability/index.ts +0 -183
- package/src/unstable/persistence/KeyValueStore.ts +12 -4
- package/src/unstable/persistence/Persistable.ts +8 -3
- package/src/unstable/persistence/PersistedCache.ts +27 -14
- package/src/unstable/persistence/PersistedQueue.ts +10 -5
- package/src/unstable/persistence/RateLimiter.ts +20 -10
- package/src/unstable/persistence/Redis.ts +33 -15
- package/src/unstable/persistence/index.ts +0 -147
- package/src/unstable/process/ChildProcess.ts +14 -14
- package/src/unstable/process/ChildProcessSpawner.ts +17 -5
- package/src/unstable/process/index.ts +0 -45
- package/src/unstable/reactivity/AsyncResult.ts +96 -24
- package/src/unstable/reactivity/Atom.ts +89 -35
- package/src/unstable/reactivity/AtomRef.ts +58 -25
- package/src/unstable/reactivity/AtomRegistry.ts +79 -18
- package/src/unstable/reactivity/Hydration.ts +37 -17
- package/src/unstable/reactivity/Reactivity.ts +42 -19
- package/src/unstable/reactivity/index.ts +0 -166
- package/src/unstable/rpc/Rpc.ts +47 -32
- package/src/unstable/rpc/RpcClient.ts +58 -34
- package/src/unstable/rpc/RpcClientError.ts +29 -15
- package/src/unstable/rpc/RpcGroup.ts +28 -17
- package/src/unstable/rpc/RpcMessage.ts +37 -19
- package/src/unstable/rpc/RpcMiddleware.ts +31 -21
- package/src/unstable/rpc/RpcSchema.ts +30 -20
- package/src/unstable/rpc/RpcSerialization.ts +48 -31
- package/src/unstable/rpc/RpcServer.ts +53 -40
- package/src/unstable/rpc/RpcTest.ts +29 -13
- package/src/unstable/rpc/RpcWorker.ts +29 -14
- package/src/unstable/rpc/index.ts +0 -272
- package/src/unstable/schema/Model.ts +32 -33
- package/src/unstable/schema/VariantSchema.ts +1 -1
- package/src/unstable/schema/index.ts +0 -37
- package/src/unstable/socket/Socket.ts +8 -2
- package/src/unstable/socket/SocketServer.ts +2 -2
- package/src/unstable/socket/index.ts +0 -44
- package/src/unstable/sql/Migrator.ts +39 -18
- package/src/unstable/sql/SqlClient.ts +7 -2
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/SqlError.ts +33 -17
- package/src/unstable/sql/SqlResolver.ts +3 -3
- package/src/unstable/sql/SqlSchema.ts +51 -21
- package/src/unstable/sql/Statement.ts +35 -15
- package/src/unstable/sql/index.ts +0 -178
- package/src/unstable/workers/Transferable.ts +32 -21
- package/src/unstable/workers/Worker.ts +35 -22
- package/src/unstable/workers/WorkerError.ts +35 -19
- package/src/unstable/workers/WorkerRunner.ts +29 -18
- package/src/unstable/workers/index.ts +0 -80
- package/src/unstable/workflow/DurableClock.ts +25 -13
- package/src/unstable/workflow/DurableDeferred.ts +12 -12
- package/src/unstable/workflow/DurableQueue.ts +34 -16
- package/src/unstable/workflow/Workflow.ts +22 -23
- package/src/unstable/workflow/WorkflowEngine.ts +26 -8
- package/src/unstable/workflow/index.ts +0 -160
package/src/Stream.ts
CHANGED
|
@@ -1,40 +1,83 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `Stream` module
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* backpressure and
|
|
2
|
+
* The `Stream` module describes effectful sequences that may emit many values
|
|
3
|
+
* over time. A `Stream<A, E, R>` can produce zero or more `A` values, fail with
|
|
4
|
+
* an `E`, and require services from `R`; the Effect runtime handles
|
|
5
|
+
* backpressure, interruption, scopes, and finalizers while the stream is being
|
|
6
|
+
* consumed.
|
|
7
|
+
*
|
|
8
|
+
* Streams are useful for files, sockets, queues, subscriptions, paginated APIs,
|
|
9
|
+
* background jobs, and any workflow where values should be processed
|
|
10
|
+
* incrementally instead of loaded into memory all at once.
|
|
6
11
|
*
|
|
7
12
|
* **Mental model**
|
|
8
13
|
*
|
|
9
|
-
* - A stream is a lazy description; it
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* -
|
|
13
|
-
*
|
|
14
|
-
* -
|
|
14
|
+
* - A stream is a lazy description; it does not run until consumed with
|
|
15
|
+
* {@link run}, {@link runCollect}, {@link runForEach}, or another `run*`
|
|
16
|
+
* function.
|
|
17
|
+
* - Pulling drives evaluation. Operators request values from upstream, and the
|
|
18
|
+
* runtime propagates demand instead of pushing unbounded data downstream.
|
|
19
|
+
* - Values are batched internally as chunks for throughput, while user-facing
|
|
20
|
+
* combinators still work with individual elements unless they mention chunks.
|
|
21
|
+
* - `A` is the element type, `E` is the failure type, and `R` is the required
|
|
22
|
+
* service context.
|
|
23
|
+
* - Composition mirrors `Effect`: use `pipe`, {@link map}, {@link flatMap},
|
|
24
|
+
* error handling, resource operators, and service provisioning.
|
|
15
25
|
*
|
|
16
26
|
* **Common tasks**
|
|
17
27
|
*
|
|
18
|
-
* - Create streams
|
|
19
|
-
*
|
|
20
|
-
* -
|
|
21
|
-
*
|
|
22
|
-
* -
|
|
23
|
-
*
|
|
24
|
-
* -
|
|
28
|
+
* - Create streams from values, effects, and collections with {@link make},
|
|
29
|
+
* {@link fromEffect}, {@link fromIterable}, and {@link fromQueue}.
|
|
30
|
+
* - Transform or select values with {@link map}, {@link mapEffect},
|
|
31
|
+
* {@link flatMap}, {@link filter}, and {@link filterMap}.
|
|
32
|
+
* - Combine streams with {@link concat}, {@link merge}, {@link zip},
|
|
33
|
+
* {@link race}, and {@link interleave}.
|
|
34
|
+
* - Control size and timing with {@link take}, {@link drop}, {@link debounce},
|
|
35
|
+
* {@link throttle}, {@link grouped}, and {@link groupedWithin}.
|
|
36
|
+
* - Handle failures with {@link catchCause}, {@link catchIf},
|
|
37
|
+
* {@link mapError}, {@link retry}, and {@link withExecutionPlan}.
|
|
38
|
+
* - Connect to other protocols with {@link fromReadableStream},
|
|
39
|
+
* {@link toReadableStream}, {@link fromAsyncIterable}, {@link toQueue}, and
|
|
40
|
+
* {@link runIntoQueue}.
|
|
41
|
+
* - Consume streams with {@link runCollect}, {@link runForEach},
|
|
42
|
+
* {@link runFold}, {@link runDrain}, or a {@link Sink.Sink}.
|
|
43
|
+
*
|
|
44
|
+
* **Quickstart**
|
|
45
|
+
*
|
|
46
|
+
* **Example** (Transforming and collecting values)
|
|
47
|
+
*
|
|
48
|
+
* ```ts
|
|
49
|
+
* import { Effect, Stream } from "effect"
|
|
50
|
+
*
|
|
51
|
+
* const program = Stream.make(1, 2, 3).pipe(
|
|
52
|
+
* Stream.map((n) => n * 2),
|
|
53
|
+
* Stream.runCollect
|
|
54
|
+
* )
|
|
55
|
+
*
|
|
56
|
+
* Effect.runPromise(program).then(console.log)
|
|
57
|
+
* // [2, 4, 6]
|
|
58
|
+
* ```
|
|
25
59
|
*
|
|
26
60
|
* **Gotchas**
|
|
27
61
|
*
|
|
28
|
-
* - A stream is not a collection
|
|
29
|
-
*
|
|
30
|
-
* -
|
|
31
|
-
*
|
|
62
|
+
* - A stream is not a collection. Constructors and operators build a
|
|
63
|
+
* description; effects run each time the stream is consumed.
|
|
64
|
+
* - {@link runCollect} stores every emitted value in memory. Prefer
|
|
65
|
+
* {@link runForEach}, {@link runFold}, or a streaming sink for large or
|
|
66
|
+
* infinite streams.
|
|
67
|
+
* - Operators such as {@link merge}, {@link race}, {@link broadcast}, and
|
|
68
|
+
* {@link share} introduce concurrency, so interruption and finalizer timing
|
|
69
|
+
* can matter.
|
|
70
|
+
* - Reusing the same stream value does not share execution by itself. Use
|
|
71
|
+
* {@link share}, {@link broadcast}, queues, or external state when multiple
|
|
72
|
+
* consumers must observe one running producer.
|
|
32
73
|
*
|
|
33
74
|
* **See also**
|
|
34
75
|
*
|
|
35
|
-
* - {@link Effect.Effect} for single-result effectful programs
|
|
36
|
-
* - {@link Sink.Sink} for
|
|
37
|
-
* - {@link Channel.Channel} for the lower-level primitive
|
|
76
|
+
* - {@link Effect.Effect} for single-result effectful programs.
|
|
77
|
+
* - {@link Sink.Sink} for reusable stream consumers.
|
|
78
|
+
* - {@link Channel.Channel} for the lower-level primitive behind streams.
|
|
79
|
+
* - {@link Queue.Queue} and {@link PubSub.PubSub} for coordinating producers
|
|
80
|
+
* and consumers.
|
|
38
81
|
*
|
|
39
82
|
* @since 2.0.0
|
|
40
83
|
*/
|
|
@@ -98,7 +141,7 @@ import type * as Unify from "./Unify.ts"
|
|
|
98
141
|
/**
|
|
99
142
|
* String literal type used as the unique brand for `Stream` values.
|
|
100
143
|
*
|
|
101
|
-
* @category
|
|
144
|
+
* @category type IDs
|
|
102
145
|
* @since 4.0.0
|
|
103
146
|
*/
|
|
104
147
|
export type TypeId = "~effect/Stream"
|
|
@@ -107,7 +150,14 @@ export type TypeId = "~effect/Stream"
|
|
|
107
150
|
* Runtime identifier stored on `Stream` values and used by `isStream` to
|
|
108
151
|
* recognize them.
|
|
109
152
|
*
|
|
110
|
-
*
|
|
153
|
+
* **Details**
|
|
154
|
+
*
|
|
155
|
+
* This marker is part of the runtime representation of `Stream` values. Prefer
|
|
156
|
+
* `isStream` when narrowing unknown values.
|
|
157
|
+
*
|
|
158
|
+
* @see {@link isStream} for the public guard that checks this identifier
|
|
159
|
+
*
|
|
160
|
+
* @category type IDs
|
|
111
161
|
* @since 4.0.0
|
|
112
162
|
*/
|
|
113
163
|
export const TypeId: TypeId = "~effect/Stream"
|
|
@@ -362,8 +412,7 @@ export const fromChannel: <Arr extends Arr.NonEmptyReadonlyArray<any>, E, R>(
|
|
|
362
412
|
) => Stream<Arr extends Arr.NonEmptyReadonlyArray<infer A> ? A : never, E, R> = internal.fromChannel
|
|
363
413
|
|
|
364
414
|
/**
|
|
365
|
-
*
|
|
366
|
-
* with the failure value of this effect.
|
|
415
|
+
* Creates a stream from an effect.
|
|
367
416
|
*
|
|
368
417
|
* **Example** (Creating a stream from an effect)
|
|
369
418
|
*
|
|
@@ -424,6 +473,11 @@ export const service = <I, S>(service: Context.Key<I, S>): Stream<S, never, I> =
|
|
|
424
473
|
* Optionally accesses a service from the context and emits the result as a
|
|
425
474
|
* single element.
|
|
426
475
|
*
|
|
476
|
+
* **When to use**
|
|
477
|
+
*
|
|
478
|
+
* Use to emit an optional dependency as a stream element without requiring that
|
|
479
|
+
* dependency to be present.
|
|
480
|
+
*
|
|
427
481
|
* **Example** (Accessing an optional service as a stream)
|
|
428
482
|
*
|
|
429
483
|
* ```ts
|
|
@@ -633,7 +687,7 @@ export const fromPull = <A, E, R, EX, RX>(
|
|
|
633
687
|
): Stream<A, Pull.ExcludeDone<E> | EX, R | RX> => fromChannel(Channel.fromPull(pull))
|
|
634
688
|
|
|
635
689
|
/**
|
|
636
|
-
*
|
|
690
|
+
* Derives a stream by transforming its pull effect.
|
|
637
691
|
*
|
|
638
692
|
* **Example** (Transforming a pull effect)
|
|
639
693
|
*
|
|
@@ -756,7 +810,7 @@ export const toChannel = <A, E, R>(
|
|
|
756
810
|
*
|
|
757
811
|
* **When to use**
|
|
758
812
|
*
|
|
759
|
-
*
|
|
813
|
+
* Use when you can use the `Queue` with the apis from the `Queue` module to emit
|
|
760
814
|
* values to the stream or to signal the stream ending.
|
|
761
815
|
*
|
|
762
816
|
* By default it uses an "unbounded" buffer size.
|
|
@@ -1505,7 +1559,7 @@ export const fromSchedule = <O, E, R>(schedule: Schedule.Schedule<O, unknown, E,
|
|
|
1505
1559
|
*
|
|
1506
1560
|
* **When to use**
|
|
1507
1561
|
*
|
|
1508
|
-
* Use
|
|
1562
|
+
* Use to create the subscription and `Stream.take` or
|
|
1509
1563
|
* cancellation to control how many values are consumed.
|
|
1510
1564
|
*
|
|
1511
1565
|
* **Example** (Creating a stream from a PubSub subscription)
|
|
@@ -1655,9 +1709,17 @@ export const unfold = <S, A, E, R>(
|
|
|
1655
1709
|
}))
|
|
1656
1710
|
|
|
1657
1711
|
/**
|
|
1658
|
-
*
|
|
1659
|
-
*
|
|
1660
|
-
*
|
|
1712
|
+
* Creates a stream by repeatedly evaluating an effectful page function.
|
|
1713
|
+
*
|
|
1714
|
+
* **When to use**
|
|
1715
|
+
*
|
|
1716
|
+
* Use to consume paginated APIs where each step returns a batch of values
|
|
1717
|
+
* together with an optional next state.
|
|
1718
|
+
*
|
|
1719
|
+
* **Details**
|
|
1720
|
+
*
|
|
1721
|
+
* This is similar to {@link unfold}, but each step can emit zero or more values
|
|
1722
|
+
* and independently decide whether another state should be requested.
|
|
1661
1723
|
*
|
|
1662
1724
|
* **Example** (Paginating stream state)
|
|
1663
1725
|
*
|
|
@@ -2321,7 +2383,7 @@ export const flattenEffect: <
|
|
|
2321
2383
|
)
|
|
2322
2384
|
|
|
2323
2385
|
/**
|
|
2324
|
-
*
|
|
2386
|
+
* Maps over non-empty array chunks emitted by the stream effectfully.
|
|
2325
2387
|
*
|
|
2326
2388
|
* **Example** (Effectfully mapping stream chunks)
|
|
2327
2389
|
*
|
|
@@ -2348,7 +2410,7 @@ export const flattenEffect: <
|
|
|
2348
2410
|
*/
|
|
2349
2411
|
export const mapArrayEffect: {
|
|
2350
2412
|
/**
|
|
2351
|
-
*
|
|
2413
|
+
* Maps over non-empty array chunks emitted by the stream effectfully.
|
|
2352
2414
|
*
|
|
2353
2415
|
* **Example** (Effectfully mapping stream chunks)
|
|
2354
2416
|
*
|
|
@@ -2377,7 +2439,7 @@ export const mapArrayEffect: {
|
|
|
2377
2439
|
f: (a: Arr.NonEmptyReadonlyArray<A>, i: number) => Effect.Effect<Arr.NonEmptyReadonlyArray<B>, E2, R2>
|
|
2378
2440
|
): <E, R>(self: Stream<A, E, R>) => Stream<B, E | E2, R | R2>
|
|
2379
2441
|
/**
|
|
2380
|
-
*
|
|
2442
|
+
* Maps over non-empty array chunks emitted by the stream effectfully.
|
|
2381
2443
|
*
|
|
2382
2444
|
* **Example** (Effectfully mapping stream chunks)
|
|
2383
2445
|
*
|
|
@@ -2701,8 +2763,7 @@ export const tapBoth: {
|
|
|
2701
2763
|
))
|
|
2702
2764
|
|
|
2703
2765
|
/**
|
|
2704
|
-
*
|
|
2705
|
-
* to emitting them.
|
|
2766
|
+
* Runs a sink for all stream elements while still emitting them downstream.
|
|
2706
2767
|
*
|
|
2707
2768
|
* **Example** (Tapping values with a sink)
|
|
2708
2769
|
*
|
|
@@ -2733,8 +2794,7 @@ export const tapBoth: {
|
|
|
2733
2794
|
*/
|
|
2734
2795
|
export const tapSink: {
|
|
2735
2796
|
/**
|
|
2736
|
-
*
|
|
2737
|
-
* to emitting them.
|
|
2797
|
+
* Runs a sink for all stream elements while still emitting them downstream.
|
|
2738
2798
|
*
|
|
2739
2799
|
* **Example** (Tapping values with a sink)
|
|
2740
2800
|
*
|
|
@@ -2765,8 +2825,7 @@ export const tapSink: {
|
|
|
2765
2825
|
*/
|
|
2766
2826
|
<A, E2, R2>(sink: Sink.Sink<unknown, A, unknown, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
2767
2827
|
/**
|
|
2768
|
-
*
|
|
2769
|
-
* to emitting them.
|
|
2828
|
+
* Runs a sink for all stream elements while still emitting them downstream.
|
|
2770
2829
|
*
|
|
2771
2830
|
* **Example** (Tapping values with a sink)
|
|
2772
2831
|
*
|
|
@@ -3380,7 +3439,7 @@ export const repeat: {
|
|
|
3380
3439
|
): Stream<A, E | E2, R | R2> => fromChannel(Channel.repeat(self.channel, schedule)))
|
|
3381
3440
|
|
|
3382
3441
|
/**
|
|
3383
|
-
*
|
|
3442
|
+
* Schedules the stream's elements according to the provided schedule.
|
|
3384
3443
|
*
|
|
3385
3444
|
* **Example** (Scheduling stream elements)
|
|
3386
3445
|
*
|
|
@@ -3400,12 +3459,12 @@ export const repeat: {
|
|
|
3400
3459
|
* // Output: [ 1, 2, 3 ]
|
|
3401
3460
|
* ```
|
|
3402
3461
|
*
|
|
3403
|
-
* @category
|
|
3462
|
+
* @category rate limiting
|
|
3404
3463
|
* @since 2.0.0
|
|
3405
3464
|
*/
|
|
3406
3465
|
export const schedule: {
|
|
3407
3466
|
/**
|
|
3408
|
-
*
|
|
3467
|
+
* Schedules the stream's elements according to the provided schedule.
|
|
3409
3468
|
*
|
|
3410
3469
|
* **Example** (Scheduling stream elements)
|
|
3411
3470
|
*
|
|
@@ -3425,12 +3484,12 @@ export const schedule: {
|
|
|
3425
3484
|
* // Output: [ 1, 2, 3 ]
|
|
3426
3485
|
* ```
|
|
3427
3486
|
*
|
|
3428
|
-
* @category
|
|
3487
|
+
* @category rate limiting
|
|
3429
3488
|
* @since 2.0.0
|
|
3430
3489
|
*/
|
|
3431
3490
|
<X, E2, R2, A>(schedule: Schedule.Schedule<X, NoInfer<A>, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>
|
|
3432
3491
|
/**
|
|
3433
|
-
*
|
|
3492
|
+
* Schedules the stream's elements according to the provided schedule.
|
|
3434
3493
|
*
|
|
3435
3494
|
* **Example** (Scheduling stream elements)
|
|
3436
3495
|
*
|
|
@@ -3450,7 +3509,7 @@ export const schedule: {
|
|
|
3450
3509
|
* // Output: [ 1, 2, 3 ]
|
|
3451
3510
|
* ```
|
|
3452
3511
|
*
|
|
3453
|
-
* @category
|
|
3512
|
+
* @category rate limiting
|
|
3454
3513
|
* @since 2.0.0
|
|
3455
3514
|
*/
|
|
3456
3515
|
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, schedule: Schedule.Schedule<X, NoInfer<A>, E2, R2>): Stream<A, E | E2, R | R2>
|
|
@@ -3486,7 +3545,7 @@ export const schedule: {
|
|
|
3486
3545
|
* // Output: [ 1 ]
|
|
3487
3546
|
* ```
|
|
3488
3547
|
*
|
|
3489
|
-
* @category
|
|
3548
|
+
* @category rate limiting
|
|
3490
3549
|
* @since 2.0.0
|
|
3491
3550
|
*/
|
|
3492
3551
|
export const timeout: {
|
|
@@ -3511,7 +3570,7 @@ export const timeout: {
|
|
|
3511
3570
|
* // Output: [ 1 ]
|
|
3512
3571
|
* ```
|
|
3513
3572
|
*
|
|
3514
|
-
* @category
|
|
3573
|
+
* @category rate limiting
|
|
3515
3574
|
* @since 2.0.0
|
|
3516
3575
|
*/
|
|
3517
3576
|
(duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
@@ -3536,7 +3595,7 @@ export const timeout: {
|
|
|
3536
3595
|
* // Output: [ 1 ]
|
|
3537
3596
|
* ```
|
|
3538
3597
|
*
|
|
3539
|
-
* @category
|
|
3598
|
+
* @category rate limiting
|
|
3540
3599
|
* @since 2.0.0
|
|
3541
3600
|
*/
|
|
3542
3601
|
<A, E, R>(self: Stream<A, E, R>, duration: Duration.Input): Stream<A, E, R>
|
|
@@ -3553,13 +3612,24 @@ export const timeout: {
|
|
|
3553
3612
|
* Switches to a fallback stream if this stream does not emit a value within
|
|
3554
3613
|
* the specified duration.
|
|
3555
3614
|
*
|
|
3615
|
+
* **When to use**
|
|
3616
|
+
*
|
|
3617
|
+
* Use when a stream should continue with another stream if an upstream pull
|
|
3618
|
+
* waits longer than the allowed duration.
|
|
3619
|
+
*
|
|
3556
3620
|
* **Details**
|
|
3557
3621
|
*
|
|
3558
3622
|
* The timeout is checked for each pull. A zero duration uses `orElse`
|
|
3559
3623
|
* immediately, while an infinite duration leaves the original stream
|
|
3560
3624
|
* unchanged.
|
|
3561
3625
|
*
|
|
3562
|
-
*
|
|
3626
|
+
* **Gotchas**
|
|
3627
|
+
*
|
|
3628
|
+
* The fallback stream is not timed after the switch.
|
|
3629
|
+
*
|
|
3630
|
+
* @see {@link timeout} for ending the stream instead of switching to a fallback stream
|
|
3631
|
+
*
|
|
3632
|
+
* @category rate limiting
|
|
3563
3633
|
* @since 4.0.0
|
|
3564
3634
|
*/
|
|
3565
3635
|
export const timeoutOrElse: {
|
|
@@ -3567,13 +3637,24 @@ export const timeoutOrElse: {
|
|
|
3567
3637
|
* Switches to a fallback stream if this stream does not emit a value within
|
|
3568
3638
|
* the specified duration.
|
|
3569
3639
|
*
|
|
3640
|
+
* **When to use**
|
|
3641
|
+
*
|
|
3642
|
+
* Use when a stream should continue with another stream if an upstream pull
|
|
3643
|
+
* waits longer than the allowed duration.
|
|
3644
|
+
*
|
|
3570
3645
|
* **Details**
|
|
3571
3646
|
*
|
|
3572
3647
|
* The timeout is checked for each pull. A zero duration uses `orElse`
|
|
3573
3648
|
* immediately, while an infinite duration leaves the original stream
|
|
3574
3649
|
* unchanged.
|
|
3575
3650
|
*
|
|
3576
|
-
*
|
|
3651
|
+
* **Gotchas**
|
|
3652
|
+
*
|
|
3653
|
+
* The fallback stream is not timed after the switch.
|
|
3654
|
+
*
|
|
3655
|
+
* @see {@link timeout} for ending the stream instead of switching to a fallback stream
|
|
3656
|
+
*
|
|
3657
|
+
* @category rate limiting
|
|
3577
3658
|
* @since 4.0.0
|
|
3578
3659
|
*/
|
|
3579
3660
|
<B, E2, R2>(
|
|
@@ -3586,13 +3667,24 @@ export const timeoutOrElse: {
|
|
|
3586
3667
|
* Switches to a fallback stream if this stream does not emit a value within
|
|
3587
3668
|
* the specified duration.
|
|
3588
3669
|
*
|
|
3670
|
+
* **When to use**
|
|
3671
|
+
*
|
|
3672
|
+
* Use when a stream should continue with another stream if an upstream pull
|
|
3673
|
+
* waits longer than the allowed duration.
|
|
3674
|
+
*
|
|
3589
3675
|
* **Details**
|
|
3590
3676
|
*
|
|
3591
3677
|
* The timeout is checked for each pull. A zero duration uses `orElse`
|
|
3592
3678
|
* immediately, while an infinite duration leaves the original stream
|
|
3593
3679
|
* unchanged.
|
|
3594
3680
|
*
|
|
3595
|
-
*
|
|
3681
|
+
* **Gotchas**
|
|
3682
|
+
*
|
|
3683
|
+
* The fallback stream is not timed after the switch.
|
|
3684
|
+
*
|
|
3685
|
+
* @see {@link timeout} for ending the stream instead of switching to a fallback stream
|
|
3686
|
+
*
|
|
3687
|
+
* @category rate limiting
|
|
3596
3688
|
* @since 4.0.0
|
|
3597
3689
|
*/
|
|
3598
3690
|
<A, E, R, B, E2, R2>(
|
|
@@ -3799,7 +3891,7 @@ export const repeatElements: {
|
|
|
3799
3891
|
export const forever = <A, E, R>(self: Stream<A, E, R>): Stream<A, E, R> => fromChannel(Channel.forever(self.channel))
|
|
3800
3892
|
|
|
3801
3893
|
/**
|
|
3802
|
-
*
|
|
3894
|
+
* Flattens the iterables emitted by this stream into the stream's structure.
|
|
3803
3895
|
*
|
|
3804
3896
|
* **Example** (Flattening iterable values)
|
|
3805
3897
|
*
|
|
@@ -4561,8 +4653,16 @@ export const mergeRight: {
|
|
|
4561
4653
|
/**
|
|
4562
4654
|
* Merges a collection of streams, running up to the specified number concurrently.
|
|
4563
4655
|
*
|
|
4564
|
-
*
|
|
4565
|
-
*
|
|
4656
|
+
* **When to use**
|
|
4657
|
+
*
|
|
4658
|
+
* Use to merge an iterable of already-created streams while bounding how many
|
|
4659
|
+
* inner streams may run at the same time.
|
|
4660
|
+
*
|
|
4661
|
+
* **Details**
|
|
4662
|
+
*
|
|
4663
|
+
* The `concurrency` option is required and may be a number or `"unbounded"`.
|
|
4664
|
+
* `bufferSize` controls buffering between inner streams, and outputs are
|
|
4665
|
+
* emitted as they arrive under concurrent merging.
|
|
4566
4666
|
*
|
|
4567
4667
|
* **Example** (Merging streams with bounded concurrency)
|
|
4568
4668
|
*
|
|
@@ -4584,13 +4684,27 @@ export const mergeRight: {
|
|
|
4584
4684
|
* Effect.runPromise(program)
|
|
4585
4685
|
* // Output: [ "B", "A" ]
|
|
4586
4686
|
* ```
|
|
4687
|
+
*
|
|
4688
|
+
* @see {@link merge} for merging exactly two streams and choosing a halt strategy
|
|
4689
|
+
* @see {@link flatten} for flattening a stream that already emits streams
|
|
4690
|
+
*
|
|
4691
|
+
* @category Merging
|
|
4692
|
+
* @since 2.0.0
|
|
4587
4693
|
*/
|
|
4588
4694
|
export const mergeAll: {
|
|
4589
4695
|
/**
|
|
4590
4696
|
* Merges a collection of streams, running up to the specified number concurrently.
|
|
4591
4697
|
*
|
|
4592
|
-
*
|
|
4593
|
-
*
|
|
4698
|
+
* **When to use**
|
|
4699
|
+
*
|
|
4700
|
+
* Use to merge an iterable of already-created streams while bounding how many
|
|
4701
|
+
* inner streams may run at the same time.
|
|
4702
|
+
*
|
|
4703
|
+
* **Details**
|
|
4704
|
+
*
|
|
4705
|
+
* The `concurrency` option is required and may be a number or `"unbounded"`.
|
|
4706
|
+
* `bufferSize` controls buffering between inner streams, and outputs are
|
|
4707
|
+
* emitted as they arrive under concurrent merging.
|
|
4594
4708
|
*
|
|
4595
4709
|
* **Example** (Merging streams with bounded concurrency)
|
|
4596
4710
|
*
|
|
@@ -4612,6 +4726,12 @@ export const mergeAll: {
|
|
|
4612
4726
|
* Effect.runPromise(program)
|
|
4613
4727
|
* // Output: [ "B", "A" ]
|
|
4614
4728
|
* ```
|
|
4729
|
+
*
|
|
4730
|
+
* @see {@link merge} for merging exactly two streams and choosing a halt strategy
|
|
4731
|
+
* @see {@link flatten} for flattening a stream that already emits streams
|
|
4732
|
+
*
|
|
4733
|
+
* @category Merging
|
|
4734
|
+
* @since 2.0.0
|
|
4615
4735
|
*/
|
|
4616
4736
|
(
|
|
4617
4737
|
options: {
|
|
@@ -4622,8 +4742,16 @@ export const mergeAll: {
|
|
|
4622
4742
|
/**
|
|
4623
4743
|
* Merges a collection of streams, running up to the specified number concurrently.
|
|
4624
4744
|
*
|
|
4625
|
-
*
|
|
4626
|
-
*
|
|
4745
|
+
* **When to use**
|
|
4746
|
+
*
|
|
4747
|
+
* Use to merge an iterable of already-created streams while bounding how many
|
|
4748
|
+
* inner streams may run at the same time.
|
|
4749
|
+
*
|
|
4750
|
+
* **Details**
|
|
4751
|
+
*
|
|
4752
|
+
* The `concurrency` option is required and may be a number or `"unbounded"`.
|
|
4753
|
+
* `bufferSize` controls buffering between inner streams, and outputs are
|
|
4754
|
+
* emitted as they arrive under concurrent merging.
|
|
4627
4755
|
*
|
|
4628
4756
|
* **Example** (Merging streams with bounded concurrency)
|
|
4629
4757
|
*
|
|
@@ -4645,6 +4773,12 @@ export const mergeAll: {
|
|
|
4645
4773
|
* Effect.runPromise(program)
|
|
4646
4774
|
* // Output: [ "B", "A" ]
|
|
4647
4775
|
* ```
|
|
4776
|
+
*
|
|
4777
|
+
* @see {@link merge} for merging exactly two streams and choosing a halt strategy
|
|
4778
|
+
* @see {@link flatten} for flattening a stream that already emits streams
|
|
4779
|
+
*
|
|
4780
|
+
* @category Merging
|
|
4781
|
+
* @since 2.0.0
|
|
4648
4782
|
*/
|
|
4649
4783
|
<A, E, R>(
|
|
4650
4784
|
streams: Iterable<Stream<A, E, R>>,
|
|
@@ -6261,6 +6395,19 @@ export const filter: {
|
|
|
6261
6395
|
/**
|
|
6262
6396
|
* Filters and maps stream elements in one pass using a `Filter`.
|
|
6263
6397
|
*
|
|
6398
|
+
* **When to use**
|
|
6399
|
+
*
|
|
6400
|
+
* Use to keep only stream elements accepted by a `Filter` and emit each filter
|
|
6401
|
+
* success value.
|
|
6402
|
+
*
|
|
6403
|
+
* **Details**
|
|
6404
|
+
*
|
|
6405
|
+
* `Result.succeed` values are emitted and `Result.fail` values are skipped.
|
|
6406
|
+
*
|
|
6407
|
+
* @see {@link filter} for keeping original elements with a boolean predicate or refinement
|
|
6408
|
+
* @see {@link filterMapEffect} for an effectful `Filter`
|
|
6409
|
+
* @see {@link partition} for consuming both filter success and failure values
|
|
6410
|
+
*
|
|
6264
6411
|
* @category filtering
|
|
6265
6412
|
* @since 2.0.0
|
|
6266
6413
|
*/
|
|
@@ -6268,6 +6415,19 @@ export const filterMap: {
|
|
|
6268
6415
|
/**
|
|
6269
6416
|
* Filters and maps stream elements in one pass using a `Filter`.
|
|
6270
6417
|
*
|
|
6418
|
+
* **When to use**
|
|
6419
|
+
*
|
|
6420
|
+
* Use to keep only stream elements accepted by a `Filter` and emit each filter
|
|
6421
|
+
* success value.
|
|
6422
|
+
*
|
|
6423
|
+
* **Details**
|
|
6424
|
+
*
|
|
6425
|
+
* `Result.succeed` values are emitted and `Result.fail` values are skipped.
|
|
6426
|
+
*
|
|
6427
|
+
* @see {@link filter} for keeping original elements with a boolean predicate or refinement
|
|
6428
|
+
* @see {@link filterMapEffect} for an effectful `Filter`
|
|
6429
|
+
* @see {@link partition} for consuming both filter success and failure values
|
|
6430
|
+
*
|
|
6271
6431
|
* @category filtering
|
|
6272
6432
|
* @since 2.0.0
|
|
6273
6433
|
*/
|
|
@@ -6275,6 +6435,19 @@ export const filterMap: {
|
|
|
6275
6435
|
/**
|
|
6276
6436
|
* Filters and maps stream elements in one pass using a `Filter`.
|
|
6277
6437
|
*
|
|
6438
|
+
* **When to use**
|
|
6439
|
+
*
|
|
6440
|
+
* Use to keep only stream elements accepted by a `Filter` and emit each filter
|
|
6441
|
+
* success value.
|
|
6442
|
+
*
|
|
6443
|
+
* **Details**
|
|
6444
|
+
*
|
|
6445
|
+
* `Result.succeed` values are emitted and `Result.fail` values are skipped.
|
|
6446
|
+
*
|
|
6447
|
+
* @see {@link filter} for keeping original elements with a boolean predicate or refinement
|
|
6448
|
+
* @see {@link filterMapEffect} for an effectful `Filter`
|
|
6449
|
+
* @see {@link partition} for consuming both filter success and failure values
|
|
6450
|
+
*
|
|
6278
6451
|
* @category filtering
|
|
6279
6452
|
* @since 2.0.0
|
|
6280
6453
|
*/
|
|
@@ -6288,7 +6461,7 @@ export const filterMap: {
|
|
|
6288
6461
|
)
|
|
6289
6462
|
|
|
6290
6463
|
/**
|
|
6291
|
-
*
|
|
6464
|
+
* Filters elements in a single pass effectfully.
|
|
6292
6465
|
*
|
|
6293
6466
|
* **Example** (Effectfully filtering stream values)
|
|
6294
6467
|
*
|
|
@@ -6311,7 +6484,7 @@ export const filterMap: {
|
|
|
6311
6484
|
*/
|
|
6312
6485
|
export const filterEffect: {
|
|
6313
6486
|
/**
|
|
6314
|
-
*
|
|
6487
|
+
* Filters elements in a single pass effectfully.
|
|
6315
6488
|
*
|
|
6316
6489
|
* **Example** (Effectfully filtering stream values)
|
|
6317
6490
|
*
|
|
@@ -6334,7 +6507,7 @@ export const filterEffect: {
|
|
|
6334
6507
|
*/
|
|
6335
6508
|
<A, EX, RX>(predicate: (a: NoInfer<A>, i: number) => Effect.Effect<boolean, EX, RX>): <E, R>(self: Stream<A, E, R>) => Stream<A, E | EX, R | RX>
|
|
6336
6509
|
/**
|
|
6337
|
-
*
|
|
6510
|
+
* Filters elements in a single pass effectfully.
|
|
6338
6511
|
*
|
|
6339
6512
|
* **Example** (Effectfully filtering stream values)
|
|
6340
6513
|
*
|
|
@@ -6368,21 +6541,63 @@ export const filterEffect: {
|
|
|
6368
6541
|
)
|
|
6369
6542
|
|
|
6370
6543
|
/**
|
|
6371
|
-
*
|
|
6544
|
+
* Filters and maps elements in one pass effectfully using a `FilterEffect`.
|
|
6545
|
+
*
|
|
6546
|
+
* **When to use**
|
|
6547
|
+
*
|
|
6548
|
+
* Use to apply effectful logic that can reject stream elements or emit
|
|
6549
|
+
* transformed values before they continue downstream.
|
|
6550
|
+
*
|
|
6551
|
+
* **Details**
|
|
6552
|
+
*
|
|
6553
|
+
* `Result.succeed` values are emitted, `Result.fail` values are skipped, and
|
|
6554
|
+
* effect failures fail the stream.
|
|
6555
|
+
*
|
|
6556
|
+
* @see {@link filterMap} for the synchronous `Filter` variant
|
|
6557
|
+
* @see {@link filterEffect} for effectfully keeping original elements
|
|
6558
|
+
* @see {@link mapEffect} for effectfully transforming every element
|
|
6372
6559
|
*
|
|
6373
6560
|
* @category filtering
|
|
6374
6561
|
* @since 2.0.0
|
|
6375
6562
|
*/
|
|
6376
6563
|
export const filterMapEffect: {
|
|
6377
6564
|
/**
|
|
6378
|
-
*
|
|
6565
|
+
* Filters and maps elements in one pass effectfully using a `FilterEffect`.
|
|
6566
|
+
*
|
|
6567
|
+
* **When to use**
|
|
6568
|
+
*
|
|
6569
|
+
* Use to apply effectful logic that can reject stream elements or emit
|
|
6570
|
+
* transformed values before they continue downstream.
|
|
6571
|
+
*
|
|
6572
|
+
* **Details**
|
|
6573
|
+
*
|
|
6574
|
+
* `Result.succeed` values are emitted, `Result.fail` values are skipped, and
|
|
6575
|
+
* effect failures fail the stream.
|
|
6576
|
+
*
|
|
6577
|
+
* @see {@link filterMap} for the synchronous `Filter` variant
|
|
6578
|
+
* @see {@link filterEffect} for effectfully keeping original elements
|
|
6579
|
+
* @see {@link mapEffect} for effectfully transforming every element
|
|
6379
6580
|
*
|
|
6380
6581
|
* @category filtering
|
|
6381
6582
|
* @since 2.0.0
|
|
6382
6583
|
*/
|
|
6383
6584
|
<A, B, X, EX, RX>(filter: Filter.FilterEffect<NoInfer<A>, B, X, EX, RX>): <E, R>(self: Stream<A, E, R>) => Stream<B, E | EX, R | RX>
|
|
6384
6585
|
/**
|
|
6385
|
-
*
|
|
6586
|
+
* Filters and maps elements in one pass effectfully using a `FilterEffect`.
|
|
6587
|
+
*
|
|
6588
|
+
* **When to use**
|
|
6589
|
+
*
|
|
6590
|
+
* Use to apply effectful logic that can reject stream elements or emit
|
|
6591
|
+
* transformed values before they continue downstream.
|
|
6592
|
+
*
|
|
6593
|
+
* **Details**
|
|
6594
|
+
*
|
|
6595
|
+
* `Result.succeed` values are emitted, `Result.fail` values are skipped, and
|
|
6596
|
+
* effect failures fail the stream.
|
|
6597
|
+
*
|
|
6598
|
+
* @see {@link filterMap} for the synchronous `Filter` variant
|
|
6599
|
+
* @see {@link filterEffect} for effectfully keeping original elements
|
|
6600
|
+
* @see {@link mapEffect} for effectfully transforming every element
|
|
6386
6601
|
*
|
|
6387
6602
|
* @category filtering
|
|
6388
6603
|
* @since 2.0.0
|
|
@@ -6738,12 +6953,21 @@ export const partitionQueue: {
|
|
|
6738
6953
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
6739
6954
|
* filter successes and failures.
|
|
6740
6955
|
*
|
|
6956
|
+
* **When to use**
|
|
6957
|
+
*
|
|
6958
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
6959
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
6960
|
+
*
|
|
6741
6961
|
* **Details**
|
|
6742
6962
|
*
|
|
6743
6963
|
* The returned streams are backed by queues in the current scope and should be
|
|
6744
6964
|
* consumed while that scope remains open. The first stream emits success values
|
|
6745
6965
|
* from the filter, and the second emits failure values.
|
|
6746
6966
|
*
|
|
6967
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
6968
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
6969
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
6970
|
+
*
|
|
6747
6971
|
* @category filtering
|
|
6748
6972
|
* @since 4.0.0
|
|
6749
6973
|
*/
|
|
@@ -6752,12 +6976,21 @@ export const partitionEffect: {
|
|
|
6752
6976
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
6753
6977
|
* filter successes and failures.
|
|
6754
6978
|
*
|
|
6979
|
+
* **When to use**
|
|
6980
|
+
*
|
|
6981
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
6982
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
6983
|
+
*
|
|
6755
6984
|
* **Details**
|
|
6756
6985
|
*
|
|
6757
6986
|
* The returned streams are backed by queues in the current scope and should be
|
|
6758
6987
|
* consumed while that scope remains open. The first stream emits success values
|
|
6759
6988
|
* from the filter, and the second emits failure values.
|
|
6760
6989
|
*
|
|
6990
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
6991
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
6992
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
6993
|
+
*
|
|
6761
6994
|
* @category filtering
|
|
6762
6995
|
* @since 4.0.0
|
|
6763
6996
|
*/
|
|
@@ -6779,12 +7012,21 @@ export const partitionEffect: {
|
|
|
6779
7012
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
6780
7013
|
* filter successes and failures.
|
|
6781
7014
|
*
|
|
7015
|
+
* **When to use**
|
|
7016
|
+
*
|
|
7017
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
7018
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
7019
|
+
*
|
|
6782
7020
|
* **Details**
|
|
6783
7021
|
*
|
|
6784
7022
|
* The returned streams are backed by queues in the current scope and should be
|
|
6785
7023
|
* consumed while that scope remains open. The first stream emits success values
|
|
6786
7024
|
* from the filter, and the second emits failure values.
|
|
6787
7025
|
*
|
|
7026
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
7027
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
7028
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
7029
|
+
*
|
|
6788
7030
|
* @category filtering
|
|
6789
7031
|
* @since 4.0.0
|
|
6790
7032
|
*/
|
|
@@ -6825,12 +7067,21 @@ export const partitionEffect: {
|
|
|
6825
7067
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
6826
7068
|
* filter successes and failures.
|
|
6827
7069
|
*
|
|
7070
|
+
* **When to use**
|
|
7071
|
+
*
|
|
7072
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
7073
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
7074
|
+
*
|
|
6828
7075
|
* **Details**
|
|
6829
7076
|
*
|
|
6830
7077
|
* The returned streams are backed by queues in the current scope and should be
|
|
6831
7078
|
* consumed while that scope remains open. The first stream emits success values
|
|
6832
7079
|
* from the filter, and the second emits failure values.
|
|
6833
7080
|
*
|
|
7081
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
7082
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
7083
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
7084
|
+
*
|
|
6834
7085
|
* @category filtering
|
|
6835
7086
|
* @since 4.0.0
|
|
6836
7087
|
*/
|
|
@@ -6838,12 +7089,21 @@ export const partitionEffect: {
|
|
|
6838
7089
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
6839
7090
|
* filter successes and failures.
|
|
6840
7091
|
*
|
|
7092
|
+
* **When to use**
|
|
7093
|
+
*
|
|
7094
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
7095
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
7096
|
+
*
|
|
6841
7097
|
* **Details**
|
|
6842
7098
|
*
|
|
6843
7099
|
* The returned streams are backed by queues in the current scope and should be
|
|
6844
7100
|
* consumed while that scope remains open. The first stream emits success values
|
|
6845
7101
|
* from the filter, and the second emits failure values.
|
|
6846
7102
|
*
|
|
7103
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
7104
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
7105
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
7106
|
+
*
|
|
6847
7107
|
* @category filtering
|
|
6848
7108
|
* @since 4.0.0
|
|
6849
7109
|
*/
|
|
@@ -6851,12 +7111,21 @@ export const partitionEffect: {
|
|
|
6851
7111
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
6852
7112
|
* filter successes and failures.
|
|
6853
7113
|
*
|
|
7114
|
+
* **When to use**
|
|
7115
|
+
*
|
|
7116
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
7117
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
7118
|
+
*
|
|
6854
7119
|
* **Details**
|
|
6855
7120
|
*
|
|
6856
7121
|
* The returned streams are backed by queues in the current scope and should be
|
|
6857
7122
|
* consumed while that scope remains open. The first stream emits success values
|
|
6858
7123
|
* from the filter, and the second emits failure values.
|
|
6859
7124
|
*
|
|
7125
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
7126
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
7127
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
7128
|
+
*
|
|
6860
7129
|
* @category filtering
|
|
6861
7130
|
* @since 4.0.0
|
|
6862
7131
|
*/
|
|
@@ -6864,12 +7133,21 @@ export const partitionEffect: {
|
|
|
6864
7133
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
6865
7134
|
* filter successes and failures.
|
|
6866
7135
|
*
|
|
7136
|
+
* **When to use**
|
|
7137
|
+
*
|
|
7138
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
7139
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
7140
|
+
*
|
|
6867
7141
|
* **Details**
|
|
6868
7142
|
*
|
|
6869
7143
|
* The returned streams are backed by queues in the current scope and should be
|
|
6870
7144
|
* consumed while that scope remains open. The first stream emits success values
|
|
6871
7145
|
* from the filter, and the second emits failure values.
|
|
6872
7146
|
*
|
|
7147
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
7148
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
7149
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
7150
|
+
*
|
|
6873
7151
|
* @category filtering
|
|
6874
7152
|
* @since 4.0.0
|
|
6875
7153
|
*/
|
|
@@ -6877,12 +7155,21 @@ export const partitionEffect: {
|
|
|
6877
7155
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
6878
7156
|
* filter successes and failures.
|
|
6879
7157
|
*
|
|
7158
|
+
* **When to use**
|
|
7159
|
+
*
|
|
7160
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
7161
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
7162
|
+
*
|
|
6880
7163
|
* **Details**
|
|
6881
7164
|
*
|
|
6882
7165
|
* The returned streams are backed by queues in the current scope and should be
|
|
6883
7166
|
* consumed while that scope remains open. The first stream emits success values
|
|
6884
7167
|
* from the filter, and the second emits failure values.
|
|
6885
7168
|
*
|
|
7169
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
7170
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
7171
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
7172
|
+
*
|
|
6886
7173
|
* @category filtering
|
|
6887
7174
|
* @since 4.0.0
|
|
6888
7175
|
*/
|
|
@@ -7258,7 +7545,7 @@ export const peel: {
|
|
|
7258
7545
|
* // Output: [ 1, 2, 3 ]
|
|
7259
7546
|
* ```
|
|
7260
7547
|
*
|
|
7261
|
-
* @category
|
|
7548
|
+
* @category rate limiting
|
|
7262
7549
|
* @since 2.0.0
|
|
7263
7550
|
*/
|
|
7264
7551
|
export const buffer: {
|
|
@@ -7290,7 +7577,7 @@ export const buffer: {
|
|
|
7290
7577
|
* // Output: [ 1, 2, 3 ]
|
|
7291
7578
|
* ```
|
|
7292
7579
|
*
|
|
7293
|
-
* @category
|
|
7580
|
+
* @category rate limiting
|
|
7294
7581
|
* @since 2.0.0
|
|
7295
7582
|
*/
|
|
7296
7583
|
(
|
|
@@ -7327,7 +7614,7 @@ export const buffer: {
|
|
|
7327
7614
|
* // Output: [ 1, 2, 3 ]
|
|
7328
7615
|
* ```
|
|
7329
7616
|
*
|
|
7330
|
-
* @category
|
|
7617
|
+
* @category rate limiting
|
|
7331
7618
|
* @since 2.0.0
|
|
7332
7619
|
*/
|
|
7333
7620
|
<A, E, R>(
|
|
@@ -7372,7 +7659,7 @@ export const buffer: {
|
|
|
7372
7659
|
* // Output: [ 1, 2, 3, 4 ]
|
|
7373
7660
|
* ```
|
|
7374
7661
|
*
|
|
7375
|
-
* @category
|
|
7662
|
+
* @category rate limiting
|
|
7376
7663
|
* @since 4.0.0
|
|
7377
7664
|
*/
|
|
7378
7665
|
export const bufferArray: {
|
|
@@ -7403,7 +7690,7 @@ export const bufferArray: {
|
|
|
7403
7690
|
* // Output: [ 1, 2, 3, 4 ]
|
|
7404
7691
|
* ```
|
|
7405
7692
|
*
|
|
7406
|
-
* @category
|
|
7693
|
+
* @category rate limiting
|
|
7407
7694
|
* @since 4.0.0
|
|
7408
7695
|
*/
|
|
7409
7696
|
(
|
|
@@ -7439,7 +7726,7 @@ export const bufferArray: {
|
|
|
7439
7726
|
* // Output: [ 1, 2, 3, 4 ]
|
|
7440
7727
|
* ```
|
|
7441
7728
|
*
|
|
7442
|
-
* @category
|
|
7729
|
+
* @category rate limiting
|
|
7443
7730
|
* @since 4.0.0
|
|
7444
7731
|
*/
|
|
7445
7732
|
<A, E, R>(
|
|
@@ -7704,7 +7991,7 @@ export {
|
|
|
7704
7991
|
}
|
|
7705
7992
|
|
|
7706
7993
|
/**
|
|
7707
|
-
*
|
|
7994
|
+
* Peeks at errors effectfully without changing the stream unless the tap fails.
|
|
7708
7995
|
*
|
|
7709
7996
|
* **Example** (Effectfully peeking at errors)
|
|
7710
7997
|
*
|
|
@@ -7733,7 +8020,7 @@ export {
|
|
|
7733
8020
|
*/
|
|
7734
8021
|
export const tapError: {
|
|
7735
8022
|
/**
|
|
7736
|
-
*
|
|
8023
|
+
* Peeks at errors effectfully without changing the stream unless the tap fails.
|
|
7737
8024
|
*
|
|
7738
8025
|
* **Example** (Effectfully peeking at errors)
|
|
7739
8026
|
*
|
|
@@ -7762,7 +8049,7 @@ export const tapError: {
|
|
|
7762
8049
|
*/
|
|
7763
8050
|
<E, A2, E2, R2>(f: (error: E) => Effect.Effect<A2, E2, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>
|
|
7764
8051
|
/**
|
|
7765
|
-
*
|
|
8052
|
+
* Peeks at errors effectfully without changing the stream unless the tap fails.
|
|
7766
8053
|
*
|
|
7767
8054
|
* **Example** (Effectfully peeking at errors)
|
|
7768
8055
|
*
|
|
@@ -7868,11 +8155,13 @@ export const catchIf: {
|
|
|
7868
8155
|
* @category error handling
|
|
7869
8156
|
* @since 4.0.0
|
|
7870
8157
|
*/
|
|
7871
|
-
<E, EB extends E, A2, E2, R2, A3 =
|
|
8158
|
+
<E, EB extends E, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(
|
|
7872
8159
|
refinement: Refinement<NoInfer<E>, EB>,
|
|
7873
8160
|
f: (e: EB) => Stream<A2, E2, R2>,
|
|
7874
8161
|
orElse?: ((e: Exclude<E, EB>) => Stream<A3, E3, R3>) | undefined
|
|
7875
|
-
): <A, R>(
|
|
8162
|
+
): <A, R>(
|
|
8163
|
+
self: Stream<A, E, R>
|
|
8164
|
+
) => Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? Exclude<E, EB> : never), R | R2 | R3>
|
|
7876
8165
|
/**
|
|
7877
8166
|
* Recovers from errors that match a predicate by switching to a recovery stream.
|
|
7878
8167
|
*
|
|
@@ -7907,11 +8196,13 @@ export const catchIf: {
|
|
|
7907
8196
|
* @category error handling
|
|
7908
8197
|
* @since 4.0.0
|
|
7909
8198
|
*/
|
|
7910
|
-
<E, A2, E2, R2, A3 =
|
|
8199
|
+
<E, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(
|
|
7911
8200
|
predicate: Predicate<NoInfer<E>>,
|
|
7912
8201
|
f: (e: NoInfer<E>) => Stream<A2, E2, R2>,
|
|
7913
8202
|
orElse?: ((e: NoInfer<E>) => Stream<A3, E3, R3>) | undefined
|
|
7914
|
-
): <A, R>(
|
|
8203
|
+
): <A, R>(
|
|
8204
|
+
self: Stream<A, E, R>
|
|
8205
|
+
) => Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? E : never), R | R2 | R3>
|
|
7915
8206
|
/**
|
|
7916
8207
|
* Recovers from errors that match a predicate by switching to a recovery stream.
|
|
7917
8208
|
*
|
|
@@ -7946,12 +8237,12 @@ export const catchIf: {
|
|
|
7946
8237
|
* @category error handling
|
|
7947
8238
|
* @since 4.0.0
|
|
7948
8239
|
*/
|
|
7949
|
-
<A, E, R, EB extends E, A2, E2, R2, A3 =
|
|
8240
|
+
<A, E, R, EB extends E, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(
|
|
7950
8241
|
self: Stream<A, E, R>,
|
|
7951
8242
|
refinement: Refinement<E, EB>,
|
|
7952
8243
|
f: (e: EB) => Stream<A2, E2, R2>,
|
|
7953
8244
|
orElse?: ((e: Exclude<E, EB>) => Stream<A3, E3, R3>) | undefined
|
|
7954
|
-
): Stream<A | A2 | A3, E2 | E3, R | R2 | R3>
|
|
8245
|
+
): Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? Exclude<E, EB> : never), R | R2 | R3>
|
|
7955
8246
|
/**
|
|
7956
8247
|
* Recovers from errors that match a predicate by switching to a recovery stream.
|
|
7957
8248
|
*
|
|
@@ -7986,12 +8277,12 @@ export const catchIf: {
|
|
|
7986
8277
|
* @category error handling
|
|
7987
8278
|
* @since 4.0.0
|
|
7988
8279
|
*/
|
|
7989
|
-
<A, E, R, A2, E2, R2, A3 =
|
|
8280
|
+
<A, E, R, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(
|
|
7990
8281
|
self: Stream<A, E, R>,
|
|
7991
8282
|
predicate: Predicate<E>,
|
|
7992
8283
|
f: (e: E) => Stream<A2, E2, R2>,
|
|
7993
8284
|
orElse?: ((e: E) => Stream<A3, E3, R3>) | undefined
|
|
7994
|
-
): Stream<A | A2 | A3, E2 | E3, R | R2 | R3>
|
|
8285
|
+
): Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? E : never), R | R2 | R3>
|
|
7995
8286
|
} = dual((args) => isStream(args[0]), <
|
|
7996
8287
|
A,
|
|
7997
8288
|
E,
|
|
@@ -8021,6 +8312,21 @@ export const catchIf: {
|
|
|
8021
8312
|
* Recovers from errors that match a `Filter` by switching to a recovery
|
|
8022
8313
|
* stream.
|
|
8023
8314
|
*
|
|
8315
|
+
* **When to use**
|
|
8316
|
+
*
|
|
8317
|
+
* Use to recover from stream errors with a reusable `Filter` when matching can
|
|
8318
|
+
* also narrow or transform the error before choosing the recovery stream.
|
|
8319
|
+
*
|
|
8320
|
+
* **Details**
|
|
8321
|
+
*
|
|
8322
|
+
* Successful filter results are passed to `f`. Failed filter results go to
|
|
8323
|
+
* `orElse` when provided; otherwise the filter failure is re-failed.
|
|
8324
|
+
*
|
|
8325
|
+
* @see {@link catchIf} for predicate or refinement based recovery
|
|
8326
|
+
* @see {@link catchTag} for `_tag` based recovery from one tagged error
|
|
8327
|
+
* @see {@link catchTags} for `_tag` based recovery from multiple tagged errors
|
|
8328
|
+
* @see {@link catchCauseFilter} for filtering full causes
|
|
8329
|
+
*
|
|
8024
8330
|
* @category error handling
|
|
8025
8331
|
* @since 4.0.0
|
|
8026
8332
|
*/
|
|
@@ -8029,27 +8335,59 @@ export const catchFilter: {
|
|
|
8029
8335
|
* Recovers from errors that match a `Filter` by switching to a recovery
|
|
8030
8336
|
* stream.
|
|
8031
8337
|
*
|
|
8338
|
+
* **When to use**
|
|
8339
|
+
*
|
|
8340
|
+
* Use to recover from stream errors with a reusable `Filter` when matching can
|
|
8341
|
+
* also narrow or transform the error before choosing the recovery stream.
|
|
8342
|
+
*
|
|
8343
|
+
* **Details**
|
|
8344
|
+
*
|
|
8345
|
+
* Successful filter results are passed to `f`. Failed filter results go to
|
|
8346
|
+
* `orElse` when provided; otherwise the filter failure is re-failed.
|
|
8347
|
+
*
|
|
8348
|
+
* @see {@link catchIf} for predicate or refinement based recovery
|
|
8349
|
+
* @see {@link catchTag} for `_tag` based recovery from one tagged error
|
|
8350
|
+
* @see {@link catchTags} for `_tag` based recovery from multiple tagged errors
|
|
8351
|
+
* @see {@link catchCauseFilter} for filtering full causes
|
|
8352
|
+
*
|
|
8032
8353
|
* @category error handling
|
|
8033
8354
|
* @since 4.0.0
|
|
8034
8355
|
*/
|
|
8035
|
-
<E, EB, A2, E2, R2, X, A3 =
|
|
8356
|
+
<E, EB, A2, E2, R2, X, A3 = unassigned, E3 = never, R3 = never>(
|
|
8036
8357
|
filter: Filter.Filter<NoInfer<E>, EB, X>,
|
|
8037
8358
|
f: (failure: EB) => Stream<A2, E2, R2>,
|
|
8038
8359
|
orElse?: ((failure: X) => Stream<A3, E3, R3>) | undefined
|
|
8039
|
-
): <A, R>(
|
|
8360
|
+
): <A, R>(
|
|
8361
|
+
self: Stream<A, E, R>
|
|
8362
|
+
) => Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? X : never), R | R2 | R3>
|
|
8040
8363
|
/**
|
|
8041
8364
|
* Recovers from errors that match a `Filter` by switching to a recovery
|
|
8042
8365
|
* stream.
|
|
8043
8366
|
*
|
|
8367
|
+
* **When to use**
|
|
8368
|
+
*
|
|
8369
|
+
* Use to recover from stream errors with a reusable `Filter` when matching can
|
|
8370
|
+
* also narrow or transform the error before choosing the recovery stream.
|
|
8371
|
+
*
|
|
8372
|
+
* **Details**
|
|
8373
|
+
*
|
|
8374
|
+
* Successful filter results are passed to `f`. Failed filter results go to
|
|
8375
|
+
* `orElse` when provided; otherwise the filter failure is re-failed.
|
|
8376
|
+
*
|
|
8377
|
+
* @see {@link catchIf} for predicate or refinement based recovery
|
|
8378
|
+
* @see {@link catchTag} for `_tag` based recovery from one tagged error
|
|
8379
|
+
* @see {@link catchTags} for `_tag` based recovery from multiple tagged errors
|
|
8380
|
+
* @see {@link catchCauseFilter} for filtering full causes
|
|
8381
|
+
*
|
|
8044
8382
|
* @category error handling
|
|
8045
8383
|
* @since 4.0.0
|
|
8046
8384
|
*/
|
|
8047
|
-
<A, E, R, EB, A2, E2, R2, X, A3 =
|
|
8385
|
+
<A, E, R, EB, A2, E2, R2, X, A3 = unassigned, E3 = never, R3 = never>(
|
|
8048
8386
|
self: Stream<A, E, R>,
|
|
8049
8387
|
filter: Filter.Filter<NoInfer<E>, EB, X>,
|
|
8050
8388
|
f: (failure: EB) => Stream<A2, E2, R2>,
|
|
8051
8389
|
orElse?: ((failure: X) => Stream<A3, E3, R3>) | undefined
|
|
8052
|
-
): Stream<A | A2 | A3, E2 | E3, R | R2 | R3>
|
|
8390
|
+
): Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? X : never), R | R2 | R3>
|
|
8053
8391
|
} = dual((args) => isStream(args[0]), <
|
|
8054
8392
|
A,
|
|
8055
8393
|
E,
|
|
@@ -8083,7 +8421,7 @@ export const catchFilter: {
|
|
|
8083
8421
|
*
|
|
8084
8422
|
* **When to use**
|
|
8085
8423
|
*
|
|
8086
|
-
* Use
|
|
8424
|
+
* Use when your error type is a tagged union with a readonly `_tag`
|
|
8087
8425
|
* field and you want to handle a specific error case.
|
|
8088
8426
|
*
|
|
8089
8427
|
* **Example** (Catching tagged failures)
|
|
@@ -8118,7 +8456,7 @@ export const catchTag: {
|
|
|
8118
8456
|
*
|
|
8119
8457
|
* **When to use**
|
|
8120
8458
|
*
|
|
8121
|
-
* Use
|
|
8459
|
+
* Use when your error type is a tagged union with a readonly `_tag`
|
|
8122
8460
|
* field and you want to handle a specific error case.
|
|
8123
8461
|
*
|
|
8124
8462
|
* **Example** (Catching tagged failures)
|
|
@@ -8152,8 +8490,8 @@ export const catchTag: {
|
|
|
8152
8490
|
A1,
|
|
8153
8491
|
E1,
|
|
8154
8492
|
R1,
|
|
8155
|
-
A2 =
|
|
8156
|
-
E2 =
|
|
8493
|
+
A2 = unassigned,
|
|
8494
|
+
E2 = never,
|
|
8157
8495
|
R2 = never
|
|
8158
8496
|
>(
|
|
8159
8497
|
k: K,
|
|
@@ -8165,14 +8503,20 @@ export const catchTag: {
|
|
|
8165
8503
|
| undefined
|
|
8166
8504
|
): <A, R>(
|
|
8167
8505
|
self: Stream<A, E, R>
|
|
8168
|
-
) => Stream<
|
|
8506
|
+
) => Stream<
|
|
8507
|
+
A | A1 | Exclude<A2, unassigned>,
|
|
8508
|
+
| E1
|
|
8509
|
+
| E2
|
|
8510
|
+
| (A2 extends unassigned ? ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K> : never),
|
|
8511
|
+
R | R1 | R2
|
|
8512
|
+
>
|
|
8169
8513
|
/**
|
|
8170
8514
|
* Recovers from failures whose `_tag` matches the provided value by switching to
|
|
8171
8515
|
* the stream returned by `f`.
|
|
8172
8516
|
*
|
|
8173
8517
|
* **When to use**
|
|
8174
8518
|
*
|
|
8175
|
-
* Use
|
|
8519
|
+
* Use when your error type is a tagged union with a readonly `_tag`
|
|
8176
8520
|
* field and you want to handle a specific error case.
|
|
8177
8521
|
*
|
|
8178
8522
|
* **Example** (Catching tagged failures)
|
|
@@ -8208,8 +8552,8 @@ export const catchTag: {
|
|
|
8208
8552
|
R1,
|
|
8209
8553
|
E1,
|
|
8210
8554
|
A1,
|
|
8211
|
-
A2 =
|
|
8212
|
-
E2 =
|
|
8555
|
+
A2 = unassigned,
|
|
8556
|
+
E2 = never,
|
|
8213
8557
|
R2 = never
|
|
8214
8558
|
>(
|
|
8215
8559
|
self: Stream<A, E, R>,
|
|
@@ -8218,7 +8562,13 @@ export const catchTag: {
|
|
|
8218
8562
|
orElse?:
|
|
8219
8563
|
| ((e: ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Stream<A2, E2, R2>)
|
|
8220
8564
|
| undefined
|
|
8221
|
-
): Stream<
|
|
8565
|
+
): Stream<
|
|
8566
|
+
A | A1 | Exclude<A2, unassigned>,
|
|
8567
|
+
| E1
|
|
8568
|
+
| E2
|
|
8569
|
+
| (A2 extends unassigned ? ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K> : never),
|
|
8570
|
+
R | R1 | R2
|
|
8571
|
+
>
|
|
8222
8572
|
} = dual(
|
|
8223
8573
|
(args) => isStream(args[0]),
|
|
8224
8574
|
<
|
|
@@ -8328,19 +8678,20 @@ export const catchTags: {
|
|
|
8328
8678
|
[K in E["_tag"]]+?: (error: Extract<E, { _tag: K }>) => Stream<any, any, any>
|
|
8329
8679
|
} :
|
|
8330
8680
|
{}),
|
|
8331
|
-
A2 =
|
|
8332
|
-
E2 =
|
|
8681
|
+
A2 = unassigned,
|
|
8682
|
+
E2 = never,
|
|
8333
8683
|
R2 = never
|
|
8334
8684
|
>(
|
|
8335
8685
|
cases: Cases,
|
|
8336
8686
|
orElse?: ((e: Exclude<E, { _tag: keyof Cases }>) => Stream<A2, E2, R2>) | undefined
|
|
8337
8687
|
): <A, R>(self: Stream<A, E, R>) => Stream<
|
|
8338
8688
|
| A
|
|
8339
|
-
| A2
|
|
8689
|
+
| Exclude<A2, unassigned>
|
|
8340
8690
|
| {
|
|
8341
8691
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<infer A, any, any>) ? A : never
|
|
8342
8692
|
}[keyof Cases],
|
|
8343
8693
|
| E2
|
|
8694
|
+
| (A2 extends unassigned ? Exclude<E, { _tag: keyof Cases }> : never)
|
|
8344
8695
|
| {
|
|
8345
8696
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<any, infer E, any>) ? E : never
|
|
8346
8697
|
}[keyof Cases],
|
|
@@ -8395,8 +8746,8 @@ export const catchTags: {
|
|
|
8395
8746
|
[K in E["_tag"]]+?: (error: Extract<E, { _tag: K }>) => Stream<any, any, any>
|
|
8396
8747
|
} :
|
|
8397
8748
|
{}),
|
|
8398
|
-
A2 =
|
|
8399
|
-
E2 =
|
|
8749
|
+
A2 = unassigned,
|
|
8750
|
+
E2 = never,
|
|
8400
8751
|
R2 = never
|
|
8401
8752
|
>(
|
|
8402
8753
|
self: Stream<A, E, R>,
|
|
@@ -8404,11 +8755,12 @@ export const catchTags: {
|
|
|
8404
8755
|
orElse?: ((e: Exclude<E, { _tag: keyof Cases }>) => Stream<A2, E2, R2>) | undefined
|
|
8405
8756
|
): Stream<
|
|
8406
8757
|
| A
|
|
8407
|
-
| A2
|
|
8758
|
+
| Exclude<A2, unassigned>
|
|
8408
8759
|
| {
|
|
8409
8760
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<infer A, any, any>) ? A : never
|
|
8410
8761
|
}[keyof Cases],
|
|
8411
8762
|
| E2
|
|
8763
|
+
| (A2 extends unassigned ? Exclude<E, { _tag: keyof Cases }> : never)
|
|
8412
8764
|
| {
|
|
8413
8765
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<any, infer E, any>) ? E : never
|
|
8414
8766
|
}[keyof Cases],
|
|
@@ -8438,7 +8790,7 @@ export const catchTags: {
|
|
|
8438
8790
|
*
|
|
8439
8791
|
* **When to use**
|
|
8440
8792
|
*
|
|
8441
|
-
* Use
|
|
8793
|
+
* Use to handle nested error causes without removing the parent error
|
|
8442
8794
|
* from the error channel. The handler receives the unwrapped reason.
|
|
8443
8795
|
*
|
|
8444
8796
|
* **Example** (Catching a tagged error reason)
|
|
@@ -8485,7 +8837,7 @@ export const catchReason: {
|
|
|
8485
8837
|
*
|
|
8486
8838
|
* **When to use**
|
|
8487
8839
|
*
|
|
8488
|
-
* Use
|
|
8840
|
+
* Use to handle nested error causes without removing the parent error
|
|
8489
8841
|
* from the error channel. The handler receives the unwrapped reason.
|
|
8490
8842
|
*
|
|
8491
8843
|
* **Example** (Catching a tagged error reason)
|
|
@@ -8551,13 +8903,17 @@ export const catchReason: {
|
|
|
8551
8903
|
| undefined
|
|
8552
8904
|
): <A, R>(
|
|
8553
8905
|
self: Stream<A, E, R>
|
|
8554
|
-
) => Stream<
|
|
8906
|
+
) => Stream<
|
|
8907
|
+
A | A2 | Exclude<A3, unassigned>,
|
|
8908
|
+
ExcludeTag<E, K> | E2 | E3 | (A3 extends unassigned ? ExtractTag<E, K> : never),
|
|
8909
|
+
R | R2 | R3
|
|
8910
|
+
>
|
|
8555
8911
|
/**
|
|
8556
8912
|
* Catches a specific reason within a tagged error.
|
|
8557
8913
|
*
|
|
8558
8914
|
* **When to use**
|
|
8559
8915
|
*
|
|
8560
|
-
* Use
|
|
8916
|
+
* Use to handle nested error causes without removing the parent error
|
|
8561
8917
|
* from the error channel. The handler receives the unwrapped reason.
|
|
8562
8918
|
*
|
|
8563
8919
|
* **Example** (Catching a tagged error reason)
|
|
@@ -8618,7 +8974,11 @@ export const catchReason: {
|
|
|
8618
8974
|
orElse?:
|
|
8619
8975
|
| ((reason: ExcludeReason<ExtractTag<E, K>, RK>, error: OmitReason<ExtractTag<E, K>, RK>) => Stream<A3, E3, R3>)
|
|
8620
8976
|
| undefined
|
|
8621
|
-
): Stream<
|
|
8977
|
+
): Stream<
|
|
8978
|
+
A | A2 | Exclude<A3, unassigned>,
|
|
8979
|
+
ExcludeTag<E, K> | E2 | E3 | (A3 extends unassigned ? ExtractTag<E, K> : never),
|
|
8980
|
+
R | R2 | R3
|
|
8981
|
+
>
|
|
8622
8982
|
} = dual(
|
|
8623
8983
|
(args) => isStream(args[0]),
|
|
8624
8984
|
<
|
|
@@ -8641,7 +9001,11 @@ export const catchReason: {
|
|
|
8641
9001
|
orElse?:
|
|
8642
9002
|
| ((reason: ExcludeReason<ExtractTag<E, K>, RK>, error: OmitReason<ExtractTag<E, K>, RK>) => Stream<A3, E3, R3>)
|
|
8643
9003
|
| undefined
|
|
8644
|
-
): Stream<
|
|
9004
|
+
): Stream<
|
|
9005
|
+
A | A2 | Exclude<A3, unassigned>,
|
|
9006
|
+
ExcludeTag<E, K> | E2 | E3 | (A3 extends unassigned ? ExtractTag<E, K> : never),
|
|
9007
|
+
R | R2 | R3
|
|
9008
|
+
> =>
|
|
8645
9009
|
fromChannel(
|
|
8646
9010
|
Channel.catchReason(
|
|
8647
9011
|
toChannel(self),
|
|
@@ -8765,8 +9129,9 @@ export const catchReasons: {
|
|
|
8765
9129
|
| {
|
|
8766
9130
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<infer A, any, any> ? A : never
|
|
8767
9131
|
}[keyof Cases],
|
|
8768
|
-
|
|
|
9132
|
+
| ExcludeTag<E, K>
|
|
8769
9133
|
| E2
|
|
9134
|
+
| (A2 extends unassigned ? ExtractTag<E, K> : never)
|
|
8770
9135
|
| {
|
|
8771
9136
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, infer E, any> ? E : never
|
|
8772
9137
|
}[keyof Cases],
|
|
@@ -8848,8 +9213,9 @@ export const catchReasons: {
|
|
|
8848
9213
|
| {
|
|
8849
9214
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<infer A, any, any> ? A : never
|
|
8850
9215
|
}[keyof Cases],
|
|
8851
|
-
|
|
|
9216
|
+
| ExcludeTag<E, K>
|
|
8852
9217
|
| E2
|
|
9218
|
+
| (A2 extends unassigned ? ExtractTag<E, K> : never)
|
|
8853
9219
|
| {
|
|
8854
9220
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, infer E, any> ? E : never
|
|
8855
9221
|
}[keyof Cases],
|
|
@@ -9072,6 +9438,22 @@ export const catchCauseIf: {
|
|
|
9072
9438
|
* Recovers from stream failures by filtering the `Cause` and switching to a
|
|
9073
9439
|
* recovery stream.
|
|
9074
9440
|
*
|
|
9441
|
+
* **When to use**
|
|
9442
|
+
*
|
|
9443
|
+
* Use when you need to recover a stream only from causes selected by a
|
|
9444
|
+
* `Filter`, and the recovery needs both the selected value and the original
|
|
9445
|
+
* `Cause`.
|
|
9446
|
+
*
|
|
9447
|
+
* **Details**
|
|
9448
|
+
*
|
|
9449
|
+
* The filter is applied to the full `Cause`. A successful filter result is
|
|
9450
|
+
* passed to `f` together with the original cause; a failed filter result
|
|
9451
|
+
* re-fails with the residual cause.
|
|
9452
|
+
*
|
|
9453
|
+
* @see {@link catchCauseIf} for predicate-based cause selection
|
|
9454
|
+
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
9455
|
+
* @see {@link catchCause} for recovering from every cause without filtering
|
|
9456
|
+
*
|
|
9075
9457
|
* @category error handling
|
|
9076
9458
|
* @since 4.0.0
|
|
9077
9459
|
*/
|
|
@@ -9080,6 +9462,22 @@ export const catchCauseFilter: {
|
|
|
9080
9462
|
* Recovers from stream failures by filtering the `Cause` and switching to a
|
|
9081
9463
|
* recovery stream.
|
|
9082
9464
|
*
|
|
9465
|
+
* **When to use**
|
|
9466
|
+
*
|
|
9467
|
+
* Use when you need to recover a stream only from causes selected by a
|
|
9468
|
+
* `Filter`, and the recovery needs both the selected value and the original
|
|
9469
|
+
* `Cause`.
|
|
9470
|
+
*
|
|
9471
|
+
* **Details**
|
|
9472
|
+
*
|
|
9473
|
+
* The filter is applied to the full `Cause`. A successful filter result is
|
|
9474
|
+
* passed to `f` together with the original cause; a failed filter result
|
|
9475
|
+
* re-fails with the residual cause.
|
|
9476
|
+
*
|
|
9477
|
+
* @see {@link catchCauseIf} for predicate-based cause selection
|
|
9478
|
+
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
9479
|
+
* @see {@link catchCause} for recovering from every cause without filtering
|
|
9480
|
+
*
|
|
9083
9481
|
* @category error handling
|
|
9084
9482
|
* @since 4.0.0
|
|
9085
9483
|
*/
|
|
@@ -9093,6 +9491,22 @@ export const catchCauseFilter: {
|
|
|
9093
9491
|
* Recovers from stream failures by filtering the `Cause` and switching to a
|
|
9094
9492
|
* recovery stream.
|
|
9095
9493
|
*
|
|
9494
|
+
* **When to use**
|
|
9495
|
+
*
|
|
9496
|
+
* Use when you need to recover a stream only from causes selected by a
|
|
9497
|
+
* `Filter`, and the recovery needs both the selected value and the original
|
|
9498
|
+
* `Cause`.
|
|
9499
|
+
*
|
|
9500
|
+
* **Details**
|
|
9501
|
+
*
|
|
9502
|
+
* The filter is applied to the full `Cause`. A successful filter result is
|
|
9503
|
+
* passed to `f` together with the original cause; a failed filter result
|
|
9504
|
+
* re-fails with the residual cause.
|
|
9505
|
+
*
|
|
9506
|
+
* @see {@link catchCauseIf} for predicate-based cause selection
|
|
9507
|
+
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
9508
|
+
* @see {@link catchCause} for recovering from every cause without filtering
|
|
9509
|
+
*
|
|
9096
9510
|
* @category error handling
|
|
9097
9511
|
* @since 4.0.0
|
|
9098
9512
|
*/
|
|
@@ -9306,7 +9720,9 @@ export const orDie = <A, E, R>(self: Stream<A, E, R>): Stream<A, never, R> => fr
|
|
|
9306
9720
|
*
|
|
9307
9721
|
* **When to use**
|
|
9308
9722
|
*
|
|
9309
|
-
* Use
|
|
9723
|
+
* Use when you want a failing stream to end gracefully rather than propagate
|
|
9724
|
+
* the error. The `log` option controls whether the failure is logged before
|
|
9725
|
+
* the stream terminates.
|
|
9310
9726
|
*
|
|
9311
9727
|
* **Example** (Ignoring stream failures)
|
|
9312
9728
|
*
|
|
@@ -9342,6 +9758,8 @@ export const orDie = <A, E, R>(self: Stream<A, E, R>): Stream<A, never, R> => fr
|
|
|
9342
9758
|
* // []
|
|
9343
9759
|
* ```
|
|
9344
9760
|
*
|
|
9761
|
+
* @see {@link ignoreCause} for a variant that also ignores defects, not just typed failures
|
|
9762
|
+
*
|
|
9345
9763
|
* @category error handling
|
|
9346
9764
|
* @since 4.0.0
|
|
9347
9765
|
*/
|
|
@@ -9370,7 +9788,9 @@ export const ignore: <
|
|
|
9370
9788
|
*
|
|
9371
9789
|
* **When to use**
|
|
9372
9790
|
*
|
|
9373
|
-
* Use
|
|
9791
|
+
* Use when a stream may fail with defects and you want to silently suppress the
|
|
9792
|
+
* entire failure cause — including both typed errors and defects — rather than
|
|
9793
|
+
* propagate it downstream.
|
|
9374
9794
|
*
|
|
9375
9795
|
* **Example** (Ignoring stream failure causes)
|
|
9376
9796
|
*
|
|
@@ -9389,6 +9809,8 @@ export const ignore: <
|
|
|
9389
9809
|
* // [ 1, 2 ]
|
|
9390
9810
|
* ```
|
|
9391
9811
|
*
|
|
9812
|
+
* @see {@link ignore} to ignore only typed failures without suppressing defects
|
|
9813
|
+
*
|
|
9392
9814
|
* @category error handling
|
|
9393
9815
|
* @since 4.0.0
|
|
9394
9816
|
*/
|
|
@@ -9411,7 +9833,7 @@ export const ignoreCause: <
|
|
|
9411
9833
|
)
|
|
9412
9834
|
|
|
9413
9835
|
/**
|
|
9414
|
-
*
|
|
9836
|
+
* Retries the stream according to the given schedule when it fails.
|
|
9415
9837
|
*
|
|
9416
9838
|
* **Details**
|
|
9417
9839
|
*
|
|
@@ -9446,7 +9868,7 @@ export const ignoreCause: <
|
|
|
9446
9868
|
*/
|
|
9447
9869
|
export const retry: {
|
|
9448
9870
|
/**
|
|
9449
|
-
*
|
|
9871
|
+
* Retries the stream according to the given schedule when it fails.
|
|
9450
9872
|
*
|
|
9451
9873
|
* **Details**
|
|
9452
9874
|
*
|
|
@@ -9487,7 +9909,7 @@ export const retry: {
|
|
|
9487
9909
|
) => Schedule.Schedule<X, NoInfer<E>, E2, R2>)
|
|
9488
9910
|
): <A, R>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>
|
|
9489
9911
|
/**
|
|
9490
|
-
*
|
|
9912
|
+
* Retries the stream according to the given schedule when it fails.
|
|
9491
9913
|
*
|
|
9492
9914
|
* **Details**
|
|
9493
9915
|
*
|
|
@@ -9541,7 +9963,7 @@ export const retry: {
|
|
|
9541
9963
|
)
|
|
9542
9964
|
|
|
9543
9965
|
/**
|
|
9544
|
-
*
|
|
9966
|
+
* Applies an `ExecutionPlan` to a stream, retrying with step-provided resources
|
|
9545
9967
|
* until it succeeds or the plan is exhausted.
|
|
9546
9968
|
*
|
|
9547
9969
|
* **Details**
|
|
@@ -9585,7 +10007,7 @@ export const retry: {
|
|
|
9585
10007
|
*/
|
|
9586
10008
|
export const withExecutionPlan: {
|
|
9587
10009
|
/**
|
|
9588
|
-
*
|
|
10010
|
+
* Applies an `ExecutionPlan` to a stream, retrying with step-provided resources
|
|
9589
10011
|
* until it succeeds or the plan is exhausted.
|
|
9590
10012
|
*
|
|
9591
10013
|
* **Details**
|
|
@@ -9632,7 +10054,7 @@ export const withExecutionPlan: {
|
|
|
9632
10054
|
options?: { readonly preventFallbackOnPartialStream?: boolean | undefined }
|
|
9633
10055
|
): <A, E extends Input, R>(self: Stream<A, E, R>) => Stream<A, E | PolicyE, R2 | Exclude<R, Provides>>
|
|
9634
10056
|
/**
|
|
9635
|
-
*
|
|
10057
|
+
* Applies an `ExecutionPlan` to a stream, retrying with step-provided resources
|
|
9636
10058
|
* until it succeeds or the plan is exhausted.
|
|
9637
10059
|
*
|
|
9638
10060
|
* **Details**
|
|
@@ -9709,7 +10131,7 @@ export const withExecutionPlan: {
|
|
|
9709
10131
|
})
|
|
9710
10132
|
)
|
|
9711
10133
|
let lastError = Option.none</**
|
|
9712
|
-
*
|
|
10134
|
+
* Applies an `ExecutionPlan` to a stream, retrying with step-provided resources
|
|
9713
10135
|
* until it succeeds or the plan is exhausted.
|
|
9714
10136
|
*
|
|
9715
10137
|
* **Details**
|
|
@@ -10109,7 +10531,7 @@ export const takeUntil: {
|
|
|
10109
10531
|
)
|
|
10110
10532
|
|
|
10111
10533
|
/**
|
|
10112
|
-
*
|
|
10534
|
+
* Takes stream elements until an effectful predicate returns `true`.
|
|
10113
10535
|
*
|
|
10114
10536
|
* **Example** (Taking until an effectful predicate matches)
|
|
10115
10537
|
*
|
|
@@ -10133,7 +10555,7 @@ export const takeUntil: {
|
|
|
10133
10555
|
*/
|
|
10134
10556
|
export const takeUntilEffect: {
|
|
10135
10557
|
/**
|
|
10136
|
-
*
|
|
10558
|
+
* Takes stream elements until an effectful predicate returns `true`.
|
|
10137
10559
|
*
|
|
10138
10560
|
* **Example** (Taking until an effectful predicate matches)
|
|
10139
10561
|
*
|
|
@@ -10162,7 +10584,7 @@ export const takeUntilEffect: {
|
|
|
10162
10584
|
}
|
|
10163
10585
|
): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
10164
10586
|
/**
|
|
10165
|
-
*
|
|
10587
|
+
* Takes stream elements until an effectful predicate returns `true`.
|
|
10166
10588
|
*
|
|
10167
10589
|
* **Example** (Taking until an effectful predicate matches)
|
|
10168
10590
|
*
|
|
@@ -10373,10 +10795,19 @@ export const takeWhile: {
|
|
|
10373
10795
|
* Takes the longest initial prefix accepted by a `Filter` and emits the
|
|
10374
10796
|
* filter's success values.
|
|
10375
10797
|
*
|
|
10798
|
+
* **When to use**
|
|
10799
|
+
*
|
|
10800
|
+
* Use to keep the leading stream elements that a `Filter` accepts, emit the
|
|
10801
|
+
* filter's success values, and stop at the first filter failure.
|
|
10802
|
+
*
|
|
10376
10803
|
* **Details**
|
|
10377
10804
|
*
|
|
10378
10805
|
* The stream stops at the first `Result.fail` returned by the filter.
|
|
10379
10806
|
*
|
|
10807
|
+
* @see {@link takeWhile} for keeping original elements with a boolean predicate or refinement
|
|
10808
|
+
* @see {@link filterMap} for filtering across the whole stream instead of only the leading prefix
|
|
10809
|
+
* @see {@link dropWhileFilter} for dropping the accepted prefix and keeping the remaining original elements
|
|
10810
|
+
*
|
|
10380
10811
|
* @category filtering
|
|
10381
10812
|
* @since 4.0.0
|
|
10382
10813
|
*/
|
|
@@ -10385,10 +10816,19 @@ export const takeWhileFilter: {
|
|
|
10385
10816
|
* Takes the longest initial prefix accepted by a `Filter` and emits the
|
|
10386
10817
|
* filter's success values.
|
|
10387
10818
|
*
|
|
10819
|
+
* **When to use**
|
|
10820
|
+
*
|
|
10821
|
+
* Use to keep the leading stream elements that a `Filter` accepts, emit the
|
|
10822
|
+
* filter's success values, and stop at the first filter failure.
|
|
10823
|
+
*
|
|
10388
10824
|
* **Details**
|
|
10389
10825
|
*
|
|
10390
10826
|
* The stream stops at the first `Result.fail` returned by the filter.
|
|
10391
10827
|
*
|
|
10828
|
+
* @see {@link takeWhile} for keeping original elements with a boolean predicate or refinement
|
|
10829
|
+
* @see {@link filterMap} for filtering across the whole stream instead of only the leading prefix
|
|
10830
|
+
* @see {@link dropWhileFilter} for dropping the accepted prefix and keeping the remaining original elements
|
|
10831
|
+
*
|
|
10392
10832
|
* @category filtering
|
|
10393
10833
|
* @since 4.0.0
|
|
10394
10834
|
*/
|
|
@@ -10397,10 +10837,19 @@ export const takeWhileFilter: {
|
|
|
10397
10837
|
* Takes the longest initial prefix accepted by a `Filter` and emits the
|
|
10398
10838
|
* filter's success values.
|
|
10399
10839
|
*
|
|
10840
|
+
* **When to use**
|
|
10841
|
+
*
|
|
10842
|
+
* Use to keep the leading stream elements that a `Filter` accepts, emit the
|
|
10843
|
+
* filter's success values, and stop at the first filter failure.
|
|
10844
|
+
*
|
|
10400
10845
|
* **Details**
|
|
10401
10846
|
*
|
|
10402
10847
|
* The stream stops at the first `Result.fail` returned by the filter.
|
|
10403
10848
|
*
|
|
10849
|
+
* @see {@link takeWhile} for keeping original elements with a boolean predicate or refinement
|
|
10850
|
+
* @see {@link filterMap} for filtering across the whole stream instead of only the leading prefix
|
|
10851
|
+
* @see {@link dropWhileFilter} for dropping the accepted prefix and keeping the remaining original elements
|
|
10852
|
+
*
|
|
10404
10853
|
* @category filtering
|
|
10405
10854
|
* @since 4.0.0
|
|
10406
10855
|
*/
|
|
@@ -10881,6 +11330,21 @@ export const dropWhile: {
|
|
|
10881
11330
|
/**
|
|
10882
11331
|
* Drops elements while the filter succeeds.
|
|
10883
11332
|
*
|
|
11333
|
+
* **When to use**
|
|
11334
|
+
*
|
|
11335
|
+
* Use when you need to remove a leading stream prefix based on a synchronous
|
|
11336
|
+
* `Filter` result while preserving the remaining original stream elements.
|
|
11337
|
+
*
|
|
11338
|
+
* **Details**
|
|
11339
|
+
*
|
|
11340
|
+
* `Result.succeed` drops the current element. The first `Result.fail` stops
|
|
11341
|
+
* dropping, emits that original element, and the rest of the source stream is
|
|
11342
|
+
* emitted without further filtering.
|
|
11343
|
+
*
|
|
11344
|
+
* @see {@link dropWhile} for boolean predicate prefix dropping
|
|
11345
|
+
* @see {@link takeWhileFilter} for keeping the accepted prefix as filter success values
|
|
11346
|
+
* @see {@link dropWhileEffect} for effectful predicate prefix dropping
|
|
11347
|
+
*
|
|
10884
11348
|
* @category filtering
|
|
10885
11349
|
* @since 4.0.0
|
|
10886
11350
|
*/
|
|
@@ -10888,6 +11352,21 @@ export const dropWhileFilter: {
|
|
|
10888
11352
|
/**
|
|
10889
11353
|
* Drops elements while the filter succeeds.
|
|
10890
11354
|
*
|
|
11355
|
+
* **When to use**
|
|
11356
|
+
*
|
|
11357
|
+
* Use when you need to remove a leading stream prefix based on a synchronous
|
|
11358
|
+
* `Filter` result while preserving the remaining original stream elements.
|
|
11359
|
+
*
|
|
11360
|
+
* **Details**
|
|
11361
|
+
*
|
|
11362
|
+
* `Result.succeed` drops the current element. The first `Result.fail` stops
|
|
11363
|
+
* dropping, emits that original element, and the rest of the source stream is
|
|
11364
|
+
* emitted without further filtering.
|
|
11365
|
+
*
|
|
11366
|
+
* @see {@link dropWhile} for boolean predicate prefix dropping
|
|
11367
|
+
* @see {@link takeWhileFilter} for keeping the accepted prefix as filter success values
|
|
11368
|
+
* @see {@link dropWhileEffect} for effectful predicate prefix dropping
|
|
11369
|
+
*
|
|
10891
11370
|
* @category filtering
|
|
10892
11371
|
* @since 4.0.0
|
|
10893
11372
|
*/
|
|
@@ -10895,6 +11374,21 @@ export const dropWhileFilter: {
|
|
|
10895
11374
|
/**
|
|
10896
11375
|
* Drops elements while the filter succeeds.
|
|
10897
11376
|
*
|
|
11377
|
+
* **When to use**
|
|
11378
|
+
*
|
|
11379
|
+
* Use when you need to remove a leading stream prefix based on a synchronous
|
|
11380
|
+
* `Filter` result while preserving the remaining original stream elements.
|
|
11381
|
+
*
|
|
11382
|
+
* **Details**
|
|
11383
|
+
*
|
|
11384
|
+
* `Result.succeed` drops the current element. The first `Result.fail` stops
|
|
11385
|
+
* dropping, emits that original element, and the rest of the source stream is
|
|
11386
|
+
* emitted without further filtering.
|
|
11387
|
+
*
|
|
11388
|
+
* @see {@link dropWhile} for boolean predicate prefix dropping
|
|
11389
|
+
* @see {@link takeWhileFilter} for keeping the accepted prefix as filter success values
|
|
11390
|
+
* @see {@link dropWhileEffect} for effectful predicate prefix dropping
|
|
11391
|
+
*
|
|
10898
11392
|
* @category filtering
|
|
10899
11393
|
* @since 4.0.0
|
|
10900
11394
|
*/
|
|
@@ -11166,7 +11660,7 @@ export const dropRight: {
|
|
|
11166
11660
|
* // Output: [ [ 1, 2 ], [ 3, 4 ] ]
|
|
11167
11661
|
* ```
|
|
11168
11662
|
*
|
|
11169
|
-
* @category
|
|
11663
|
+
* @category grouping
|
|
11170
11664
|
* @since 2.0.0
|
|
11171
11665
|
*/
|
|
11172
11666
|
export const chunks = <A, E, R>(self: Stream<A, E, R>): Stream<Arr.NonEmptyReadonlyArray<A>, E, R> =>
|
|
@@ -11176,7 +11670,7 @@ export const chunks = <A, E, R>(self: Stream<A, E, R>): Stream<Arr.NonEmptyReado
|
|
|
11176
11670
|
)
|
|
11177
11671
|
|
|
11178
11672
|
/**
|
|
11179
|
-
*
|
|
11673
|
+
* Groups the stream into arrays of the specified size, preserving element order.
|
|
11180
11674
|
*
|
|
11181
11675
|
* **Details**
|
|
11182
11676
|
*
|
|
@@ -11200,12 +11694,12 @@ export const chunks = <A, E, R>(self: Stream<A, E, R>): Stream<Arr.NonEmptyReado
|
|
|
11200
11694
|
* // Output: [ [ 1, 2 ], [ 3, 4 ], [ 5 ] ]
|
|
11201
11695
|
* ```
|
|
11202
11696
|
*
|
|
11203
|
-
* @category
|
|
11697
|
+
* @category grouping
|
|
11204
11698
|
* @since 2.0.0
|
|
11205
11699
|
*/
|
|
11206
11700
|
export const rechunk: {
|
|
11207
11701
|
/**
|
|
11208
|
-
*
|
|
11702
|
+
* Groups the stream into arrays of the specified size, preserving element order.
|
|
11209
11703
|
*
|
|
11210
11704
|
* **Details**
|
|
11211
11705
|
*
|
|
@@ -11229,12 +11723,12 @@ export const rechunk: {
|
|
|
11229
11723
|
* // Output: [ [ 1, 2 ], [ 3, 4 ], [ 5 ] ]
|
|
11230
11724
|
* ```
|
|
11231
11725
|
*
|
|
11232
|
-
* @category
|
|
11726
|
+
* @category grouping
|
|
11233
11727
|
* @since 2.0.0
|
|
11234
11728
|
*/
|
|
11235
11729
|
(size: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
11236
11730
|
/**
|
|
11237
|
-
*
|
|
11731
|
+
* Groups the stream into arrays of the specified size, preserving element order.
|
|
11238
11732
|
*
|
|
11239
11733
|
* **Details**
|
|
11240
11734
|
*
|
|
@@ -11258,7 +11752,7 @@ export const rechunk: {
|
|
|
11258
11752
|
* // Output: [ [ 1, 2 ], [ 3, 4 ], [ 5 ] ]
|
|
11259
11753
|
* ```
|
|
11260
11754
|
*
|
|
11261
|
-
* @category
|
|
11755
|
+
* @category grouping
|
|
11262
11756
|
* @since 2.0.0
|
|
11263
11757
|
*/
|
|
11264
11758
|
<A, E, R>(self: Stream<A, E, R>, size: number): Stream<A, E, R>
|
|
@@ -11267,7 +11761,7 @@ export const rechunk: {
|
|
|
11267
11761
|
return transformPull(self, (pull, _scope) =>
|
|
11268
11762
|
Effect.sync(() => {
|
|
11269
11763
|
let chunk = Arr.empty</**
|
|
11270
|
-
*
|
|
11764
|
+
* Groups the stream into arrays of the specified size, preserving element order.
|
|
11271
11765
|
*
|
|
11272
11766
|
* **Details**
|
|
11273
11767
|
*
|
|
@@ -11291,7 +11785,7 @@ export const rechunk: {
|
|
|
11291
11785
|
* // Output: [ [ 1, 2 ], [ 3, 4 ], [ 5 ] ]
|
|
11292
11786
|
* ```
|
|
11293
11787
|
*
|
|
11294
|
-
* @category
|
|
11788
|
+
* @category grouping
|
|
11295
11789
|
* @since 2.0.0
|
|
11296
11790
|
*/
|
|
11297
11791
|
A>() as Arr.NonEmptyArray<A>
|
|
@@ -11355,7 +11849,7 @@ export const rechunk: {
|
|
|
11355
11849
|
* // Output: [ [1, 2], [2, 3], [3, 4], [4, 5] ]
|
|
11356
11850
|
* ```
|
|
11357
11851
|
*
|
|
11358
|
-
* @category
|
|
11852
|
+
* @category grouping
|
|
11359
11853
|
* @since 2.0.0
|
|
11360
11854
|
*/
|
|
11361
11855
|
export const sliding: {
|
|
@@ -11378,7 +11872,7 @@ export const sliding: {
|
|
|
11378
11872
|
* // Output: [ [1, 2], [2, 3], [3, 4], [4, 5] ]
|
|
11379
11873
|
* ```
|
|
11380
11874
|
*
|
|
11381
|
-
* @category
|
|
11875
|
+
* @category grouping
|
|
11382
11876
|
* @since 2.0.0
|
|
11383
11877
|
*/
|
|
11384
11878
|
(chunkSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>
|
|
@@ -11401,7 +11895,7 @@ export const sliding: {
|
|
|
11401
11895
|
* // Output: [ [1, 2], [2, 3], [3, 4], [4, 5] ]
|
|
11402
11896
|
* ```
|
|
11403
11897
|
*
|
|
11404
|
-
* @category
|
|
11898
|
+
* @category grouping
|
|
11405
11899
|
* @since 2.0.0
|
|
11406
11900
|
*/
|
|
11407
11901
|
<A, E, R>(self: Stream<A, E, R>, chunkSize: number): Stream<Arr.NonEmptyReadonlyArray<A>, E, R>
|
|
@@ -11431,7 +11925,7 @@ export const sliding: {
|
|
|
11431
11925
|
* // Output: [ [ 1, 2, 3 ], [ 3, 4, 5 ] ]
|
|
11432
11926
|
* ```
|
|
11433
11927
|
*
|
|
11434
|
-
* @category
|
|
11928
|
+
* @category grouping
|
|
11435
11929
|
* @since 2.0.0
|
|
11436
11930
|
*/
|
|
11437
11931
|
export const slidingSize: {
|
|
@@ -11455,7 +11949,7 @@ export const slidingSize: {
|
|
|
11455
11949
|
* // Output: [ [ 1, 2, 3 ], [ 3, 4, 5 ] ]
|
|
11456
11950
|
* ```
|
|
11457
11951
|
*
|
|
11458
|
-
* @category
|
|
11952
|
+
* @category grouping
|
|
11459
11953
|
* @since 2.0.0
|
|
11460
11954
|
*/
|
|
11461
11955
|
(chunkSize: number, stepSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>
|
|
@@ -11479,7 +11973,7 @@ export const slidingSize: {
|
|
|
11479
11973
|
* // Output: [ [ 1, 2, 3 ], [ 3, 4, 5 ] ]
|
|
11480
11974
|
* ```
|
|
11481
11975
|
*
|
|
11482
|
-
* @category
|
|
11976
|
+
* @category grouping
|
|
11483
11977
|
* @since 2.0.0
|
|
11484
11978
|
*/
|
|
11485
11979
|
<A, E, R>(self: Stream<A, E, R>, chunkSize: number, stepSize: number): Stream<Arr.NonEmptyReadonlyArray<A>, E, R>
|
|
@@ -11509,7 +12003,7 @@ export const slidingSize: {
|
|
|
11509
12003
|
* // Output: [ [ 1, 2, 3 ], [ 3, 4, 5 ] ]
|
|
11510
12004
|
* ```
|
|
11511
12005
|
*
|
|
11512
|
-
* @category
|
|
12006
|
+
* @category grouping
|
|
11513
12007
|
* @since 2.0.0
|
|
11514
12008
|
*/
|
|
11515
12009
|
A>()
|
|
@@ -11573,7 +12067,7 @@ export const slidingSize: {
|
|
|
11573
12067
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
11574
12068
|
* ```
|
|
11575
12069
|
*
|
|
11576
|
-
* @category
|
|
12070
|
+
* @category grouping
|
|
11577
12071
|
* @since 2.0.0
|
|
11578
12072
|
*/
|
|
11579
12073
|
export const split: {
|
|
@@ -11601,7 +12095,7 @@ export const split: {
|
|
|
11601
12095
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
11602
12096
|
* ```
|
|
11603
12097
|
*
|
|
11604
|
-
* @category
|
|
12098
|
+
* @category grouping
|
|
11605
12099
|
* @since 2.0.0
|
|
11606
12100
|
*/
|
|
11607
12101
|
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<Exclude<A, B>>, E, R>
|
|
@@ -11629,7 +12123,7 @@ export const split: {
|
|
|
11629
12123
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
11630
12124
|
* ```
|
|
11631
12125
|
*
|
|
11632
|
-
* @category
|
|
12126
|
+
* @category grouping
|
|
11633
12127
|
* @since 2.0.0
|
|
11634
12128
|
*/
|
|
11635
12129
|
<A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>
|
|
@@ -11657,7 +12151,7 @@ export const split: {
|
|
|
11657
12151
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
11658
12152
|
* ```
|
|
11659
12153
|
*
|
|
11660
|
-
* @category
|
|
12154
|
+
* @category grouping
|
|
11661
12155
|
* @since 2.0.0
|
|
11662
12156
|
*/
|
|
11663
12157
|
<A, E, R, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<Arr.NonEmptyReadonlyArray<Exclude<A, B>>, E, R>
|
|
@@ -11685,7 +12179,7 @@ export const split: {
|
|
|
11685
12179
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
11686
12180
|
* ```
|
|
11687
12181
|
*
|
|
11688
|
-
* @category
|
|
12182
|
+
* @category grouping
|
|
11689
12183
|
* @since 2.0.0
|
|
11690
12184
|
*/
|
|
11691
12185
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<Arr.NonEmptyReadonlyArray<A>, E, R>
|
|
@@ -11718,7 +12212,7 @@ export const split: {
|
|
|
11718
12212
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
11719
12213
|
* ```
|
|
11720
12214
|
*
|
|
11721
|
-
* @category
|
|
12215
|
+
* @category grouping
|
|
11722
12216
|
* @since 2.0.0
|
|
11723
12217
|
*/
|
|
11724
12218
|
Arr.NonEmptyReadonlyArray<A>>()
|
|
@@ -11888,11 +12382,18 @@ export const combine: {
|
|
|
11888
12382
|
))
|
|
11889
12383
|
|
|
11890
12384
|
/**
|
|
11891
|
-
* Combines
|
|
11892
|
-
*
|
|
11893
|
-
*
|
|
11894
|
-
*
|
|
11895
|
-
*
|
|
12385
|
+
* Combines two streams chunk-by-chunk with a stateful pull function.
|
|
12386
|
+
*
|
|
12387
|
+
* **When to use**
|
|
12388
|
+
*
|
|
12389
|
+
* Use to coordinate pulling chunks from two streams when each emitted chunk
|
|
12390
|
+
* depends on both sides and local state.
|
|
12391
|
+
*
|
|
12392
|
+
* **Details**
|
|
12393
|
+
*
|
|
12394
|
+
* The combining function receives the current state and pull functions for the
|
|
12395
|
+
* left and right streams. It returns the next non-empty chunk together with the
|
|
12396
|
+
* next state.
|
|
11896
12397
|
*
|
|
11897
12398
|
* **Example** (Combining stream chunks with state)
|
|
11898
12399
|
*
|
|
@@ -11925,11 +12426,18 @@ export const combine: {
|
|
|
11925
12426
|
*/
|
|
11926
12427
|
export const combineArray: {
|
|
11927
12428
|
/**
|
|
11928
|
-
* Combines
|
|
11929
|
-
*
|
|
11930
|
-
*
|
|
11931
|
-
*
|
|
11932
|
-
*
|
|
12429
|
+
* Combines two streams chunk-by-chunk with a stateful pull function.
|
|
12430
|
+
*
|
|
12431
|
+
* **When to use**
|
|
12432
|
+
*
|
|
12433
|
+
* Use to coordinate pulling chunks from two streams when each emitted chunk
|
|
12434
|
+
* depends on both sides and local state.
|
|
12435
|
+
*
|
|
12436
|
+
* **Details**
|
|
12437
|
+
*
|
|
12438
|
+
* The combining function receives the current state and pull functions for the
|
|
12439
|
+
* left and right streams. It returns the next non-empty chunk together with the
|
|
12440
|
+
* next state.
|
|
11933
12441
|
*
|
|
11934
12442
|
* **Example** (Combining stream chunks with state)
|
|
11935
12443
|
*
|
|
@@ -11970,11 +12478,18 @@ export const combineArray: {
|
|
|
11970
12478
|
) => Effect.Effect<readonly [Arr.NonEmptyReadonlyArray<A3>, S], E3, R3>
|
|
11971
12479
|
): <R>(self: Stream<A, E, R>) => Stream<A3, Pull.ExcludeDone<E3>, R2 | R3 | R>
|
|
11972
12480
|
/**
|
|
11973
|
-
* Combines
|
|
11974
|
-
*
|
|
11975
|
-
*
|
|
11976
|
-
*
|
|
11977
|
-
*
|
|
12481
|
+
* Combines two streams chunk-by-chunk with a stateful pull function.
|
|
12482
|
+
*
|
|
12483
|
+
* **When to use**
|
|
12484
|
+
*
|
|
12485
|
+
* Use to coordinate pulling chunks from two streams when each emitted chunk
|
|
12486
|
+
* depends on both sides and local state.
|
|
12487
|
+
*
|
|
12488
|
+
* **Details**
|
|
12489
|
+
*
|
|
12490
|
+
* The combining function receives the current state and pull functions for the
|
|
12491
|
+
* left and right streams. It returns the next non-empty chunk together with the
|
|
12492
|
+
* next state.
|
|
11978
12493
|
*
|
|
11979
12494
|
* **Example** (Combining stream chunks with state)
|
|
11980
12495
|
*
|
|
@@ -12033,7 +12548,7 @@ export const combineArray: {
|
|
|
12033
12548
|
)))
|
|
12034
12549
|
|
|
12035
12550
|
/**
|
|
12036
|
-
*
|
|
12551
|
+
* Maps elements statefully, emitting zero or more outputs per input.
|
|
12037
12552
|
*
|
|
12038
12553
|
* **Example** (Statefully mapping stream values)
|
|
12039
12554
|
*
|
|
@@ -12061,7 +12576,7 @@ export const combineArray: {
|
|
|
12061
12576
|
*/
|
|
12062
12577
|
export const mapAccum: {
|
|
12063
12578
|
/**
|
|
12064
|
-
*
|
|
12579
|
+
* Maps elements statefully, emitting zero or more outputs per input.
|
|
12065
12580
|
*
|
|
12066
12581
|
* **Example** (Statefully mapping stream values)
|
|
12067
12582
|
*
|
|
@@ -12095,7 +12610,7 @@ export const mapAccum: {
|
|
|
12095
12610
|
}
|
|
12096
12611
|
): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
12097
12612
|
/**
|
|
12098
|
-
*
|
|
12613
|
+
* Maps elements statefully, emitting zero or more outputs per input.
|
|
12099
12614
|
*
|
|
12100
12615
|
* **Example** (Statefully mapping stream values)
|
|
12101
12616
|
*
|
|
@@ -12142,7 +12657,7 @@ export const mapAccum: {
|
|
|
12142
12657
|
initial,
|
|
12143
12658
|
(state, arr) => {
|
|
12144
12659
|
const acc = Arr.empty</**
|
|
12145
|
-
*
|
|
12660
|
+
* Maps elements statefully, emitting zero or more outputs per input.
|
|
12146
12661
|
*
|
|
12147
12662
|
* **Example** (Statefully mapping stream values)
|
|
12148
12663
|
*
|
|
@@ -12187,7 +12702,7 @@ export const mapAccum: {
|
|
|
12187
12702
|
)))
|
|
12188
12703
|
|
|
12189
12704
|
/**
|
|
12190
|
-
*
|
|
12705
|
+
* Maps over non-empty chunk arrays statefully, emitting zero or more values per chunk.
|
|
12191
12706
|
*
|
|
12192
12707
|
* **Details**
|
|
12193
12708
|
*
|
|
@@ -12219,7 +12734,7 @@ export const mapAccum: {
|
|
|
12219
12734
|
*/
|
|
12220
12735
|
export const mapAccumArray: {
|
|
12221
12736
|
/**
|
|
12222
|
-
*
|
|
12737
|
+
* Maps over non-empty chunk arrays statefully, emitting zero or more values per chunk.
|
|
12223
12738
|
*
|
|
12224
12739
|
* **Details**
|
|
12225
12740
|
*
|
|
@@ -12257,7 +12772,7 @@ export const mapAccumArray: {
|
|
|
12257
12772
|
}
|
|
12258
12773
|
): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
12259
12774
|
/**
|
|
12260
|
-
*
|
|
12775
|
+
* Maps over non-empty chunk arrays statefully, emitting zero or more values per chunk.
|
|
12261
12776
|
*
|
|
12262
12777
|
* **Details**
|
|
12263
12778
|
*
|
|
@@ -12324,7 +12839,7 @@ export const mapAccumArray: {
|
|
|
12324
12839
|
const emptyArr = Arr.empty<never>()
|
|
12325
12840
|
|
|
12326
12841
|
/**
|
|
12327
|
-
*
|
|
12842
|
+
* Maps each element statefully and effectfully, emitting zero or more output
|
|
12328
12843
|
* values per input.
|
|
12329
12844
|
*
|
|
12330
12845
|
* **Details**
|
|
@@ -12358,7 +12873,7 @@ const emptyArr = Arr.empty<never>()
|
|
|
12358
12873
|
*/
|
|
12359
12874
|
export const mapAccumEffect: {
|
|
12360
12875
|
/**
|
|
12361
|
-
*
|
|
12876
|
+
* Maps each element statefully and effectfully, emitting zero or more output
|
|
12362
12877
|
* values per input.
|
|
12363
12878
|
*
|
|
12364
12879
|
* **Details**
|
|
@@ -12398,7 +12913,7 @@ export const mapAccumEffect: {
|
|
|
12398
12913
|
}
|
|
12399
12914
|
): <E, R>(self: Stream<A, E, R>) => Stream<B, E | E2, R | R2>
|
|
12400
12915
|
/**
|
|
12401
|
-
*
|
|
12916
|
+
* Maps each element statefully and effectfully, emitting zero or more output
|
|
12402
12917
|
* values per input.
|
|
12403
12918
|
*
|
|
12404
12919
|
* **Details**
|
|
@@ -12456,7 +12971,7 @@ export const mapAccumEffect: {
|
|
|
12456
12971
|
([state, values]) => [
|
|
12457
12972
|
state,
|
|
12458
12973
|
Arr.isReadonlyArrayNonEmpty(values) ? Arr.of(values) : Arr.empty</**
|
|
12459
|
-
*
|
|
12974
|
+
* Maps each element statefully and effectfully, emitting zero or more output
|
|
12460
12975
|
* values per input.
|
|
12461
12976
|
*
|
|
12462
12977
|
* **Details**
|
|
@@ -12504,7 +13019,7 @@ export const mapAccumEffect: {
|
|
|
12504
13019
|
))
|
|
12505
13020
|
|
|
12506
13021
|
/**
|
|
12507
|
-
*
|
|
13022
|
+
* Maps each non-empty input chunk statefully and effectfully, emitting zero or
|
|
12508
13023
|
* more output values per chunk.
|
|
12509
13024
|
*
|
|
12510
13025
|
* **Details**
|
|
@@ -12540,7 +13055,7 @@ export const mapAccumEffect: {
|
|
|
12540
13055
|
*/
|
|
12541
13056
|
export const mapAccumArrayEffect: {
|
|
12542
13057
|
/**
|
|
12543
|
-
*
|
|
13058
|
+
* Maps each non-empty input chunk statefully and effectfully, emitting zero or
|
|
12544
13059
|
* more output values per chunk.
|
|
12545
13060
|
*
|
|
12546
13061
|
* **Details**
|
|
@@ -12582,7 +13097,7 @@ export const mapAccumArrayEffect: {
|
|
|
12582
13097
|
}
|
|
12583
13098
|
): <E, R>(self: Stream<A, E, R>) => Stream<B, E | E2, R | R2>
|
|
12584
13099
|
/**
|
|
12585
|
-
*
|
|
13100
|
+
* Maps each non-empty input chunk statefully and effectfully, emitting zero or
|
|
12586
13101
|
* more output values per chunk.
|
|
12587
13102
|
*
|
|
12588
13103
|
* **Details**
|
|
@@ -12772,7 +13287,7 @@ export const scan: {
|
|
|
12772
13287
|
}))
|
|
12773
13288
|
|
|
12774
13289
|
/**
|
|
12775
|
-
*
|
|
13290
|
+
* Accumulates state effectfully and emits the initial state plus each accumulated state.
|
|
12776
13291
|
*
|
|
12777
13292
|
* **Example** (Effectfully scanning stream state)
|
|
12778
13293
|
*
|
|
@@ -12794,7 +13309,7 @@ export const scan: {
|
|
|
12794
13309
|
*/
|
|
12795
13310
|
export const scanEffect: {
|
|
12796
13311
|
/**
|
|
12797
|
-
*
|
|
13312
|
+
* Accumulates state effectfully and emits the initial state plus each accumulated state.
|
|
12798
13313
|
*
|
|
12799
13314
|
* **Example** (Effectfully scanning stream state)
|
|
12800
13315
|
*
|
|
@@ -12816,7 +13331,7 @@ export const scanEffect: {
|
|
|
12816
13331
|
*/
|
|
12817
13332
|
<S, A, E2, R2>(initial: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<S, E | E2, R | R2>
|
|
12818
13333
|
/**
|
|
12819
|
-
*
|
|
13334
|
+
* Accumulates state effectfully and emits the initial state plus each accumulated state.
|
|
12820
13335
|
*
|
|
12821
13336
|
* **Example** (Effectfully scanning stream state)
|
|
12822
13337
|
*
|
|
@@ -12874,7 +13389,7 @@ export const scanEffect: {
|
|
|
12874
13389
|
* })
|
|
12875
13390
|
* ```
|
|
12876
13391
|
*
|
|
12877
|
-
* @category
|
|
13392
|
+
* @category rate limiting
|
|
12878
13393
|
* @since 2.0.0
|
|
12879
13394
|
*/
|
|
12880
13395
|
export const debounce: {
|
|
@@ -12899,7 +13414,7 @@ export const debounce: {
|
|
|
12899
13414
|
* })
|
|
12900
13415
|
* ```
|
|
12901
13416
|
*
|
|
12902
|
-
* @category
|
|
13417
|
+
* @category rate limiting
|
|
12903
13418
|
* @since 2.0.0
|
|
12904
13419
|
*/
|
|
12905
13420
|
(duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
@@ -12924,7 +13439,7 @@ export const debounce: {
|
|
|
12924
13439
|
* })
|
|
12925
13440
|
* ```
|
|
12926
13441
|
*
|
|
12927
|
-
* @category
|
|
13442
|
+
* @category rate limiting
|
|
12928
13443
|
* @since 2.0.0
|
|
12929
13444
|
*/
|
|
12930
13445
|
<A, E, R>(self: Stream<A, E, R>, duration: Duration.Input): Stream<A, E, R>
|
|
@@ -12999,13 +13514,17 @@ export const debounce: {
|
|
|
12999
13514
|
)
|
|
13000
13515
|
|
|
13001
13516
|
/**
|
|
13002
|
-
*
|
|
13003
|
-
*
|
|
13004
|
-
*
|
|
13005
|
-
*
|
|
13517
|
+
* Rate-limits stream chunks with an effectful cost function.
|
|
13518
|
+
*
|
|
13519
|
+
* **When to use**
|
|
13520
|
+
*
|
|
13521
|
+
* Use to throttle chunks when computing each chunk's cost requires an effect.
|
|
13006
13522
|
*
|
|
13007
13523
|
* **Details**
|
|
13008
13524
|
*
|
|
13525
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
13526
|
+
* and each chunk consumes the cost returned by the effectful `cost` function.
|
|
13527
|
+
*
|
|
13009
13528
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
13010
13529
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
13011
13530
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -13034,18 +13553,22 @@ export const debounce: {
|
|
|
13034
13553
|
* // Output: [0, 1, 2, 3, 4, 5]
|
|
13035
13554
|
* ```
|
|
13036
13555
|
*
|
|
13037
|
-
* @category
|
|
13556
|
+
* @category rate limiting
|
|
13038
13557
|
* @since 2.0.0
|
|
13039
13558
|
*/
|
|
13040
13559
|
export const throttleEffect: {
|
|
13041
13560
|
/**
|
|
13042
|
-
*
|
|
13043
|
-
*
|
|
13044
|
-
*
|
|
13045
|
-
*
|
|
13561
|
+
* Rate-limits stream chunks with an effectful cost function.
|
|
13562
|
+
*
|
|
13563
|
+
* **When to use**
|
|
13564
|
+
*
|
|
13565
|
+
* Use to throttle chunks when computing each chunk's cost requires an effect.
|
|
13046
13566
|
*
|
|
13047
13567
|
* **Details**
|
|
13048
13568
|
*
|
|
13569
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
13570
|
+
* and each chunk consumes the cost returned by the effectful `cost` function.
|
|
13571
|
+
*
|
|
13049
13572
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
13050
13573
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
13051
13574
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -13074,7 +13597,7 @@ export const throttleEffect: {
|
|
|
13074
13597
|
* // Output: [0, 1, 2, 3, 4, 5]
|
|
13075
13598
|
* ```
|
|
13076
13599
|
*
|
|
13077
|
-
* @category
|
|
13600
|
+
* @category rate limiting
|
|
13078
13601
|
* @since 2.0.0
|
|
13079
13602
|
*/
|
|
13080
13603
|
<A, E2, R2>(
|
|
@@ -13087,13 +13610,17 @@ export const throttleEffect: {
|
|
|
13087
13610
|
}
|
|
13088
13611
|
): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
13089
13612
|
/**
|
|
13090
|
-
*
|
|
13091
|
-
*
|
|
13092
|
-
*
|
|
13093
|
-
*
|
|
13613
|
+
* Rate-limits stream chunks with an effectful cost function.
|
|
13614
|
+
*
|
|
13615
|
+
* **When to use**
|
|
13616
|
+
*
|
|
13617
|
+
* Use to throttle chunks when computing each chunk's cost requires an effect.
|
|
13094
13618
|
*
|
|
13095
13619
|
* **Details**
|
|
13096
13620
|
*
|
|
13621
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
13622
|
+
* and each chunk consumes the cost returned by the effectful `cost` function.
|
|
13623
|
+
*
|
|
13097
13624
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
13098
13625
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
13099
13626
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -13122,7 +13649,7 @@ export const throttleEffect: {
|
|
|
13122
13649
|
* // Output: [0, 1, 2, 3, 4, 5]
|
|
13123
13650
|
* ```
|
|
13124
13651
|
*
|
|
13125
|
-
* @category
|
|
13652
|
+
* @category rate limiting
|
|
13126
13653
|
* @since 2.0.0
|
|
13127
13654
|
*/
|
|
13128
13655
|
<A, E, R, E2, R2>(
|
|
@@ -13239,12 +13766,17 @@ const throttleShapeEffect = <A, E, R, E2, R2>(
|
|
|
13239
13766
|
}))
|
|
13240
13767
|
|
|
13241
13768
|
/**
|
|
13242
|
-
*
|
|
13243
|
-
*
|
|
13244
|
-
*
|
|
13769
|
+
* Rate-limits stream chunks with a synchronous cost function.
|
|
13770
|
+
*
|
|
13771
|
+
* **When to use**
|
|
13772
|
+
*
|
|
13773
|
+
* Use to throttle chunks when each chunk's cost can be computed synchronously.
|
|
13245
13774
|
*
|
|
13246
13775
|
* **Details**
|
|
13247
13776
|
*
|
|
13777
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
13778
|
+
* and each chunk consumes the cost returned by `cost`.
|
|
13779
|
+
*
|
|
13248
13780
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
13249
13781
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
13250
13782
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -13273,17 +13805,22 @@ const throttleShapeEffect = <A, E, R, E2, R2>(
|
|
|
13273
13805
|
* })
|
|
13274
13806
|
* ```
|
|
13275
13807
|
*
|
|
13276
|
-
* @category
|
|
13808
|
+
* @category rate limiting
|
|
13277
13809
|
* @since 2.0.0
|
|
13278
13810
|
*/
|
|
13279
13811
|
export const throttle: {
|
|
13280
13812
|
/**
|
|
13281
|
-
*
|
|
13282
|
-
*
|
|
13283
|
-
*
|
|
13813
|
+
* Rate-limits stream chunks with a synchronous cost function.
|
|
13814
|
+
*
|
|
13815
|
+
* **When to use**
|
|
13816
|
+
*
|
|
13817
|
+
* Use to throttle chunks when each chunk's cost can be computed synchronously.
|
|
13284
13818
|
*
|
|
13285
13819
|
* **Details**
|
|
13286
13820
|
*
|
|
13821
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
13822
|
+
* and each chunk consumes the cost returned by `cost`.
|
|
13823
|
+
*
|
|
13287
13824
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
13288
13825
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
13289
13826
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -13312,7 +13849,7 @@ export const throttle: {
|
|
|
13312
13849
|
* })
|
|
13313
13850
|
* ```
|
|
13314
13851
|
*
|
|
13315
|
-
* @category
|
|
13852
|
+
* @category rate limiting
|
|
13316
13853
|
* @since 2.0.0
|
|
13317
13854
|
*/
|
|
13318
13855
|
<A>(
|
|
@@ -13325,12 +13862,17 @@ export const throttle: {
|
|
|
13325
13862
|
}
|
|
13326
13863
|
): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
13327
13864
|
/**
|
|
13328
|
-
*
|
|
13329
|
-
*
|
|
13330
|
-
*
|
|
13865
|
+
* Rate-limits stream chunks with a synchronous cost function.
|
|
13866
|
+
*
|
|
13867
|
+
* **When to use**
|
|
13868
|
+
*
|
|
13869
|
+
* Use to throttle chunks when each chunk's cost can be computed synchronously.
|
|
13331
13870
|
*
|
|
13332
13871
|
* **Details**
|
|
13333
13872
|
*
|
|
13873
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
13874
|
+
* and each chunk consumes the cost returned by `cost`.
|
|
13875
|
+
*
|
|
13334
13876
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
13335
13877
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
13336
13878
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -13359,7 +13901,7 @@ export const throttle: {
|
|
|
13359
13901
|
* })
|
|
13360
13902
|
* ```
|
|
13361
13903
|
*
|
|
13362
|
-
* @category
|
|
13904
|
+
* @category rate limiting
|
|
13363
13905
|
* @since 2.0.0
|
|
13364
13906
|
*/
|
|
13365
13907
|
<A, E, R>(
|
|
@@ -13414,7 +13956,7 @@ export const throttle: {
|
|
|
13414
13956
|
* // Output: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8 ] ]
|
|
13415
13957
|
* ```
|
|
13416
13958
|
*
|
|
13417
|
-
* @category
|
|
13959
|
+
* @category grouping
|
|
13418
13960
|
* @since 2.0.0
|
|
13419
13961
|
*/
|
|
13420
13962
|
export const grouped: {
|
|
@@ -13442,7 +13984,7 @@ export const grouped: {
|
|
|
13442
13984
|
* // Output: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8 ] ]
|
|
13443
13985
|
* ```
|
|
13444
13986
|
*
|
|
13445
|
-
* @category
|
|
13987
|
+
* @category grouping
|
|
13446
13988
|
* @since 2.0.0
|
|
13447
13989
|
*/
|
|
13448
13990
|
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>
|
|
@@ -13470,7 +14012,7 @@ export const grouped: {
|
|
|
13470
14012
|
* // Output: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8 ] ]
|
|
13471
14013
|
* ```
|
|
13472
14014
|
*
|
|
13473
|
-
* @category
|
|
14015
|
+
* @category grouping
|
|
13474
14016
|
* @since 2.0.0
|
|
13475
14017
|
*/
|
|
13476
14018
|
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<Arr.NonEmptyReadonlyArray<A>, E, R>
|
|
@@ -13500,7 +14042,7 @@ export const grouped: {
|
|
|
13500
14042
|
* // Output: [ [ 1, 2 ], [ 3 ] ]
|
|
13501
14043
|
* ```
|
|
13502
14044
|
*
|
|
13503
|
-
* @category
|
|
14045
|
+
* @category grouping
|
|
13504
14046
|
* @since 2.0.0
|
|
13505
14047
|
*/
|
|
13506
14048
|
export const groupedWithin: {
|
|
@@ -13525,7 +14067,7 @@ export const groupedWithin: {
|
|
|
13525
14067
|
* // Output: [ [ 1, 2 ], [ 3 ] ]
|
|
13526
14068
|
* ```
|
|
13527
14069
|
*
|
|
13528
|
-
* @category
|
|
14070
|
+
* @category grouping
|
|
13529
14071
|
* @since 2.0.0
|
|
13530
14072
|
*/
|
|
13531
14073
|
(chunkSize: number, duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<Array<A>, E, R>
|
|
@@ -13550,7 +14092,7 @@ export const groupedWithin: {
|
|
|
13550
14092
|
* // Output: [ [ 1, 2 ], [ 3 ] ]
|
|
13551
14093
|
* ```
|
|
13552
14094
|
*
|
|
13553
|
-
* @category
|
|
14095
|
+
* @category grouping
|
|
13554
14096
|
* @since 2.0.0
|
|
13555
14097
|
*/
|
|
13556
14098
|
<A, E, R>(self: Stream<A, E, R>, chunkSize: number, duration: Duration.Input): Stream<Array<A>, E, R>
|
|
@@ -13594,7 +14136,7 @@ export const groupedWithin: {
|
|
|
13594
14136
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
13595
14137
|
* ```
|
|
13596
14138
|
*
|
|
13597
|
-
* @category
|
|
14139
|
+
* @category grouping
|
|
13598
14140
|
* @since 2.0.0
|
|
13599
14141
|
*/
|
|
13600
14142
|
export const groupBy: {
|
|
@@ -13627,7 +14169,7 @@ export const groupBy: {
|
|
|
13627
14169
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
13628
14170
|
* ```
|
|
13629
14171
|
*
|
|
13630
|
-
* @category
|
|
14172
|
+
* @category grouping
|
|
13631
14173
|
* @since 2.0.0
|
|
13632
14174
|
*/
|
|
13633
14175
|
<A, K, V, E2, R2>(
|
|
@@ -13666,7 +14208,7 @@ export const groupBy: {
|
|
|
13666
14208
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
13667
14209
|
* ```
|
|
13668
14210
|
*
|
|
13669
|
-
* @category
|
|
14211
|
+
* @category grouping
|
|
13670
14212
|
* @since 2.0.0
|
|
13671
14213
|
*/
|
|
13672
14214
|
<A, E, R, K, V, E2, R2>(
|
|
@@ -13728,7 +14270,7 @@ export const groupBy: {
|
|
|
13728
14270
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
13729
14271
|
* ```
|
|
13730
14272
|
*
|
|
13731
|
-
* @category
|
|
14273
|
+
* @category grouping
|
|
13732
14274
|
* @since 2.0.0
|
|
13733
14275
|
*/
|
|
13734
14276
|
export const groupByKey: {
|
|
@@ -13759,7 +14301,7 @@ export const groupByKey: {
|
|
|
13759
14301
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
13760
14302
|
* ```
|
|
13761
14303
|
*
|
|
13762
|
-
* @category
|
|
14304
|
+
* @category grouping
|
|
13763
14305
|
* @since 2.0.0
|
|
13764
14306
|
*/
|
|
13765
14307
|
<A, K>(
|
|
@@ -13796,7 +14338,7 @@ export const groupByKey: {
|
|
|
13796
14338
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
13797
14339
|
* ```
|
|
13798
14340
|
*
|
|
13799
|
-
* @category
|
|
14341
|
+
* @category grouping
|
|
13800
14342
|
* @since 2.0.0
|
|
13801
14343
|
*/
|
|
13802
14344
|
<A, E, R, K>(
|
|
@@ -13843,7 +14385,7 @@ export const groupByKey: {
|
|
|
13843
14385
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
13844
14386
|
* ```
|
|
13845
14387
|
*
|
|
13846
|
-
* @category
|
|
14388
|
+
* @category grouping
|
|
13847
14389
|
* @since 2.0.0
|
|
13848
14390
|
*/
|
|
13849
14391
|
K, /**
|
|
@@ -13873,7 +14415,7 @@ export const groupByKey: {
|
|
|
13873
14415
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
13874
14416
|
* ```
|
|
13875
14417
|
*
|
|
13876
|
-
* @category
|
|
14418
|
+
* @category grouping
|
|
13877
14419
|
* @since 2.0.0
|
|
13878
14420
|
*/
|
|
13879
14421
|
Arr.NonEmptyArray<A>>()
|
|
@@ -13955,39 +14497,66 @@ const groupByImpl = <A, E, R, K, V, E2, R2>(
|
|
|
13955
14497
|
/**
|
|
13956
14498
|
* Groups consecutive elements that have equal keys into non-empty arrays.
|
|
13957
14499
|
*
|
|
14500
|
+
* **When to use**
|
|
14501
|
+
*
|
|
14502
|
+
* Use when a stream is already ordered by the grouping key and you want to emit
|
|
14503
|
+
* each consecutive run as a non-empty array while keeping later non-adjacent
|
|
14504
|
+
* runs separate.
|
|
14505
|
+
*
|
|
13958
14506
|
* **Details**
|
|
13959
14507
|
*
|
|
13960
14508
|
* The key is computed with `f`; adjacent elements whose keys are equal by
|
|
13961
14509
|
* `Equal.equals` are emitted as one `[key, group]`. Later non-adjacent runs
|
|
13962
14510
|
* with the same key are emitted separately.
|
|
13963
14511
|
*
|
|
13964
|
-
* @
|
|
14512
|
+
* @see {@link groupByKey} for grouping all elements with the same key across the stream
|
|
14513
|
+
* @see {@link groupBy} for custom grouped stream construction
|
|
14514
|
+
*
|
|
14515
|
+
* @category grouping
|
|
13965
14516
|
* @since 2.0.0
|
|
13966
14517
|
*/
|
|
13967
14518
|
export const groupAdjacentBy: {
|
|
13968
14519
|
/**
|
|
13969
14520
|
* Groups consecutive elements that have equal keys into non-empty arrays.
|
|
13970
14521
|
*
|
|
14522
|
+
* **When to use**
|
|
14523
|
+
*
|
|
14524
|
+
* Use when a stream is already ordered by the grouping key and you want to emit
|
|
14525
|
+
* each consecutive run as a non-empty array while keeping later non-adjacent
|
|
14526
|
+
* runs separate.
|
|
14527
|
+
*
|
|
13971
14528
|
* **Details**
|
|
13972
14529
|
*
|
|
13973
14530
|
* The key is computed with `f`; adjacent elements whose keys are equal by
|
|
13974
14531
|
* `Equal.equals` are emitted as one `[key, group]`. Later non-adjacent runs
|
|
13975
14532
|
* with the same key are emitted separately.
|
|
13976
14533
|
*
|
|
13977
|
-
* @
|
|
14534
|
+
* @see {@link groupByKey} for grouping all elements with the same key across the stream
|
|
14535
|
+
* @see {@link groupBy} for custom grouped stream construction
|
|
14536
|
+
*
|
|
14537
|
+
* @category grouping
|
|
13978
14538
|
* @since 2.0.0
|
|
13979
14539
|
*/
|
|
13980
14540
|
<A, K>(f: (a: NoInfer<A>) => K): <E, R>(self: Stream<A, E, R>) => Stream<readonly [K, Arr.NonEmptyArray<A>], E, R>
|
|
13981
14541
|
/**
|
|
13982
14542
|
* Groups consecutive elements that have equal keys into non-empty arrays.
|
|
13983
14543
|
*
|
|
14544
|
+
* **When to use**
|
|
14545
|
+
*
|
|
14546
|
+
* Use when a stream is already ordered by the grouping key and you want to emit
|
|
14547
|
+
* each consecutive run as a non-empty array while keeping later non-adjacent
|
|
14548
|
+
* runs separate.
|
|
14549
|
+
*
|
|
13984
14550
|
* **Details**
|
|
13985
14551
|
*
|
|
13986
14552
|
* The key is computed with `f`; adjacent elements whose keys are equal by
|
|
13987
14553
|
* `Equal.equals` are emitted as one `[key, group]`. Later non-adjacent runs
|
|
13988
14554
|
* with the same key are emitted separately.
|
|
13989
14555
|
*
|
|
13990
|
-
* @
|
|
14556
|
+
* @see {@link groupByKey} for grouping all elements with the same key across the stream
|
|
14557
|
+
* @see {@link groupBy} for custom grouped stream construction
|
|
14558
|
+
*
|
|
14559
|
+
* @category grouping
|
|
13991
14560
|
* @since 2.0.0
|
|
13992
14561
|
*/
|
|
13993
14562
|
<A, E, R, K>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => K): Stream<readonly [K, Arr.NonEmptyArray<A>], E, R>
|
|
@@ -14002,13 +14571,22 @@ export const groupAdjacentBy: {
|
|
|
14002
14571
|
let toEmit = Arr.empty</**
|
|
14003
14572
|
* Groups consecutive elements that have equal keys into non-empty arrays.
|
|
14004
14573
|
*
|
|
14574
|
+
* **When to use**
|
|
14575
|
+
*
|
|
14576
|
+
* Use when a stream is already ordered by the grouping key and you want to emit
|
|
14577
|
+
* each consecutive run as a non-empty array while keeping later non-adjacent
|
|
14578
|
+
* runs separate.
|
|
14579
|
+
*
|
|
14005
14580
|
* **Details**
|
|
14006
14581
|
*
|
|
14007
14582
|
* The key is computed with `f`; adjacent elements whose keys are equal by
|
|
14008
14583
|
* `Equal.equals` are emitted as one `[key, group]`. Later non-adjacent runs
|
|
14009
14584
|
* with the same key are emitted separately.
|
|
14010
14585
|
*
|
|
14011
|
-
* @
|
|
14586
|
+
* @see {@link groupByKey} for grouping all elements with the same key across the stream
|
|
14587
|
+
* @see {@link groupBy} for custom grouped stream construction
|
|
14588
|
+
*
|
|
14589
|
+
* @category grouping
|
|
14012
14590
|
* @since 2.0.0
|
|
14013
14591
|
*/
|
|
14014
14592
|
readonly [K, Arr.NonEmptyArray<A>]>()
|
|
@@ -14520,7 +15098,7 @@ export const aggregateWithin: {
|
|
|
14520
15098
|
}))))
|
|
14521
15099
|
|
|
14522
15100
|
/**
|
|
14523
|
-
*
|
|
15101
|
+
* Creates a fixed-size tuple of streams that each emit
|
|
14524
15102
|
* the same elements as the source stream.
|
|
14525
15103
|
*
|
|
14526
15104
|
* **Details**
|
|
@@ -14560,7 +15138,7 @@ export const aggregateWithin: {
|
|
|
14560
15138
|
*/
|
|
14561
15139
|
export const broadcastN: {
|
|
14562
15140
|
/**
|
|
14563
|
-
*
|
|
15141
|
+
* Creates a fixed-size tuple of streams that each emit
|
|
14564
15142
|
* the same elements as the source stream.
|
|
14565
15143
|
*
|
|
14566
15144
|
* **Details**
|
|
@@ -14611,7 +15189,7 @@ export const broadcastN: {
|
|
|
14611
15189
|
}
|
|
14612
15190
|
): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<TupleOf<N, Stream<A, E>>, never, Scope.Scope | R>
|
|
14613
15191
|
/**
|
|
14614
|
-
*
|
|
15192
|
+
* Creates a fixed-size tuple of streams that each emit
|
|
14615
15193
|
* the same elements as the source stream.
|
|
14616
15194
|
*
|
|
14617
15195
|
* **Details**
|
|
@@ -14678,7 +15256,7 @@ export const broadcastN: {
|
|
|
14678
15256
|
}
|
|
14679
15257
|
) {
|
|
14680
15258
|
const pubsub = yield* makePubSub</**
|
|
14681
|
-
*
|
|
15259
|
+
* Creates a fixed-size tuple of streams that each emit
|
|
14682
15260
|
* the same elements as the source stream.
|
|
14683
15261
|
*
|
|
14684
15262
|
* **Details**
|
|
@@ -15871,7 +16449,7 @@ export const intersperse: {
|
|
|
15871
16449
|
}))
|
|
15872
16450
|
|
|
15873
16451
|
/**
|
|
15874
|
-
*
|
|
16452
|
+
* Adds a start value, middle value, and end value around stream elements.
|
|
15875
16453
|
*
|
|
15876
16454
|
* **Details**
|
|
15877
16455
|
*
|
|
@@ -15900,7 +16478,7 @@ export const intersperse: {
|
|
|
15900
16478
|
*/
|
|
15901
16479
|
export const intersperseAffixes: {
|
|
15902
16480
|
/**
|
|
15903
|
-
*
|
|
16481
|
+
* Adds a start value, middle value, and end value around stream elements.
|
|
15904
16482
|
*
|
|
15905
16483
|
* **Details**
|
|
15906
16484
|
*
|
|
@@ -15929,7 +16507,7 @@ export const intersperseAffixes: {
|
|
|
15929
16507
|
*/
|
|
15930
16508
|
<A2, A3, A4>(options: { readonly start: A2; readonly middle: A3; readonly end: A4 }): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A3 | A4 | A, E, R>
|
|
15931
16509
|
/**
|
|
15932
|
-
*
|
|
16510
|
+
* Adds a start value, middle value, and end value around stream elements.
|
|
15933
16511
|
*
|
|
15934
16512
|
* **Details**
|
|
15935
16513
|
*
|
|
@@ -16399,7 +16977,21 @@ export const interruptWhen: {
|
|
|
16399
16977
|
)
|
|
16400
16978
|
|
|
16401
16979
|
/**
|
|
16402
|
-
*
|
|
16980
|
+
* Stops a stream after the current element when an effect completes.
|
|
16981
|
+
*
|
|
16982
|
+
* **When to use**
|
|
16983
|
+
*
|
|
16984
|
+
* Use to stop before the next pull after an external signal completes.
|
|
16985
|
+
*
|
|
16986
|
+
* **Details**
|
|
16987
|
+
*
|
|
16988
|
+
* The effect is forked, its success value is discarded, and its failure fails
|
|
16989
|
+
* the stream.
|
|
16990
|
+
*
|
|
16991
|
+
* **Gotchas**
|
|
16992
|
+
*
|
|
16993
|
+
* This does not interrupt an in-progress pull. Use {@link interruptWhen} when
|
|
16994
|
+
* the stream should be interrupted immediately.
|
|
16403
16995
|
*
|
|
16404
16996
|
* **Example** (Halting a stream after an effect completes)
|
|
16405
16997
|
*
|
|
@@ -16426,7 +17018,21 @@ export const interruptWhen: {
|
|
|
16426
17018
|
*/
|
|
16427
17019
|
export const haltWhen: {
|
|
16428
17020
|
/**
|
|
16429
|
-
*
|
|
17021
|
+
* Stops a stream after the current element when an effect completes.
|
|
17022
|
+
*
|
|
17023
|
+
* **When to use**
|
|
17024
|
+
*
|
|
17025
|
+
* Use to stop before the next pull after an external signal completes.
|
|
17026
|
+
*
|
|
17027
|
+
* **Details**
|
|
17028
|
+
*
|
|
17029
|
+
* The effect is forked, its success value is discarded, and its failure fails
|
|
17030
|
+
* the stream.
|
|
17031
|
+
*
|
|
17032
|
+
* **Gotchas**
|
|
17033
|
+
*
|
|
17034
|
+
* This does not interrupt an in-progress pull. Use {@link interruptWhen} when
|
|
17035
|
+
* the stream should be interrupted immediately.
|
|
16430
17036
|
*
|
|
16431
17037
|
* **Example** (Halting a stream after an effect completes)
|
|
16432
17038
|
*
|
|
@@ -16453,7 +17059,21 @@ export const haltWhen: {
|
|
|
16453
17059
|
*/
|
|
16454
17060
|
<X, E2, R2>(effect: Effect.Effect<X, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
16455
17061
|
/**
|
|
16456
|
-
*
|
|
17062
|
+
* Stops a stream after the current element when an effect completes.
|
|
17063
|
+
*
|
|
17064
|
+
* **When to use**
|
|
17065
|
+
*
|
|
17066
|
+
* Use to stop before the next pull after an external signal completes.
|
|
17067
|
+
*
|
|
17068
|
+
* **Details**
|
|
17069
|
+
*
|
|
17070
|
+
* The effect is forked, its success value is discarded, and its failure fails
|
|
17071
|
+
* the stream.
|
|
17072
|
+
*
|
|
17073
|
+
* **Gotchas**
|
|
17074
|
+
*
|
|
17075
|
+
* This does not interrupt an in-progress pull. Use {@link interruptWhen} when
|
|
17076
|
+
* the stream should be interrupted immediately.
|
|
16457
17077
|
*
|
|
16458
17078
|
* **Example** (Halting a stream after an effect completes)
|
|
16459
17079
|
*
|
|
@@ -18516,6 +19136,24 @@ export const runHead = <A, E, R>(self: Stream<A, E, R>): Effect.Effect<Option.Op
|
|
|
18516
19136
|
/**
|
|
18517
19137
|
* Runs the stream and returns the last element as an `Option`.
|
|
18518
19138
|
*
|
|
19139
|
+
* **When to use**
|
|
19140
|
+
*
|
|
19141
|
+
* Use to consume a finite stream when only the final emitted element matters.
|
|
19142
|
+
*
|
|
19143
|
+
* **Details**
|
|
19144
|
+
*
|
|
19145
|
+
* `Option.some` contains the last emitted element. `Option.none` means the
|
|
19146
|
+
* stream completed without emitting.
|
|
19147
|
+
*
|
|
19148
|
+
* **Gotchas**
|
|
19149
|
+
*
|
|
19150
|
+
* The returned effect waits for the stream to complete before it can produce a
|
|
19151
|
+
* value.
|
|
19152
|
+
*
|
|
19153
|
+
* @see {@link runHead} for consuming only the first emitted element
|
|
19154
|
+
* @see {@link runCollect} for collecting every emitted element
|
|
19155
|
+
* @see {@link runDrain} for consuming the stream while discarding emitted elements
|
|
19156
|
+
*
|
|
18519
19157
|
* @category destructors
|
|
18520
19158
|
* @since 2.0.0
|
|
18521
19159
|
*/
|
|
@@ -19555,7 +20193,7 @@ export const runIntoPubSub: {
|
|
|
19555
20193
|
): Effect.Effect<void, E, R> => Channel.runIntoPubSubArray(self.channel, pubsub, options))
|
|
19556
20194
|
|
|
19557
20195
|
/**
|
|
19558
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
20196
|
+
* Converts a stream to a PubSub of emitted values for concurrent consumption.
|
|
19559
20197
|
*
|
|
19560
20198
|
* **Details**
|
|
19561
20199
|
*
|
|
@@ -19583,7 +20221,7 @@ export const runIntoPubSub: {
|
|
|
19583
20221
|
*/
|
|
19584
20222
|
export const toPubSub: {
|
|
19585
20223
|
/**
|
|
19586
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
20224
|
+
* Converts a stream to a PubSub of emitted values for concurrent consumption.
|
|
19587
20225
|
*
|
|
19588
20226
|
* **Details**
|
|
19589
20227
|
*
|
|
@@ -19622,7 +20260,7 @@ export const toPubSub: {
|
|
|
19622
20260
|
}
|
|
19623
20261
|
): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<PubSub.PubSub<A>, never, R | Scope.Scope>
|
|
19624
20262
|
/**
|
|
19625
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
20263
|
+
* Converts a stream to a PubSub of emitted values for concurrent consumption.
|
|
19626
20264
|
*
|
|
19627
20265
|
* **Details**
|
|
19628
20266
|
*
|
|
@@ -19679,7 +20317,7 @@ export const toPubSub: {
|
|
|
19679
20317
|
)
|
|
19680
20318
|
|
|
19681
20319
|
/**
|
|
19682
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
20320
|
+
* Converts a stream to a PubSub of `Take` values for concurrent consumption.
|
|
19683
20321
|
*
|
|
19684
20322
|
* **Details**
|
|
19685
20323
|
*
|
|
@@ -19708,7 +20346,7 @@ export const toPubSub: {
|
|
|
19708
20346
|
*/
|
|
19709
20347
|
export const toPubSubTake: {
|
|
19710
20348
|
/**
|
|
19711
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
20349
|
+
* Converts a stream to a PubSub of `Take` values for concurrent consumption.
|
|
19712
20350
|
*
|
|
19713
20351
|
* **Details**
|
|
19714
20352
|
*
|
|
@@ -19746,7 +20384,7 @@ export const toPubSubTake: {
|
|
|
19746
20384
|
}
|
|
19747
20385
|
): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<PubSub.PubSub<Take.Take<A, E>>, never, R | Scope.Scope>
|
|
19748
20386
|
/**
|
|
19749
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
20387
|
+
* Converts a stream to a PubSub of `Take` values for concurrent consumption.
|
|
19750
20388
|
*
|
|
19751
20389
|
* **Details**
|
|
19752
20390
|
*
|