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/dist/Stream.d.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
|
*/
|
|
@@ -68,7 +111,7 @@ import type * as Unify from "./Unify.ts";
|
|
|
68
111
|
/**
|
|
69
112
|
* String literal type used as the unique brand for `Stream` values.
|
|
70
113
|
*
|
|
71
|
-
* @category
|
|
114
|
+
* @category type IDs
|
|
72
115
|
* @since 4.0.0
|
|
73
116
|
*/
|
|
74
117
|
export type TypeId = "~effect/Stream";
|
|
@@ -76,7 +119,14 @@ export type TypeId = "~effect/Stream";
|
|
|
76
119
|
* Runtime identifier stored on `Stream` values and used by `isStream` to
|
|
77
120
|
* recognize them.
|
|
78
121
|
*
|
|
79
|
-
*
|
|
122
|
+
* **Details**
|
|
123
|
+
*
|
|
124
|
+
* This marker is part of the runtime representation of `Stream` values. Prefer
|
|
125
|
+
* `isStream` when narrowing unknown values.
|
|
126
|
+
*
|
|
127
|
+
* @see {@link isStream} for the public guard that checks this identifier
|
|
128
|
+
*
|
|
129
|
+
* @category type IDs
|
|
80
130
|
* @since 4.0.0
|
|
81
131
|
*/
|
|
82
132
|
export declare const TypeId: TypeId;
|
|
@@ -316,8 +366,7 @@ export type HaltStrategy = Channel.HaltStrategy;
|
|
|
316
366
|
*/
|
|
317
367
|
export declare const fromChannel: <Arr extends Arr.NonEmptyReadonlyArray<any>, E, R>(channel: Channel.Channel<Arr, E, void, unknown, unknown, unknown, R>) => Stream<Arr extends Arr.NonEmptyReadonlyArray<infer A> ? A : never, E, R>;
|
|
318
368
|
/**
|
|
319
|
-
*
|
|
320
|
-
* with the failure value of this effect.
|
|
369
|
+
* Creates a stream from an effect.
|
|
321
370
|
*
|
|
322
371
|
* **Example** (Creating a stream from an effect)
|
|
323
372
|
*
|
|
@@ -375,6 +424,11 @@ export declare const service: <I, S>(service: Context.Key<I, S>) => Stream<S, ne
|
|
|
375
424
|
* Optionally accesses a service from the context and emits the result as a
|
|
376
425
|
* single element.
|
|
377
426
|
*
|
|
427
|
+
* **When to use**
|
|
428
|
+
*
|
|
429
|
+
* Use to emit an optional dependency as a stream element without requiring that
|
|
430
|
+
* dependency to be present.
|
|
431
|
+
*
|
|
378
432
|
* **Example** (Accessing an optional service as a stream)
|
|
379
433
|
*
|
|
380
434
|
* ```ts
|
|
@@ -539,7 +593,7 @@ export declare const tick: (interval: Duration.Input) => Stream<void>;
|
|
|
539
593
|
*/
|
|
540
594
|
export declare const fromPull: <A, E, R, EX, RX>(pull: Effect.Effect<Pull.Pull<Arr.NonEmptyReadonlyArray<A>, E, void, R>, EX, RX>) => Stream<A, Pull.ExcludeDone<E> | EX, R | RX>;
|
|
541
595
|
/**
|
|
542
|
-
*
|
|
596
|
+
* Derives a stream by transforming its pull effect.
|
|
543
597
|
*
|
|
544
598
|
* **Example** (Transforming a pull effect)
|
|
545
599
|
*
|
|
@@ -629,7 +683,7 @@ export declare const toChannel: <A, E, R>(stream: Stream<A, E, R>) => Channel.Ch
|
|
|
629
683
|
*
|
|
630
684
|
* **When to use**
|
|
631
685
|
*
|
|
632
|
-
*
|
|
686
|
+
* Use when you can use the `Queue` with the apis from the `Queue` module to emit
|
|
633
687
|
* values to the stream or to signal the stream ending.
|
|
634
688
|
*
|
|
635
689
|
* By default it uses an "unbounded" buffer size.
|
|
@@ -1305,7 +1359,7 @@ export declare const fromSchedule: <O, E, R>(schedule: Schedule.Schedule<O, unkn
|
|
|
1305
1359
|
*
|
|
1306
1360
|
* **When to use**
|
|
1307
1361
|
*
|
|
1308
|
-
* Use
|
|
1362
|
+
* Use to create the subscription and `Stream.take` or
|
|
1309
1363
|
* cancellation to control how many values are consumed.
|
|
1310
1364
|
*
|
|
1311
1365
|
* **Example** (Creating a stream from a PubSub subscription)
|
|
@@ -1418,9 +1472,17 @@ export declare const fromEventListener: <A = unknown>(target: EventListener<A>,
|
|
|
1418
1472
|
*/
|
|
1419
1473
|
export declare const unfold: <S, A, E, R>(s: S, f: (s: S) => Effect.Effect<readonly [A, S] | undefined, E, R>) => Stream<A, E, R>;
|
|
1420
1474
|
/**
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1475
|
+
* Creates a stream by repeatedly evaluating an effectful page function.
|
|
1476
|
+
*
|
|
1477
|
+
* **When to use**
|
|
1478
|
+
*
|
|
1479
|
+
* Use to consume paginated APIs where each step returns a batch of values
|
|
1480
|
+
* together with an optional next state.
|
|
1481
|
+
*
|
|
1482
|
+
* **Details**
|
|
1483
|
+
*
|
|
1484
|
+
* This is similar to {@link unfold}, but each step can emit zero or more values
|
|
1485
|
+
* and independently decide whether another state should be requested.
|
|
1424
1486
|
*
|
|
1425
1487
|
* **Example** (Paginating stream state)
|
|
1426
1488
|
*
|
|
@@ -1970,7 +2032,7 @@ export declare const flattenEffect: <Arg extends Stream<Effect.Effect<any, any,
|
|
|
1970
2032
|
readonly unordered?: boolean | undefined;
|
|
1971
2033
|
} | undefined) => [Arg] extends [Stream<Effect.Effect<infer _A, infer _EX, infer _RX>, infer _E, infer _R>] ? Stream<_A, _EX | _E, _RX | _R> : <A, EX, RX, E, R>(self: Stream<Effect.Effect<A, EX, RX>, E, R>) => Stream<A, EX | E, RX | R>;
|
|
1972
2034
|
/**
|
|
1973
|
-
*
|
|
2035
|
+
* Maps over non-empty array chunks emitted by the stream effectfully.
|
|
1974
2036
|
*
|
|
1975
2037
|
* **Example** (Effectfully mapping stream chunks)
|
|
1976
2038
|
*
|
|
@@ -1997,7 +2059,7 @@ export declare const flattenEffect: <Arg extends Stream<Effect.Effect<any, any,
|
|
|
1997
2059
|
*/
|
|
1998
2060
|
export declare const mapArrayEffect: {
|
|
1999
2061
|
/**
|
|
2000
|
-
*
|
|
2062
|
+
* Maps over non-empty array chunks emitted by the stream effectfully.
|
|
2001
2063
|
*
|
|
2002
2064
|
* **Example** (Effectfully mapping stream chunks)
|
|
2003
2065
|
*
|
|
@@ -2024,7 +2086,7 @@ export declare const mapArrayEffect: {
|
|
|
2024
2086
|
*/
|
|
2025
2087
|
<A, B, E2, R2>(f: (a: Arr.NonEmptyReadonlyArray<A>, i: number) => Effect.Effect<Arr.NonEmptyReadonlyArray<B>, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<B, E | E2, R | R2>;
|
|
2026
2088
|
/**
|
|
2027
|
-
*
|
|
2089
|
+
* Maps over non-empty array chunks emitted by the stream effectfully.
|
|
2028
2090
|
*
|
|
2029
2091
|
* **Example** (Effectfully mapping stream chunks)
|
|
2030
2092
|
*
|
|
@@ -2300,8 +2362,7 @@ export declare const tapBoth: {
|
|
|
2300
2362
|
}): Stream<A, E | E2 | E3, R | R2 | R3>;
|
|
2301
2363
|
};
|
|
2302
2364
|
/**
|
|
2303
|
-
*
|
|
2304
|
-
* to emitting them.
|
|
2365
|
+
* Runs a sink for all stream elements while still emitting them downstream.
|
|
2305
2366
|
*
|
|
2306
2367
|
* **Example** (Tapping values with a sink)
|
|
2307
2368
|
*
|
|
@@ -2332,8 +2393,7 @@ export declare const tapBoth: {
|
|
|
2332
2393
|
*/
|
|
2333
2394
|
export declare const tapSink: {
|
|
2334
2395
|
/**
|
|
2335
|
-
*
|
|
2336
|
-
* to emitting them.
|
|
2396
|
+
* Runs a sink for all stream elements while still emitting them downstream.
|
|
2337
2397
|
*
|
|
2338
2398
|
* **Example** (Tapping values with a sink)
|
|
2339
2399
|
*
|
|
@@ -2364,8 +2424,7 @@ export declare const tapSink: {
|
|
|
2364
2424
|
*/
|
|
2365
2425
|
<A, E2, R2>(sink: Sink.Sink<unknown, A, unknown, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
2366
2426
|
/**
|
|
2367
|
-
*
|
|
2368
|
-
* to emitting them.
|
|
2427
|
+
* Runs a sink for all stream elements while still emitting them downstream.
|
|
2369
2428
|
*
|
|
2370
2429
|
* **Example** (Tapping values with a sink)
|
|
2371
2430
|
*
|
|
@@ -2830,7 +2889,7 @@ export declare const repeat: {
|
|
|
2830
2889
|
<A, E, R, B, E2, R2>(self: Stream<A, E, R>, schedule: Schedule.Schedule<B, void, E2, R2> | (($: <SO, SE, SR>(_: Schedule.Schedule<SO, void, SE, SR>) => Schedule.Schedule<SO, void, SE, SR>) => Schedule.Schedule<B, void, E2, R2>)): Stream<A, E | E2, R | R2>;
|
|
2831
2890
|
};
|
|
2832
2891
|
/**
|
|
2833
|
-
*
|
|
2892
|
+
* Schedules the stream's elements according to the provided schedule.
|
|
2834
2893
|
*
|
|
2835
2894
|
* **Example** (Scheduling stream elements)
|
|
2836
2895
|
*
|
|
@@ -2850,12 +2909,12 @@ export declare const repeat: {
|
|
|
2850
2909
|
* // Output: [ 1, 2, 3 ]
|
|
2851
2910
|
* ```
|
|
2852
2911
|
*
|
|
2853
|
-
* @category
|
|
2912
|
+
* @category rate limiting
|
|
2854
2913
|
* @since 2.0.0
|
|
2855
2914
|
*/
|
|
2856
2915
|
export declare const schedule: {
|
|
2857
2916
|
/**
|
|
2858
|
-
*
|
|
2917
|
+
* Schedules the stream's elements according to the provided schedule.
|
|
2859
2918
|
*
|
|
2860
2919
|
* **Example** (Scheduling stream elements)
|
|
2861
2920
|
*
|
|
@@ -2875,12 +2934,12 @@ export declare const schedule: {
|
|
|
2875
2934
|
* // Output: [ 1, 2, 3 ]
|
|
2876
2935
|
* ```
|
|
2877
2936
|
*
|
|
2878
|
-
* @category
|
|
2937
|
+
* @category rate limiting
|
|
2879
2938
|
* @since 2.0.0
|
|
2880
2939
|
*/
|
|
2881
2940
|
<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>;
|
|
2882
2941
|
/**
|
|
2883
|
-
*
|
|
2942
|
+
* Schedules the stream's elements according to the provided schedule.
|
|
2884
2943
|
*
|
|
2885
2944
|
* **Example** (Scheduling stream elements)
|
|
2886
2945
|
*
|
|
@@ -2900,7 +2959,7 @@ export declare const schedule: {
|
|
|
2900
2959
|
* // Output: [ 1, 2, 3 ]
|
|
2901
2960
|
* ```
|
|
2902
2961
|
*
|
|
2903
|
-
* @category
|
|
2962
|
+
* @category rate limiting
|
|
2904
2963
|
* @since 2.0.0
|
|
2905
2964
|
*/
|
|
2906
2965
|
<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>;
|
|
@@ -2926,7 +2985,7 @@ export declare const schedule: {
|
|
|
2926
2985
|
* // Output: [ 1 ]
|
|
2927
2986
|
* ```
|
|
2928
2987
|
*
|
|
2929
|
-
* @category
|
|
2988
|
+
* @category rate limiting
|
|
2930
2989
|
* @since 2.0.0
|
|
2931
2990
|
*/
|
|
2932
2991
|
export declare const timeout: {
|
|
@@ -2951,7 +3010,7 @@ export declare const timeout: {
|
|
|
2951
3010
|
* // Output: [ 1 ]
|
|
2952
3011
|
* ```
|
|
2953
3012
|
*
|
|
2954
|
-
* @category
|
|
3013
|
+
* @category rate limiting
|
|
2955
3014
|
* @since 2.0.0
|
|
2956
3015
|
*/
|
|
2957
3016
|
(duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
@@ -2976,7 +3035,7 @@ export declare const timeout: {
|
|
|
2976
3035
|
* // Output: [ 1 ]
|
|
2977
3036
|
* ```
|
|
2978
3037
|
*
|
|
2979
|
-
* @category
|
|
3038
|
+
* @category rate limiting
|
|
2980
3039
|
* @since 2.0.0
|
|
2981
3040
|
*/
|
|
2982
3041
|
<A, E, R>(self: Stream<A, E, R>, duration: Duration.Input): Stream<A, E, R>;
|
|
@@ -2985,13 +3044,24 @@ export declare const timeout: {
|
|
|
2985
3044
|
* Switches to a fallback stream if this stream does not emit a value within
|
|
2986
3045
|
* the specified duration.
|
|
2987
3046
|
*
|
|
3047
|
+
* **When to use**
|
|
3048
|
+
*
|
|
3049
|
+
* Use when a stream should continue with another stream if an upstream pull
|
|
3050
|
+
* waits longer than the allowed duration.
|
|
3051
|
+
*
|
|
2988
3052
|
* **Details**
|
|
2989
3053
|
*
|
|
2990
3054
|
* The timeout is checked for each pull. A zero duration uses `orElse`
|
|
2991
3055
|
* immediately, while an infinite duration leaves the original stream
|
|
2992
3056
|
* unchanged.
|
|
2993
3057
|
*
|
|
2994
|
-
*
|
|
3058
|
+
* **Gotchas**
|
|
3059
|
+
*
|
|
3060
|
+
* The fallback stream is not timed after the switch.
|
|
3061
|
+
*
|
|
3062
|
+
* @see {@link timeout} for ending the stream instead of switching to a fallback stream
|
|
3063
|
+
*
|
|
3064
|
+
* @category rate limiting
|
|
2995
3065
|
* @since 4.0.0
|
|
2996
3066
|
*/
|
|
2997
3067
|
export declare const timeoutOrElse: {
|
|
@@ -2999,13 +3069,24 @@ export declare const timeoutOrElse: {
|
|
|
2999
3069
|
* Switches to a fallback stream if this stream does not emit a value within
|
|
3000
3070
|
* the specified duration.
|
|
3001
3071
|
*
|
|
3072
|
+
* **When to use**
|
|
3073
|
+
*
|
|
3074
|
+
* Use when a stream should continue with another stream if an upstream pull
|
|
3075
|
+
* waits longer than the allowed duration.
|
|
3076
|
+
*
|
|
3002
3077
|
* **Details**
|
|
3003
3078
|
*
|
|
3004
3079
|
* The timeout is checked for each pull. A zero duration uses `orElse`
|
|
3005
3080
|
* immediately, while an infinite duration leaves the original stream
|
|
3006
3081
|
* unchanged.
|
|
3007
3082
|
*
|
|
3008
|
-
*
|
|
3083
|
+
* **Gotchas**
|
|
3084
|
+
*
|
|
3085
|
+
* The fallback stream is not timed after the switch.
|
|
3086
|
+
*
|
|
3087
|
+
* @see {@link timeout} for ending the stream instead of switching to a fallback stream
|
|
3088
|
+
*
|
|
3089
|
+
* @category rate limiting
|
|
3009
3090
|
* @since 4.0.0
|
|
3010
3091
|
*/
|
|
3011
3092
|
<B, E2, R2>(options: {
|
|
@@ -3016,13 +3097,24 @@ export declare const timeoutOrElse: {
|
|
|
3016
3097
|
* Switches to a fallback stream if this stream does not emit a value within
|
|
3017
3098
|
* the specified duration.
|
|
3018
3099
|
*
|
|
3100
|
+
* **When to use**
|
|
3101
|
+
*
|
|
3102
|
+
* Use when a stream should continue with another stream if an upstream pull
|
|
3103
|
+
* waits longer than the allowed duration.
|
|
3104
|
+
*
|
|
3019
3105
|
* **Details**
|
|
3020
3106
|
*
|
|
3021
3107
|
* The timeout is checked for each pull. A zero duration uses `orElse`
|
|
3022
3108
|
* immediately, while an infinite duration leaves the original stream
|
|
3023
3109
|
* unchanged.
|
|
3024
3110
|
*
|
|
3025
|
-
*
|
|
3111
|
+
* **Gotchas**
|
|
3112
|
+
*
|
|
3113
|
+
* The fallback stream is not timed after the switch.
|
|
3114
|
+
*
|
|
3115
|
+
* @see {@link timeout} for ending the stream instead of switching to a fallback stream
|
|
3116
|
+
*
|
|
3117
|
+
* @category rate limiting
|
|
3026
3118
|
* @since 4.0.0
|
|
3027
3119
|
*/
|
|
3028
3120
|
<A, E, R, B, E2, R2>(self: Stream<A, E, R>, options: {
|
|
@@ -3133,7 +3225,7 @@ export declare const repeatElements: {
|
|
|
3133
3225
|
*/
|
|
3134
3226
|
export declare const forever: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
3135
3227
|
/**
|
|
3136
|
-
*
|
|
3228
|
+
* Flattens the iterables emitted by this stream into the stream's structure.
|
|
3137
3229
|
*
|
|
3138
3230
|
* **Example** (Flattening iterable values)
|
|
3139
3231
|
*
|
|
@@ -3811,8 +3903,16 @@ export declare const mergeRight: {
|
|
|
3811
3903
|
/**
|
|
3812
3904
|
* Merges a collection of streams, running up to the specified number concurrently.
|
|
3813
3905
|
*
|
|
3814
|
-
*
|
|
3815
|
-
*
|
|
3906
|
+
* **When to use**
|
|
3907
|
+
*
|
|
3908
|
+
* Use to merge an iterable of already-created streams while bounding how many
|
|
3909
|
+
* inner streams may run at the same time.
|
|
3910
|
+
*
|
|
3911
|
+
* **Details**
|
|
3912
|
+
*
|
|
3913
|
+
* The `concurrency` option is required and may be a number or `"unbounded"`.
|
|
3914
|
+
* `bufferSize` controls buffering between inner streams, and outputs are
|
|
3915
|
+
* emitted as they arrive under concurrent merging.
|
|
3816
3916
|
*
|
|
3817
3917
|
* **Example** (Merging streams with bounded concurrency)
|
|
3818
3918
|
*
|
|
@@ -3834,13 +3934,27 @@ export declare const mergeRight: {
|
|
|
3834
3934
|
* Effect.runPromise(program)
|
|
3835
3935
|
* // Output: [ "B", "A" ]
|
|
3836
3936
|
* ```
|
|
3937
|
+
*
|
|
3938
|
+
* @see {@link merge} for merging exactly two streams and choosing a halt strategy
|
|
3939
|
+
* @see {@link flatten} for flattening a stream that already emits streams
|
|
3940
|
+
*
|
|
3941
|
+
* @category Merging
|
|
3942
|
+
* @since 2.0.0
|
|
3837
3943
|
*/
|
|
3838
3944
|
export declare const mergeAll: {
|
|
3839
3945
|
/**
|
|
3840
3946
|
* Merges a collection of streams, running up to the specified number concurrently.
|
|
3841
3947
|
*
|
|
3842
|
-
*
|
|
3843
|
-
*
|
|
3948
|
+
* **When to use**
|
|
3949
|
+
*
|
|
3950
|
+
* Use to merge an iterable of already-created streams while bounding how many
|
|
3951
|
+
* inner streams may run at the same time.
|
|
3952
|
+
*
|
|
3953
|
+
* **Details**
|
|
3954
|
+
*
|
|
3955
|
+
* The `concurrency` option is required and may be a number or `"unbounded"`.
|
|
3956
|
+
* `bufferSize` controls buffering between inner streams, and outputs are
|
|
3957
|
+
* emitted as they arrive under concurrent merging.
|
|
3844
3958
|
*
|
|
3845
3959
|
* **Example** (Merging streams with bounded concurrency)
|
|
3846
3960
|
*
|
|
@@ -3862,6 +3976,12 @@ export declare const mergeAll: {
|
|
|
3862
3976
|
* Effect.runPromise(program)
|
|
3863
3977
|
* // Output: [ "B", "A" ]
|
|
3864
3978
|
* ```
|
|
3979
|
+
*
|
|
3980
|
+
* @see {@link merge} for merging exactly two streams and choosing a halt strategy
|
|
3981
|
+
* @see {@link flatten} for flattening a stream that already emits streams
|
|
3982
|
+
*
|
|
3983
|
+
* @category Merging
|
|
3984
|
+
* @since 2.0.0
|
|
3865
3985
|
*/
|
|
3866
3986
|
(options: {
|
|
3867
3987
|
readonly concurrency: number | "unbounded";
|
|
@@ -3870,8 +3990,16 @@ export declare const mergeAll: {
|
|
|
3870
3990
|
/**
|
|
3871
3991
|
* Merges a collection of streams, running up to the specified number concurrently.
|
|
3872
3992
|
*
|
|
3873
|
-
*
|
|
3874
|
-
*
|
|
3993
|
+
* **When to use**
|
|
3994
|
+
*
|
|
3995
|
+
* Use to merge an iterable of already-created streams while bounding how many
|
|
3996
|
+
* inner streams may run at the same time.
|
|
3997
|
+
*
|
|
3998
|
+
* **Details**
|
|
3999
|
+
*
|
|
4000
|
+
* The `concurrency` option is required and may be a number or `"unbounded"`.
|
|
4001
|
+
* `bufferSize` controls buffering between inner streams, and outputs are
|
|
4002
|
+
* emitted as they arrive under concurrent merging.
|
|
3875
4003
|
*
|
|
3876
4004
|
* **Example** (Merging streams with bounded concurrency)
|
|
3877
4005
|
*
|
|
@@ -3893,6 +4021,12 @@ export declare const mergeAll: {
|
|
|
3893
4021
|
* Effect.runPromise(program)
|
|
3894
4022
|
* // Output: [ "B", "A" ]
|
|
3895
4023
|
* ```
|
|
4024
|
+
*
|
|
4025
|
+
* @see {@link merge} for merging exactly two streams and choosing a halt strategy
|
|
4026
|
+
* @see {@link flatten} for flattening a stream that already emits streams
|
|
4027
|
+
*
|
|
4028
|
+
* @category Merging
|
|
4029
|
+
* @since 2.0.0
|
|
3896
4030
|
*/
|
|
3897
4031
|
<A, E, R>(streams: Iterable<Stream<A, E, R>>, options: {
|
|
3898
4032
|
readonly concurrency: number | "unbounded";
|
|
@@ -5194,6 +5328,19 @@ export declare const filter: {
|
|
|
5194
5328
|
/**
|
|
5195
5329
|
* Filters and maps stream elements in one pass using a `Filter`.
|
|
5196
5330
|
*
|
|
5331
|
+
* **When to use**
|
|
5332
|
+
*
|
|
5333
|
+
* Use to keep only stream elements accepted by a `Filter` and emit each filter
|
|
5334
|
+
* success value.
|
|
5335
|
+
*
|
|
5336
|
+
* **Details**
|
|
5337
|
+
*
|
|
5338
|
+
* `Result.succeed` values are emitted and `Result.fail` values are skipped.
|
|
5339
|
+
*
|
|
5340
|
+
* @see {@link filter} for keeping original elements with a boolean predicate or refinement
|
|
5341
|
+
* @see {@link filterMapEffect} for an effectful `Filter`
|
|
5342
|
+
* @see {@link partition} for consuming both filter success and failure values
|
|
5343
|
+
*
|
|
5197
5344
|
* @category filtering
|
|
5198
5345
|
* @since 2.0.0
|
|
5199
5346
|
*/
|
|
@@ -5201,6 +5348,19 @@ export declare const filterMap: {
|
|
|
5201
5348
|
/**
|
|
5202
5349
|
* Filters and maps stream elements in one pass using a `Filter`.
|
|
5203
5350
|
*
|
|
5351
|
+
* **When to use**
|
|
5352
|
+
*
|
|
5353
|
+
* Use to keep only stream elements accepted by a `Filter` and emit each filter
|
|
5354
|
+
* success value.
|
|
5355
|
+
*
|
|
5356
|
+
* **Details**
|
|
5357
|
+
*
|
|
5358
|
+
* `Result.succeed` values are emitted and `Result.fail` values are skipped.
|
|
5359
|
+
*
|
|
5360
|
+
* @see {@link filter} for keeping original elements with a boolean predicate or refinement
|
|
5361
|
+
* @see {@link filterMapEffect} for an effectful `Filter`
|
|
5362
|
+
* @see {@link partition} for consuming both filter success and failure values
|
|
5363
|
+
*
|
|
5204
5364
|
* @category filtering
|
|
5205
5365
|
* @since 2.0.0
|
|
5206
5366
|
*/
|
|
@@ -5208,13 +5368,26 @@ export declare const filterMap: {
|
|
|
5208
5368
|
/**
|
|
5209
5369
|
* Filters and maps stream elements in one pass using a `Filter`.
|
|
5210
5370
|
*
|
|
5371
|
+
* **When to use**
|
|
5372
|
+
*
|
|
5373
|
+
* Use to keep only stream elements accepted by a `Filter` and emit each filter
|
|
5374
|
+
* success value.
|
|
5375
|
+
*
|
|
5376
|
+
* **Details**
|
|
5377
|
+
*
|
|
5378
|
+
* `Result.succeed` values are emitted and `Result.fail` values are skipped.
|
|
5379
|
+
*
|
|
5380
|
+
* @see {@link filter} for keeping original elements with a boolean predicate or refinement
|
|
5381
|
+
* @see {@link filterMapEffect} for an effectful `Filter`
|
|
5382
|
+
* @see {@link partition} for consuming both filter success and failure values
|
|
5383
|
+
*
|
|
5211
5384
|
* @category filtering
|
|
5212
5385
|
* @since 2.0.0
|
|
5213
5386
|
*/
|
|
5214
5387
|
<A, E, R, B, X>(self: Stream<A, E, R>, filter: Filter.Filter<A, B, X>): Stream<B, E, R>;
|
|
5215
5388
|
};
|
|
5216
5389
|
/**
|
|
5217
|
-
*
|
|
5390
|
+
* Filters elements in a single pass effectfully.
|
|
5218
5391
|
*
|
|
5219
5392
|
* **Example** (Effectfully filtering stream values)
|
|
5220
5393
|
*
|
|
@@ -5237,7 +5410,7 @@ export declare const filterMap: {
|
|
|
5237
5410
|
*/
|
|
5238
5411
|
export declare const filterEffect: {
|
|
5239
5412
|
/**
|
|
5240
|
-
*
|
|
5413
|
+
* Filters elements in a single pass effectfully.
|
|
5241
5414
|
*
|
|
5242
5415
|
* **Example** (Effectfully filtering stream values)
|
|
5243
5416
|
*
|
|
@@ -5260,7 +5433,7 @@ export declare const filterEffect: {
|
|
|
5260
5433
|
*/
|
|
5261
5434
|
<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>;
|
|
5262
5435
|
/**
|
|
5263
|
-
*
|
|
5436
|
+
* Filters elements in a single pass effectfully.
|
|
5264
5437
|
*
|
|
5265
5438
|
* **Example** (Effectfully filtering stream values)
|
|
5266
5439
|
*
|
|
@@ -5284,21 +5457,63 @@ export declare const filterEffect: {
|
|
|
5284
5457
|
<A, E, R, EX, RX>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, i: number) => Effect.Effect<boolean, EX, RX>): Stream<A, E | EX, R | RX>;
|
|
5285
5458
|
};
|
|
5286
5459
|
/**
|
|
5287
|
-
*
|
|
5460
|
+
* Filters and maps elements in one pass effectfully using a `FilterEffect`.
|
|
5461
|
+
*
|
|
5462
|
+
* **When to use**
|
|
5463
|
+
*
|
|
5464
|
+
* Use to apply effectful logic that can reject stream elements or emit
|
|
5465
|
+
* transformed values before they continue downstream.
|
|
5466
|
+
*
|
|
5467
|
+
* **Details**
|
|
5468
|
+
*
|
|
5469
|
+
* `Result.succeed` values are emitted, `Result.fail` values are skipped, and
|
|
5470
|
+
* effect failures fail the stream.
|
|
5471
|
+
*
|
|
5472
|
+
* @see {@link filterMap} for the synchronous `Filter` variant
|
|
5473
|
+
* @see {@link filterEffect} for effectfully keeping original elements
|
|
5474
|
+
* @see {@link mapEffect} for effectfully transforming every element
|
|
5288
5475
|
*
|
|
5289
5476
|
* @category filtering
|
|
5290
5477
|
* @since 2.0.0
|
|
5291
5478
|
*/
|
|
5292
5479
|
export declare const filterMapEffect: {
|
|
5293
5480
|
/**
|
|
5294
|
-
*
|
|
5481
|
+
* Filters and maps elements in one pass effectfully using a `FilterEffect`.
|
|
5482
|
+
*
|
|
5483
|
+
* **When to use**
|
|
5484
|
+
*
|
|
5485
|
+
* Use to apply effectful logic that can reject stream elements or emit
|
|
5486
|
+
* transformed values before they continue downstream.
|
|
5487
|
+
*
|
|
5488
|
+
* **Details**
|
|
5489
|
+
*
|
|
5490
|
+
* `Result.succeed` values are emitted, `Result.fail` values are skipped, and
|
|
5491
|
+
* effect failures fail the stream.
|
|
5492
|
+
*
|
|
5493
|
+
* @see {@link filterMap} for the synchronous `Filter` variant
|
|
5494
|
+
* @see {@link filterEffect} for effectfully keeping original elements
|
|
5495
|
+
* @see {@link mapEffect} for effectfully transforming every element
|
|
5295
5496
|
*
|
|
5296
5497
|
* @category filtering
|
|
5297
5498
|
* @since 2.0.0
|
|
5298
5499
|
*/
|
|
5299
5500
|
<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>;
|
|
5300
5501
|
/**
|
|
5301
|
-
*
|
|
5502
|
+
* Filters and maps elements in one pass effectfully using a `FilterEffect`.
|
|
5503
|
+
*
|
|
5504
|
+
* **When to use**
|
|
5505
|
+
*
|
|
5506
|
+
* Use to apply effectful logic that can reject stream elements or emit
|
|
5507
|
+
* transformed values before they continue downstream.
|
|
5508
|
+
*
|
|
5509
|
+
* **Details**
|
|
5510
|
+
*
|
|
5511
|
+
* `Result.succeed` values are emitted, `Result.fail` values are skipped, and
|
|
5512
|
+
* effect failures fail the stream.
|
|
5513
|
+
*
|
|
5514
|
+
* @see {@link filterMap} for the synchronous `Filter` variant
|
|
5515
|
+
* @see {@link filterEffect} for effectfully keeping original elements
|
|
5516
|
+
* @see {@link mapEffect} for effectfully transforming every element
|
|
5302
5517
|
*
|
|
5303
5518
|
* @category filtering
|
|
5304
5519
|
* @since 2.0.0
|
|
@@ -5428,12 +5643,21 @@ export declare const partitionQueue: {
|
|
|
5428
5643
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
5429
5644
|
* filter successes and failures.
|
|
5430
5645
|
*
|
|
5646
|
+
* **When to use**
|
|
5647
|
+
*
|
|
5648
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
5649
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
5650
|
+
*
|
|
5431
5651
|
* **Details**
|
|
5432
5652
|
*
|
|
5433
5653
|
* The returned streams are backed by queues in the current scope and should be
|
|
5434
5654
|
* consumed while that scope remains open. The first stream emits success values
|
|
5435
5655
|
* from the filter, and the second emits failure values.
|
|
5436
5656
|
*
|
|
5657
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
5658
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
5659
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
5660
|
+
*
|
|
5437
5661
|
* @category filtering
|
|
5438
5662
|
* @since 4.0.0
|
|
5439
5663
|
*/
|
|
@@ -5442,12 +5666,21 @@ export declare const partitionEffect: {
|
|
|
5442
5666
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
5443
5667
|
* filter successes and failures.
|
|
5444
5668
|
*
|
|
5669
|
+
* **When to use**
|
|
5670
|
+
*
|
|
5671
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
5672
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
5673
|
+
*
|
|
5445
5674
|
* **Details**
|
|
5446
5675
|
*
|
|
5447
5676
|
* The returned streams are backed by queues in the current scope and should be
|
|
5448
5677
|
* consumed while that scope remains open. The first stream emits success values
|
|
5449
5678
|
* from the filter, and the second emits failure values.
|
|
5450
5679
|
*
|
|
5680
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
5681
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
5682
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
5683
|
+
*
|
|
5451
5684
|
* @category filtering
|
|
5452
5685
|
* @since 4.0.0
|
|
5453
5686
|
*/
|
|
@@ -5462,12 +5695,21 @@ export declare const partitionEffect: {
|
|
|
5462
5695
|
* Splits a stream with an effectful `Filter`, returning scoped streams for
|
|
5463
5696
|
* filter successes and failures.
|
|
5464
5697
|
*
|
|
5698
|
+
* **When to use**
|
|
5699
|
+
*
|
|
5700
|
+
* Use when each stream element must be classified by an effectful `Filter` and
|
|
5701
|
+
* both passing and failing mapped values need to be consumed as streams.
|
|
5702
|
+
*
|
|
5465
5703
|
* **Details**
|
|
5466
5704
|
*
|
|
5467
5705
|
* The returned streams are backed by queues in the current scope and should be
|
|
5468
5706
|
* consumed while that scope remains open. The first stream emits success values
|
|
5469
5707
|
* from the filter, and the second emits failure values.
|
|
5470
5708
|
*
|
|
5709
|
+
* @see {@link partition} for the pure `Filter` variant, which returns the failing stream before the passing stream
|
|
5710
|
+
* @see {@link partitionQueue} for the lower-level queue result
|
|
5711
|
+
* @see {@link filterMapEffect} for effectful filtering that discards failed filter results
|
|
5712
|
+
*
|
|
5471
5713
|
* @category filtering
|
|
5472
5714
|
* @since 4.0.0
|
|
5473
5715
|
*/
|
|
@@ -5787,7 +6029,7 @@ export declare const peel: {
|
|
|
5787
6029
|
* // Output: [ 1, 2, 3 ]
|
|
5788
6030
|
* ```
|
|
5789
6031
|
*
|
|
5790
|
-
* @category
|
|
6032
|
+
* @category rate limiting
|
|
5791
6033
|
* @since 2.0.0
|
|
5792
6034
|
*/
|
|
5793
6035
|
export declare const buffer: {
|
|
@@ -5819,7 +6061,7 @@ export declare const buffer: {
|
|
|
5819
6061
|
* // Output: [ 1, 2, 3 ]
|
|
5820
6062
|
* ```
|
|
5821
6063
|
*
|
|
5822
|
-
* @category
|
|
6064
|
+
* @category rate limiting
|
|
5823
6065
|
* @since 2.0.0
|
|
5824
6066
|
*/
|
|
5825
6067
|
(options: {
|
|
@@ -5856,7 +6098,7 @@ export declare const buffer: {
|
|
|
5856
6098
|
* // Output: [ 1, 2, 3 ]
|
|
5857
6099
|
* ```
|
|
5858
6100
|
*
|
|
5859
|
-
* @category
|
|
6101
|
+
* @category rate limiting
|
|
5860
6102
|
* @since 2.0.0
|
|
5861
6103
|
*/
|
|
5862
6104
|
<A, E, R>(self: Stream<A, E, R>, options: {
|
|
@@ -5893,7 +6135,7 @@ export declare const buffer: {
|
|
|
5893
6135
|
* // Output: [ 1, 2, 3, 4 ]
|
|
5894
6136
|
* ```
|
|
5895
6137
|
*
|
|
5896
|
-
* @category
|
|
6138
|
+
* @category rate limiting
|
|
5897
6139
|
* @since 4.0.0
|
|
5898
6140
|
*/
|
|
5899
6141
|
export declare const bufferArray: {
|
|
@@ -5924,7 +6166,7 @@ export declare const bufferArray: {
|
|
|
5924
6166
|
* // Output: [ 1, 2, 3, 4 ]
|
|
5925
6167
|
* ```
|
|
5926
6168
|
*
|
|
5927
|
-
* @category
|
|
6169
|
+
* @category rate limiting
|
|
5928
6170
|
* @since 4.0.0
|
|
5929
6171
|
*/
|
|
5930
6172
|
(options: {
|
|
@@ -5960,7 +6202,7 @@ export declare const bufferArray: {
|
|
|
5960
6202
|
* // Output: [ 1, 2, 3, 4 ]
|
|
5961
6203
|
* ```
|
|
5962
6204
|
*
|
|
5963
|
-
* @category
|
|
6205
|
+
* @category rate limiting
|
|
5964
6206
|
* @since 4.0.0
|
|
5965
6207
|
*/
|
|
5966
6208
|
<A, E, R>(self: Stream<A, E, R>, options: {
|
|
@@ -6187,7 +6429,7 @@ export {
|
|
|
6187
6429
|
*/
|
|
6188
6430
|
catch_ as catch };
|
|
6189
6431
|
/**
|
|
6190
|
-
*
|
|
6432
|
+
* Peeks at errors effectfully without changing the stream unless the tap fails.
|
|
6191
6433
|
*
|
|
6192
6434
|
* **Example** (Effectfully peeking at errors)
|
|
6193
6435
|
*
|
|
@@ -6216,7 +6458,7 @@ catch_ as catch };
|
|
|
6216
6458
|
*/
|
|
6217
6459
|
export declare const tapError: {
|
|
6218
6460
|
/**
|
|
6219
|
-
*
|
|
6461
|
+
* Peeks at errors effectfully without changing the stream unless the tap fails.
|
|
6220
6462
|
*
|
|
6221
6463
|
* **Example** (Effectfully peeking at errors)
|
|
6222
6464
|
*
|
|
@@ -6245,7 +6487,7 @@ export declare const tapError: {
|
|
|
6245
6487
|
*/
|
|
6246
6488
|
<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>;
|
|
6247
6489
|
/**
|
|
6248
|
-
*
|
|
6490
|
+
* Peeks at errors effectfully without changing the stream unless the tap fails.
|
|
6249
6491
|
*
|
|
6250
6492
|
* **Example** (Effectfully peeking at errors)
|
|
6251
6493
|
*
|
|
@@ -6343,7 +6585,7 @@ export declare const catchIf: {
|
|
|
6343
6585
|
* @category error handling
|
|
6344
6586
|
* @since 4.0.0
|
|
6345
6587
|
*/
|
|
6346
|
-
<E, EB extends E, A2, E2, R2, A3 =
|
|
6588
|
+
<E, EB extends E, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(refinement: Refinement<NoInfer<E>, EB>, f: (e: EB) => Stream<A2, E2, R2>, orElse?: ((e: Exclude<E, EB>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? Exclude<E, EB> : never), R | R2 | R3>;
|
|
6347
6589
|
/**
|
|
6348
6590
|
* Recovers from errors that match a predicate by switching to a recovery stream.
|
|
6349
6591
|
*
|
|
@@ -6378,7 +6620,7 @@ export declare const catchIf: {
|
|
|
6378
6620
|
* @category error handling
|
|
6379
6621
|
* @since 4.0.0
|
|
6380
6622
|
*/
|
|
6381
|
-
<E, A2, E2, R2, A3 =
|
|
6623
|
+
<E, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(predicate: Predicate<NoInfer<E>>, f: (e: NoInfer<E>) => Stream<A2, E2, R2>, orElse?: ((e: NoInfer<E>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? E : never), R | R2 | R3>;
|
|
6382
6624
|
/**
|
|
6383
6625
|
* Recovers from errors that match a predicate by switching to a recovery stream.
|
|
6384
6626
|
*
|
|
@@ -6413,7 +6655,7 @@ export declare const catchIf: {
|
|
|
6413
6655
|
* @category error handling
|
|
6414
6656
|
* @since 4.0.0
|
|
6415
6657
|
*/
|
|
6416
|
-
<A, E, R, EB extends E, A2, E2, R2, A3 =
|
|
6658
|
+
<A, E, R, EB extends E, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(self: Stream<A, E, R>, refinement: Refinement<E, EB>, f: (e: EB) => Stream<A2, E2, R2>, orElse?: ((e: Exclude<E, EB>) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? Exclude<E, EB> : never), R | R2 | R3>;
|
|
6417
6659
|
/**
|
|
6418
6660
|
* Recovers from errors that match a predicate by switching to a recovery stream.
|
|
6419
6661
|
*
|
|
@@ -6448,12 +6690,27 @@ export declare const catchIf: {
|
|
|
6448
6690
|
* @category error handling
|
|
6449
6691
|
* @since 4.0.0
|
|
6450
6692
|
*/
|
|
6451
|
-
<A, E, R, A2, E2, R2, A3 =
|
|
6693
|
+
<A, E, R, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(self: Stream<A, E, R>, predicate: Predicate<E>, f: (e: E) => Stream<A2, E2, R2>, orElse?: ((e: E) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? E : never), R | R2 | R3>;
|
|
6452
6694
|
};
|
|
6453
6695
|
/**
|
|
6454
6696
|
* Recovers from errors that match a `Filter` by switching to a recovery
|
|
6455
6697
|
* stream.
|
|
6456
6698
|
*
|
|
6699
|
+
* **When to use**
|
|
6700
|
+
*
|
|
6701
|
+
* Use to recover from stream errors with a reusable `Filter` when matching can
|
|
6702
|
+
* also narrow or transform the error before choosing the recovery stream.
|
|
6703
|
+
*
|
|
6704
|
+
* **Details**
|
|
6705
|
+
*
|
|
6706
|
+
* Successful filter results are passed to `f`. Failed filter results go to
|
|
6707
|
+
* `orElse` when provided; otherwise the filter failure is re-failed.
|
|
6708
|
+
*
|
|
6709
|
+
* @see {@link catchIf} for predicate or refinement based recovery
|
|
6710
|
+
* @see {@link catchTag} for `_tag` based recovery from one tagged error
|
|
6711
|
+
* @see {@link catchTags} for `_tag` based recovery from multiple tagged errors
|
|
6712
|
+
* @see {@link catchCauseFilter} for filtering full causes
|
|
6713
|
+
*
|
|
6457
6714
|
* @category error handling
|
|
6458
6715
|
* @since 4.0.0
|
|
6459
6716
|
*/
|
|
@@ -6462,18 +6719,48 @@ export declare const catchFilter: {
|
|
|
6462
6719
|
* Recovers from errors that match a `Filter` by switching to a recovery
|
|
6463
6720
|
* stream.
|
|
6464
6721
|
*
|
|
6722
|
+
* **When to use**
|
|
6723
|
+
*
|
|
6724
|
+
* Use to recover from stream errors with a reusable `Filter` when matching can
|
|
6725
|
+
* also narrow or transform the error before choosing the recovery stream.
|
|
6726
|
+
*
|
|
6727
|
+
* **Details**
|
|
6728
|
+
*
|
|
6729
|
+
* Successful filter results are passed to `f`. Failed filter results go to
|
|
6730
|
+
* `orElse` when provided; otherwise the filter failure is re-failed.
|
|
6731
|
+
*
|
|
6732
|
+
* @see {@link catchIf} for predicate or refinement based recovery
|
|
6733
|
+
* @see {@link catchTag} for `_tag` based recovery from one tagged error
|
|
6734
|
+
* @see {@link catchTags} for `_tag` based recovery from multiple tagged errors
|
|
6735
|
+
* @see {@link catchCauseFilter} for filtering full causes
|
|
6736
|
+
*
|
|
6465
6737
|
* @category error handling
|
|
6466
6738
|
* @since 4.0.0
|
|
6467
6739
|
*/
|
|
6468
|
-
<E, EB, A2, E2, R2, X, A3 =
|
|
6740
|
+
<E, EB, A2, E2, R2, X, A3 = unassigned, E3 = never, R3 = never>(filter: Filter.Filter<NoInfer<E>, EB, X>, f: (failure: EB) => Stream<A2, E2, R2>, orElse?: ((failure: X) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? X : never), R | R2 | R3>;
|
|
6469
6741
|
/**
|
|
6470
6742
|
* Recovers from errors that match a `Filter` by switching to a recovery
|
|
6471
6743
|
* stream.
|
|
6472
6744
|
*
|
|
6745
|
+
* **When to use**
|
|
6746
|
+
*
|
|
6747
|
+
* Use to recover from stream errors with a reusable `Filter` when matching can
|
|
6748
|
+
* also narrow or transform the error before choosing the recovery stream.
|
|
6749
|
+
*
|
|
6750
|
+
* **Details**
|
|
6751
|
+
*
|
|
6752
|
+
* Successful filter results are passed to `f`. Failed filter results go to
|
|
6753
|
+
* `orElse` when provided; otherwise the filter failure is re-failed.
|
|
6754
|
+
*
|
|
6755
|
+
* @see {@link catchIf} for predicate or refinement based recovery
|
|
6756
|
+
* @see {@link catchTag} for `_tag` based recovery from one tagged error
|
|
6757
|
+
* @see {@link catchTags} for `_tag` based recovery from multiple tagged errors
|
|
6758
|
+
* @see {@link catchCauseFilter} for filtering full causes
|
|
6759
|
+
*
|
|
6473
6760
|
* @category error handling
|
|
6474
6761
|
* @since 4.0.0
|
|
6475
6762
|
*/
|
|
6476
|
-
<A, E, R, EB, A2, E2, R2, X, A3 =
|
|
6763
|
+
<A, E, R, EB, A2, E2, R2, X, A3 = unassigned, E3 = never, R3 = never>(self: Stream<A, E, R>, filter: Filter.Filter<NoInfer<E>, EB, X>, f: (failure: EB) => Stream<A2, E2, R2>, orElse?: ((failure: X) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | Exclude<A3, unassigned>, E2 | E3 | (A3 extends unassigned ? X : never), R | R2 | R3>;
|
|
6477
6764
|
};
|
|
6478
6765
|
/**
|
|
6479
6766
|
* Recovers from failures whose `_tag` matches the provided value by switching to
|
|
@@ -6481,7 +6768,7 @@ export declare const catchFilter: {
|
|
|
6481
6768
|
*
|
|
6482
6769
|
* **When to use**
|
|
6483
6770
|
*
|
|
6484
|
-
* Use
|
|
6771
|
+
* Use when your error type is a tagged union with a readonly `_tag`
|
|
6485
6772
|
* field and you want to handle a specific error case.
|
|
6486
6773
|
*
|
|
6487
6774
|
* **Example** (Catching tagged failures)
|
|
@@ -6516,7 +6803,7 @@ export declare const catchTag: {
|
|
|
6516
6803
|
*
|
|
6517
6804
|
* **When to use**
|
|
6518
6805
|
*
|
|
6519
|
-
* Use
|
|
6806
|
+
* Use when your error type is a tagged union with a readonly `_tag`
|
|
6520
6807
|
* field and you want to handle a specific error case.
|
|
6521
6808
|
*
|
|
6522
6809
|
* **Example** (Catching tagged failures)
|
|
@@ -6544,14 +6831,14 @@ export declare const catchTag: {
|
|
|
6544
6831
|
* @category error handling
|
|
6545
6832
|
* @since 2.0.0
|
|
6546
6833
|
*/
|
|
6547
|
-
<const K extends Tags<E> | Arr.NonEmptyReadonlyArray<Tags<E>>, E, A1, E1, R1, A2 =
|
|
6834
|
+
<const K extends Tags<E> | Arr.NonEmptyReadonlyArray<Tags<E>>, E, A1, E1, R1, A2 = unassigned, E2 = never, R2 = never>(k: K, f: (e: ExtractTag<NoInfer<E>, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Stream<A1, E1, R1>, orElse?: ((e: ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Stream<A2, E2, R2>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A1 | Exclude<A2, unassigned>, E1 | E2 | (A2 extends unassigned ? ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K> : never), R | R1 | R2>;
|
|
6548
6835
|
/**
|
|
6549
6836
|
* Recovers from failures whose `_tag` matches the provided value by switching to
|
|
6550
6837
|
* the stream returned by `f`.
|
|
6551
6838
|
*
|
|
6552
6839
|
* **When to use**
|
|
6553
6840
|
*
|
|
6554
|
-
* Use
|
|
6841
|
+
* Use when your error type is a tagged union with a readonly `_tag`
|
|
6555
6842
|
* field and you want to handle a specific error case.
|
|
6556
6843
|
*
|
|
6557
6844
|
* **Example** (Catching tagged failures)
|
|
@@ -6579,7 +6866,7 @@ export declare const catchTag: {
|
|
|
6579
6866
|
* @category error handling
|
|
6580
6867
|
* @since 2.0.0
|
|
6581
6868
|
*/
|
|
6582
|
-
<A, E, R, const K extends Tags<E> | Arr.NonEmptyReadonlyArray<Tags<E>>, R1, E1, A1, A2 =
|
|
6869
|
+
<A, E, R, const K extends Tags<E> | Arr.NonEmptyReadonlyArray<Tags<E>>, R1, E1, A1, A2 = unassigned, E2 = never, R2 = never>(self: Stream<A, E, R>, k: K, f: (e: ExtractTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Stream<A1, E1, R1>, orElse?: ((e: ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Stream<A2, E2, R2>) | undefined): Stream<A | A1 | Exclude<A2, unassigned>, E1 | E2 | (A2 extends unassigned ? ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K> : never), R | R1 | R2>;
|
|
6583
6870
|
};
|
|
6584
6871
|
/**
|
|
6585
6872
|
* Switches to a recovery stream based on matching `_tag` handlers.
|
|
@@ -6662,13 +6949,13 @@ export declare const catchTags: {
|
|
|
6662
6949
|
[K in E["_tag"]]+?: (error: Extract<E, {
|
|
6663
6950
|
_tag: K;
|
|
6664
6951
|
}>) => Stream<any, any, any>;
|
|
6665
|
-
} : {}), A2 =
|
|
6666
|
-
_tag: keyof Cases;
|
|
6667
|
-
}>, R2 = never>(cases: Cases, orElse?: ((e: Exclude<E, {
|
|
6952
|
+
} : {}), A2 = unassigned, E2 = never, R2 = never>(cases: Cases, orElse?: ((e: Exclude<E, {
|
|
6668
6953
|
_tag: keyof Cases;
|
|
6669
|
-
}>) => Stream<A2, E2, R2>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | {
|
|
6954
|
+
}>) => Stream<A2, E2, R2>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | Exclude<A2, unassigned> | {
|
|
6670
6955
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<infer A, any, any>) ? A : never;
|
|
6671
|
-
}[keyof Cases], E2 | {
|
|
6956
|
+
}[keyof Cases], E2 | (A2 extends unassigned ? Exclude<E, {
|
|
6957
|
+
_tag: keyof Cases;
|
|
6958
|
+
}> : never) | {
|
|
6672
6959
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<any, infer E, any>) ? E : never;
|
|
6673
6960
|
}[keyof Cases], R | R2 | {
|
|
6674
6961
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<any, any, infer R>) ? R : never;
|
|
@@ -6716,13 +7003,13 @@ export declare const catchTags: {
|
|
|
6716
7003
|
[K in E["_tag"]]+?: (error: Extract<E, {
|
|
6717
7004
|
_tag: K;
|
|
6718
7005
|
}>) => Stream<any, any, any>;
|
|
6719
|
-
} : {}), A2 =
|
|
6720
|
-
_tag: keyof Cases;
|
|
6721
|
-
}>, R2 = never>(self: Stream<A, E, R>, cases: Cases, orElse?: ((e: Exclude<E, {
|
|
7006
|
+
} : {}), A2 = unassigned, E2 = never, R2 = never>(self: Stream<A, E, R>, cases: Cases, orElse?: ((e: Exclude<E, {
|
|
6722
7007
|
_tag: keyof Cases;
|
|
6723
|
-
}>) => Stream<A2, E2, R2>) | undefined): Stream<A | A2 | {
|
|
7008
|
+
}>) => Stream<A2, E2, R2>) | undefined): Stream<A | Exclude<A2, unassigned> | {
|
|
6724
7009
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<infer A, any, any>) ? A : never;
|
|
6725
|
-
}[keyof Cases], E2 | {
|
|
7010
|
+
}[keyof Cases], E2 | (A2 extends unassigned ? Exclude<E, {
|
|
7011
|
+
_tag: keyof Cases;
|
|
7012
|
+
}> : never) | {
|
|
6726
7013
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<any, infer E, any>) ? E : never;
|
|
6727
7014
|
}[keyof Cases], R | R2 | {
|
|
6728
7015
|
[K in keyof Cases]: Cases[K] extends ((...args: Array<any>) => Stream<any, any, infer R>) ? R : never;
|
|
@@ -6733,7 +7020,7 @@ export declare const catchTags: {
|
|
|
6733
7020
|
*
|
|
6734
7021
|
* **When to use**
|
|
6735
7022
|
*
|
|
6736
|
-
* Use
|
|
7023
|
+
* Use to handle nested error causes without removing the parent error
|
|
6737
7024
|
* from the error channel. The handler receives the unwrapped reason.
|
|
6738
7025
|
*
|
|
6739
7026
|
* **Example** (Catching a tagged error reason)
|
|
@@ -6780,7 +7067,7 @@ export declare const catchReason: {
|
|
|
6780
7067
|
*
|
|
6781
7068
|
* **When to use**
|
|
6782
7069
|
*
|
|
6783
|
-
* Use
|
|
7070
|
+
* Use to handle nested error causes without removing the parent error
|
|
6784
7071
|
* from the error channel. The handler receives the unwrapped reason.
|
|
6785
7072
|
*
|
|
6786
7073
|
* **Example** (Catching a tagged error reason)
|
|
@@ -6821,13 +7108,13 @@ export declare const catchReason: {
|
|
|
6821
7108
|
* @category error handling
|
|
6822
7109
|
* @since 4.0.0
|
|
6823
7110
|
*/
|
|
6824
|
-
<K extends Tags<E>, E, RK extends ReasonTags<ExtractTag<NoInfer<E>, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<NoInfer<E>, K>, RK>, error: NarrowReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<A2, E2, R2>, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, RK>, error: OmitReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | Exclude<A3, unassigned>, (A3 extends unassigned ?
|
|
7111
|
+
<K extends Tags<E>, E, RK extends ReasonTags<ExtractTag<NoInfer<E>, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<NoInfer<E>, K>, RK>, error: NarrowReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<A2, E2, R2>, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, RK>, error: OmitReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | Exclude<A3, unassigned>, ExcludeTag<E, K> | E2 | E3 | (A3 extends unassigned ? ExtractTag<E, K> : never), R | R2 | R3>;
|
|
6825
7112
|
/**
|
|
6826
7113
|
* Catches a specific reason within a tagged error.
|
|
6827
7114
|
*
|
|
6828
7115
|
* **When to use**
|
|
6829
7116
|
*
|
|
6830
|
-
* Use
|
|
7117
|
+
* Use to handle nested error causes without removing the parent error
|
|
6831
7118
|
* from the error channel. The handler receives the unwrapped reason.
|
|
6832
7119
|
*
|
|
6833
7120
|
* **Example** (Catching a tagged error reason)
|
|
@@ -6868,7 +7155,7 @@ export declare const catchReason: {
|
|
|
6868
7155
|
* @category error handling
|
|
6869
7156
|
* @since 4.0.0
|
|
6870
7157
|
*/
|
|
6871
|
-
<A, E, R, K extends Tags<E>, RK extends ReasonTags<ExtractTag<E, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(self: Stream<A, E, R>, errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<E, K>, RK>, error: NarrowReason<ExtractTag<E, K>, RK>) => Stream<A2, E2, R2>, orElse?: ((reason: ExcludeReason<ExtractTag<E, K>, RK>, error: OmitReason<ExtractTag<E, K>, RK>) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | Exclude<A3, unassigned>, (A3 extends unassigned ?
|
|
7158
|
+
<A, E, R, K extends Tags<E>, RK extends ReasonTags<ExtractTag<E, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(self: Stream<A, E, R>, errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<E, K>, RK>, error: NarrowReason<ExtractTag<E, K>, RK>) => Stream<A2, E2, R2>, orElse?: ((reason: ExcludeReason<ExtractTag<E, K>, RK>, error: OmitReason<ExtractTag<E, K>, RK>) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | Exclude<A3, unassigned>, ExcludeTag<E, K> | E2 | E3 | (A3 extends unassigned ? ExtractTag<E, K> : never), R | R2 | R3>;
|
|
6872
7159
|
};
|
|
6873
7160
|
/**
|
|
6874
7161
|
* Catches multiple reasons within a tagged error using an object of handlers.
|
|
@@ -6959,7 +7246,7 @@ export declare const catchReasons: {
|
|
|
6959
7246
|
[RK in ReasonTags<ExtractTag<NoInfer<E>, K>>]+?: (reason: ExtractReason<ExtractTag<NoInfer<E>, K>, RK>, error: NarrowReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<any, any, any>;
|
|
6960
7247
|
}, A2 = unassigned, E2 = never, R2 = never>(errorTag: K, cases: Cases, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>, error: OmitReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>) => Stream<A2, E2, R2>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | Exclude<A2, unassigned> | {
|
|
6961
7248
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<infer A, any, any> ? A : never;
|
|
6962
|
-
}[keyof Cases], (A2 extends unassigned ?
|
|
7249
|
+
}[keyof Cases], ExcludeTag<E, K> | E2 | (A2 extends unassigned ? ExtractTag<E, K> : never) | {
|
|
6963
7250
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, infer E, any> ? E : never;
|
|
6964
7251
|
}[keyof Cases], R | R2 | {
|
|
6965
7252
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, any, infer R> ? R : never;
|
|
@@ -7010,7 +7297,7 @@ export declare const catchReasons: {
|
|
|
7010
7297
|
[RK in ReasonTags<ExtractTag<E, K>>]+?: (reason: ExtractReason<ExtractTag<E, K>, RK>, error: NarrowReason<ExtractTag<E, K>, RK>) => Stream<any, any, any>;
|
|
7011
7298
|
}, A2 = unassigned, E2 = never, R2 = never>(self: Stream<A, E, R>, errorTag: K, cases: Cases, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>, error: OmitReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>) => Stream<A2, E2, R2>) | undefined): Stream<A | Exclude<A2, unassigned> | {
|
|
7012
7299
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<infer A, any, any> ? A : never;
|
|
7013
|
-
}[keyof Cases], (A2 extends unassigned ?
|
|
7300
|
+
}[keyof Cases], ExcludeTag<E, K> | E2 | (A2 extends unassigned ? ExtractTag<E, K> : never) | {
|
|
7014
7301
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, infer E, any> ? E : never;
|
|
7015
7302
|
}[keyof Cases], R | R2 | {
|
|
7016
7303
|
[RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, any, infer R> ? R : never;
|
|
@@ -7184,6 +7471,22 @@ export declare const catchCauseIf: {
|
|
|
7184
7471
|
* Recovers from stream failures by filtering the `Cause` and switching to a
|
|
7185
7472
|
* recovery stream.
|
|
7186
7473
|
*
|
|
7474
|
+
* **When to use**
|
|
7475
|
+
*
|
|
7476
|
+
* Use when you need to recover a stream only from causes selected by a
|
|
7477
|
+
* `Filter`, and the recovery needs both the selected value and the original
|
|
7478
|
+
* `Cause`.
|
|
7479
|
+
*
|
|
7480
|
+
* **Details**
|
|
7481
|
+
*
|
|
7482
|
+
* The filter is applied to the full `Cause`. A successful filter result is
|
|
7483
|
+
* passed to `f` together with the original cause; a failed filter result
|
|
7484
|
+
* re-fails with the residual cause.
|
|
7485
|
+
*
|
|
7486
|
+
* @see {@link catchCauseIf} for predicate-based cause selection
|
|
7487
|
+
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
7488
|
+
* @see {@link catchCause} for recovering from every cause without filtering
|
|
7489
|
+
*
|
|
7187
7490
|
* @category error handling
|
|
7188
7491
|
* @since 4.0.0
|
|
7189
7492
|
*/
|
|
@@ -7192,6 +7495,22 @@ export declare const catchCauseFilter: {
|
|
|
7192
7495
|
* Recovers from stream failures by filtering the `Cause` and switching to a
|
|
7193
7496
|
* recovery stream.
|
|
7194
7497
|
*
|
|
7498
|
+
* **When to use**
|
|
7499
|
+
*
|
|
7500
|
+
* Use when you need to recover a stream only from causes selected by a
|
|
7501
|
+
* `Filter`, and the recovery needs both the selected value and the original
|
|
7502
|
+
* `Cause`.
|
|
7503
|
+
*
|
|
7504
|
+
* **Details**
|
|
7505
|
+
*
|
|
7506
|
+
* The filter is applied to the full `Cause`. A successful filter result is
|
|
7507
|
+
* passed to `f` together with the original cause; a failed filter result
|
|
7508
|
+
* re-fails with the residual cause.
|
|
7509
|
+
*
|
|
7510
|
+
* @see {@link catchCauseIf} for predicate-based cause selection
|
|
7511
|
+
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
7512
|
+
* @see {@link catchCause} for recovering from every cause without filtering
|
|
7513
|
+
*
|
|
7195
7514
|
* @category error handling
|
|
7196
7515
|
* @since 4.0.0
|
|
7197
7516
|
*/
|
|
@@ -7200,6 +7519,22 @@ export declare const catchCauseFilter: {
|
|
|
7200
7519
|
* Recovers from stream failures by filtering the `Cause` and switching to a
|
|
7201
7520
|
* recovery stream.
|
|
7202
7521
|
*
|
|
7522
|
+
* **When to use**
|
|
7523
|
+
*
|
|
7524
|
+
* Use when you need to recover a stream only from causes selected by a
|
|
7525
|
+
* `Filter`, and the recovery needs both the selected value and the original
|
|
7526
|
+
* `Cause`.
|
|
7527
|
+
*
|
|
7528
|
+
* **Details**
|
|
7529
|
+
*
|
|
7530
|
+
* The filter is applied to the full `Cause`. A successful filter result is
|
|
7531
|
+
* passed to `f` together with the original cause; a failed filter result
|
|
7532
|
+
* re-fails with the residual cause.
|
|
7533
|
+
*
|
|
7534
|
+
* @see {@link catchCauseIf} for predicate-based cause selection
|
|
7535
|
+
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
7536
|
+
* @see {@link catchCause} for recovering from every cause without filtering
|
|
7537
|
+
*
|
|
7203
7538
|
* @category error handling
|
|
7204
7539
|
* @since 4.0.0
|
|
7205
7540
|
*/
|
|
@@ -7384,7 +7719,9 @@ export declare const orDie: <A, E, R>(self: Stream<A, E, R>) => Stream<A, never,
|
|
|
7384
7719
|
*
|
|
7385
7720
|
* **When to use**
|
|
7386
7721
|
*
|
|
7387
|
-
* Use
|
|
7722
|
+
* Use when you want a failing stream to end gracefully rather than propagate
|
|
7723
|
+
* the error. The `log` option controls whether the failure is logged before
|
|
7724
|
+
* the stream terminates.
|
|
7388
7725
|
*
|
|
7389
7726
|
* **Example** (Ignoring stream failures)
|
|
7390
7727
|
*
|
|
@@ -7420,6 +7757,8 @@ export declare const orDie: <A, E, R>(self: Stream<A, E, R>) => Stream<A, never,
|
|
|
7420
7757
|
* // []
|
|
7421
7758
|
* ```
|
|
7422
7759
|
*
|
|
7760
|
+
* @see {@link ignoreCause} for a variant that also ignores defects, not just typed failures
|
|
7761
|
+
*
|
|
7423
7762
|
* @category error handling
|
|
7424
7763
|
* @since 4.0.0
|
|
7425
7764
|
*/
|
|
@@ -7433,7 +7772,9 @@ export declare const ignore: <Arg extends Stream<any, any, any> | {
|
|
|
7433
7772
|
*
|
|
7434
7773
|
* **When to use**
|
|
7435
7774
|
*
|
|
7436
|
-
* Use
|
|
7775
|
+
* Use when a stream may fail with defects and you want to silently suppress the
|
|
7776
|
+
* entire failure cause — including both typed errors and defects — rather than
|
|
7777
|
+
* propagate it downstream.
|
|
7437
7778
|
*
|
|
7438
7779
|
* **Example** (Ignoring stream failure causes)
|
|
7439
7780
|
*
|
|
@@ -7452,6 +7793,8 @@ export declare const ignore: <Arg extends Stream<any, any, any> | {
|
|
|
7452
7793
|
* // [ 1, 2 ]
|
|
7453
7794
|
* ```
|
|
7454
7795
|
*
|
|
7796
|
+
* @see {@link ignore} to ignore only typed failures without suppressing defects
|
|
7797
|
+
*
|
|
7455
7798
|
* @category error handling
|
|
7456
7799
|
* @since 4.0.0
|
|
7457
7800
|
*/
|
|
@@ -7461,7 +7804,7 @@ export declare const ignoreCause: <Arg extends Stream<any, any, any> | {
|
|
|
7461
7804
|
readonly log?: boolean | Severity | undefined;
|
|
7462
7805
|
} | undefined) => [Arg] extends [Stream<infer A, infer _E, infer R>] ? Stream<A, never, R> : <A, E, R>(self: Stream<A, E, R>) => Stream<A, never, R>;
|
|
7463
7806
|
/**
|
|
7464
|
-
*
|
|
7807
|
+
* Retries the stream according to the given schedule when it fails.
|
|
7465
7808
|
*
|
|
7466
7809
|
* **Details**
|
|
7467
7810
|
*
|
|
@@ -7496,7 +7839,7 @@ export declare const ignoreCause: <Arg extends Stream<any, any, any> | {
|
|
|
7496
7839
|
*/
|
|
7497
7840
|
export declare const retry: {
|
|
7498
7841
|
/**
|
|
7499
|
-
*
|
|
7842
|
+
* Retries the stream according to the given schedule when it fails.
|
|
7500
7843
|
*
|
|
7501
7844
|
* **Details**
|
|
7502
7845
|
*
|
|
@@ -7531,7 +7874,7 @@ export declare const retry: {
|
|
|
7531
7874
|
*/
|
|
7532
7875
|
<E, X, E2, R2>(policy: Schedule.Schedule<X, NoInfer<E>, E2, R2> | (($: <SO, SE, SR>(_: Schedule.Schedule<SO, NoInfer<E>, SE, SR>) => Schedule.Schedule<SO, E, SE, SR>) => Schedule.Schedule<X, NoInfer<E>, E2, R2>)): <A, R>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>;
|
|
7533
7876
|
/**
|
|
7534
|
-
*
|
|
7877
|
+
* Retries the stream according to the given schedule when it fails.
|
|
7535
7878
|
*
|
|
7536
7879
|
* **Details**
|
|
7537
7880
|
*
|
|
@@ -7567,7 +7910,7 @@ export declare const retry: {
|
|
|
7567
7910
|
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, policy: Schedule.Schedule<X, NoInfer<E>, E2, R2> | (($: <SO, SE, SR>(_: Schedule.Schedule<SO, NoInfer<E>, SE, SR>) => Schedule.Schedule<SO, E, SE, SR>) => Schedule.Schedule<X, NoInfer<E>, E2, R2>)): Stream<A, E | E2, R2 | R>;
|
|
7568
7911
|
};
|
|
7569
7912
|
/**
|
|
7570
|
-
*
|
|
7913
|
+
* Applies an `ExecutionPlan` to a stream, retrying with step-provided resources
|
|
7571
7914
|
* until it succeeds or the plan is exhausted.
|
|
7572
7915
|
*
|
|
7573
7916
|
* **Details**
|
|
@@ -7611,7 +7954,7 @@ export declare const retry: {
|
|
|
7611
7954
|
*/
|
|
7612
7955
|
export declare const withExecutionPlan: {
|
|
7613
7956
|
/**
|
|
7614
|
-
*
|
|
7957
|
+
* Applies an `ExecutionPlan` to a stream, retrying with step-provided resources
|
|
7615
7958
|
* until it succeeds or the plan is exhausted.
|
|
7616
7959
|
*
|
|
7617
7960
|
* **Details**
|
|
@@ -7662,7 +8005,7 @@ export declare const withExecutionPlan: {
|
|
|
7662
8005
|
readonly preventFallbackOnPartialStream?: boolean | undefined;
|
|
7663
8006
|
}): <A, E extends Input, R>(self: Stream<A, E, R>) => Stream<A, E | PolicyE, R2 | Exclude<R, Provides>>;
|
|
7664
8007
|
/**
|
|
7665
|
-
*
|
|
8008
|
+
* Applies an `ExecutionPlan` to a stream, retrying with step-provided resources
|
|
7666
8009
|
* until it succeeds or the plan is exhausted.
|
|
7667
8010
|
*
|
|
7668
8011
|
* **Details**
|
|
@@ -7970,7 +8313,7 @@ export declare const takeUntil: {
|
|
|
7970
8313
|
}): Stream<A, E, R>;
|
|
7971
8314
|
};
|
|
7972
8315
|
/**
|
|
7973
|
-
*
|
|
8316
|
+
* Takes stream elements until an effectful predicate returns `true`.
|
|
7974
8317
|
*
|
|
7975
8318
|
* **Example** (Taking until an effectful predicate matches)
|
|
7976
8319
|
*
|
|
@@ -7994,7 +8337,7 @@ export declare const takeUntil: {
|
|
|
7994
8337
|
*/
|
|
7995
8338
|
export declare const takeUntilEffect: {
|
|
7996
8339
|
/**
|
|
7997
|
-
*
|
|
8340
|
+
* Takes stream elements until an effectful predicate returns `true`.
|
|
7998
8341
|
*
|
|
7999
8342
|
* **Example** (Taking until an effectful predicate matches)
|
|
8000
8343
|
*
|
|
@@ -8020,7 +8363,7 @@ export declare const takeUntilEffect: {
|
|
|
8020
8363
|
readonly excludeLast?: boolean | undefined;
|
|
8021
8364
|
}): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
8022
8365
|
/**
|
|
8023
|
-
*
|
|
8366
|
+
* Takes stream elements until an effectful predicate returns `true`.
|
|
8024
8367
|
*
|
|
8025
8368
|
* **Example** (Taking until an effectful predicate matches)
|
|
8026
8369
|
*
|
|
@@ -8176,10 +8519,19 @@ export declare const takeWhile: {
|
|
|
8176
8519
|
* Takes the longest initial prefix accepted by a `Filter` and emits the
|
|
8177
8520
|
* filter's success values.
|
|
8178
8521
|
*
|
|
8522
|
+
* **When to use**
|
|
8523
|
+
*
|
|
8524
|
+
* Use to keep the leading stream elements that a `Filter` accepts, emit the
|
|
8525
|
+
* filter's success values, and stop at the first filter failure.
|
|
8526
|
+
*
|
|
8179
8527
|
* **Details**
|
|
8180
8528
|
*
|
|
8181
8529
|
* The stream stops at the first `Result.fail` returned by the filter.
|
|
8182
8530
|
*
|
|
8531
|
+
* @see {@link takeWhile} for keeping original elements with a boolean predicate or refinement
|
|
8532
|
+
* @see {@link filterMap} for filtering across the whole stream instead of only the leading prefix
|
|
8533
|
+
* @see {@link dropWhileFilter} for dropping the accepted prefix and keeping the remaining original elements
|
|
8534
|
+
*
|
|
8183
8535
|
* @category filtering
|
|
8184
8536
|
* @since 4.0.0
|
|
8185
8537
|
*/
|
|
@@ -8188,10 +8540,19 @@ export declare const takeWhileFilter: {
|
|
|
8188
8540
|
* Takes the longest initial prefix accepted by a `Filter` and emits the
|
|
8189
8541
|
* filter's success values.
|
|
8190
8542
|
*
|
|
8543
|
+
* **When to use**
|
|
8544
|
+
*
|
|
8545
|
+
* Use to keep the leading stream elements that a `Filter` accepts, emit the
|
|
8546
|
+
* filter's success values, and stop at the first filter failure.
|
|
8547
|
+
*
|
|
8191
8548
|
* **Details**
|
|
8192
8549
|
*
|
|
8193
8550
|
* The stream stops at the first `Result.fail` returned by the filter.
|
|
8194
8551
|
*
|
|
8552
|
+
* @see {@link takeWhile} for keeping original elements with a boolean predicate or refinement
|
|
8553
|
+
* @see {@link filterMap} for filtering across the whole stream instead of only the leading prefix
|
|
8554
|
+
* @see {@link dropWhileFilter} for dropping the accepted prefix and keeping the remaining original elements
|
|
8555
|
+
*
|
|
8195
8556
|
* @category filtering
|
|
8196
8557
|
* @since 4.0.0
|
|
8197
8558
|
*/
|
|
@@ -8200,10 +8561,19 @@ export declare const takeWhileFilter: {
|
|
|
8200
8561
|
* Takes the longest initial prefix accepted by a `Filter` and emits the
|
|
8201
8562
|
* filter's success values.
|
|
8202
8563
|
*
|
|
8564
|
+
* **When to use**
|
|
8565
|
+
*
|
|
8566
|
+
* Use to keep the leading stream elements that a `Filter` accepts, emit the
|
|
8567
|
+
* filter's success values, and stop at the first filter failure.
|
|
8568
|
+
*
|
|
8203
8569
|
* **Details**
|
|
8204
8570
|
*
|
|
8205
8571
|
* The stream stops at the first `Result.fail` returned by the filter.
|
|
8206
8572
|
*
|
|
8573
|
+
* @see {@link takeWhile} for keeping original elements with a boolean predicate or refinement
|
|
8574
|
+
* @see {@link filterMap} for filtering across the whole stream instead of only the leading prefix
|
|
8575
|
+
* @see {@link dropWhileFilter} for dropping the accepted prefix and keeping the remaining original elements
|
|
8576
|
+
*
|
|
8207
8577
|
* @category filtering
|
|
8208
8578
|
* @since 4.0.0
|
|
8209
8579
|
*/
|
|
@@ -8586,6 +8956,21 @@ export declare const dropWhile: {
|
|
|
8586
8956
|
/**
|
|
8587
8957
|
* Drops elements while the filter succeeds.
|
|
8588
8958
|
*
|
|
8959
|
+
* **When to use**
|
|
8960
|
+
*
|
|
8961
|
+
* Use when you need to remove a leading stream prefix based on a synchronous
|
|
8962
|
+
* `Filter` result while preserving the remaining original stream elements.
|
|
8963
|
+
*
|
|
8964
|
+
* **Details**
|
|
8965
|
+
*
|
|
8966
|
+
* `Result.succeed` drops the current element. The first `Result.fail` stops
|
|
8967
|
+
* dropping, emits that original element, and the rest of the source stream is
|
|
8968
|
+
* emitted without further filtering.
|
|
8969
|
+
*
|
|
8970
|
+
* @see {@link dropWhile} for boolean predicate prefix dropping
|
|
8971
|
+
* @see {@link takeWhileFilter} for keeping the accepted prefix as filter success values
|
|
8972
|
+
* @see {@link dropWhileEffect} for effectful predicate prefix dropping
|
|
8973
|
+
*
|
|
8589
8974
|
* @category filtering
|
|
8590
8975
|
* @since 4.0.0
|
|
8591
8976
|
*/
|
|
@@ -8593,6 +8978,21 @@ export declare const dropWhileFilter: {
|
|
|
8593
8978
|
/**
|
|
8594
8979
|
* Drops elements while the filter succeeds.
|
|
8595
8980
|
*
|
|
8981
|
+
* **When to use**
|
|
8982
|
+
*
|
|
8983
|
+
* Use when you need to remove a leading stream prefix based on a synchronous
|
|
8984
|
+
* `Filter` result while preserving the remaining original stream elements.
|
|
8985
|
+
*
|
|
8986
|
+
* **Details**
|
|
8987
|
+
*
|
|
8988
|
+
* `Result.succeed` drops the current element. The first `Result.fail` stops
|
|
8989
|
+
* dropping, emits that original element, and the rest of the source stream is
|
|
8990
|
+
* emitted without further filtering.
|
|
8991
|
+
*
|
|
8992
|
+
* @see {@link dropWhile} for boolean predicate prefix dropping
|
|
8993
|
+
* @see {@link takeWhileFilter} for keeping the accepted prefix as filter success values
|
|
8994
|
+
* @see {@link dropWhileEffect} for effectful predicate prefix dropping
|
|
8995
|
+
*
|
|
8596
8996
|
* @category filtering
|
|
8597
8997
|
* @since 4.0.0
|
|
8598
8998
|
*/
|
|
@@ -8600,6 +9000,21 @@ export declare const dropWhileFilter: {
|
|
|
8600
9000
|
/**
|
|
8601
9001
|
* Drops elements while the filter succeeds.
|
|
8602
9002
|
*
|
|
9003
|
+
* **When to use**
|
|
9004
|
+
*
|
|
9005
|
+
* Use when you need to remove a leading stream prefix based on a synchronous
|
|
9006
|
+
* `Filter` result while preserving the remaining original stream elements.
|
|
9007
|
+
*
|
|
9008
|
+
* **Details**
|
|
9009
|
+
*
|
|
9010
|
+
* `Result.succeed` drops the current element. The first `Result.fail` stops
|
|
9011
|
+
* dropping, emits that original element, and the rest of the source stream is
|
|
9012
|
+
* emitted without further filtering.
|
|
9013
|
+
*
|
|
9014
|
+
* @see {@link dropWhile} for boolean predicate prefix dropping
|
|
9015
|
+
* @see {@link takeWhileFilter} for keeping the accepted prefix as filter success values
|
|
9016
|
+
* @see {@link dropWhileEffect} for effectful predicate prefix dropping
|
|
9017
|
+
*
|
|
8603
9018
|
* @category filtering
|
|
8604
9019
|
* @since 4.0.0
|
|
8605
9020
|
*/
|
|
@@ -8784,12 +9199,12 @@ export declare const dropRight: {
|
|
|
8784
9199
|
* // Output: [ [ 1, 2 ], [ 3, 4 ] ]
|
|
8785
9200
|
* ```
|
|
8786
9201
|
*
|
|
8787
|
-
* @category
|
|
9202
|
+
* @category grouping
|
|
8788
9203
|
* @since 2.0.0
|
|
8789
9204
|
*/
|
|
8790
9205
|
export declare const chunks: <A, E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
8791
9206
|
/**
|
|
8792
|
-
*
|
|
9207
|
+
* Groups the stream into arrays of the specified size, preserving element order.
|
|
8793
9208
|
*
|
|
8794
9209
|
* **Details**
|
|
8795
9210
|
*
|
|
@@ -8813,12 +9228,12 @@ export declare const chunks: <A, E, R>(self: Stream<A, E, R>) => Stream<Arr.NonE
|
|
|
8813
9228
|
* // Output: [ [ 1, 2 ], [ 3, 4 ], [ 5 ] ]
|
|
8814
9229
|
* ```
|
|
8815
9230
|
*
|
|
8816
|
-
* @category
|
|
9231
|
+
* @category grouping
|
|
8817
9232
|
* @since 2.0.0
|
|
8818
9233
|
*/
|
|
8819
9234
|
export declare const rechunk: {
|
|
8820
9235
|
/**
|
|
8821
|
-
*
|
|
9236
|
+
* Groups the stream into arrays of the specified size, preserving element order.
|
|
8822
9237
|
*
|
|
8823
9238
|
* **Details**
|
|
8824
9239
|
*
|
|
@@ -8842,12 +9257,12 @@ export declare const rechunk: {
|
|
|
8842
9257
|
* // Output: [ [ 1, 2 ], [ 3, 4 ], [ 5 ] ]
|
|
8843
9258
|
* ```
|
|
8844
9259
|
*
|
|
8845
|
-
* @category
|
|
9260
|
+
* @category grouping
|
|
8846
9261
|
* @since 2.0.0
|
|
8847
9262
|
*/
|
|
8848
9263
|
(size: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
8849
9264
|
/**
|
|
8850
|
-
*
|
|
9265
|
+
* Groups the stream into arrays of the specified size, preserving element order.
|
|
8851
9266
|
*
|
|
8852
9267
|
* **Details**
|
|
8853
9268
|
*
|
|
@@ -8871,7 +9286,7 @@ export declare const rechunk: {
|
|
|
8871
9286
|
* // Output: [ [ 1, 2 ], [ 3, 4 ], [ 5 ] ]
|
|
8872
9287
|
* ```
|
|
8873
9288
|
*
|
|
8874
|
-
* @category
|
|
9289
|
+
* @category grouping
|
|
8875
9290
|
* @since 2.0.0
|
|
8876
9291
|
*/
|
|
8877
9292
|
<A, E, R>(self: Stream<A, E, R>, size: number): Stream<A, E, R>;
|
|
@@ -8895,7 +9310,7 @@ export declare const rechunk: {
|
|
|
8895
9310
|
* // Output: [ [1, 2], [2, 3], [3, 4], [4, 5] ]
|
|
8896
9311
|
* ```
|
|
8897
9312
|
*
|
|
8898
|
-
* @category
|
|
9313
|
+
* @category grouping
|
|
8899
9314
|
* @since 2.0.0
|
|
8900
9315
|
*/
|
|
8901
9316
|
export declare const sliding: {
|
|
@@ -8918,7 +9333,7 @@ export declare const sliding: {
|
|
|
8918
9333
|
* // Output: [ [1, 2], [2, 3], [3, 4], [4, 5] ]
|
|
8919
9334
|
* ```
|
|
8920
9335
|
*
|
|
8921
|
-
* @category
|
|
9336
|
+
* @category grouping
|
|
8922
9337
|
* @since 2.0.0
|
|
8923
9338
|
*/
|
|
8924
9339
|
(chunkSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
@@ -8941,7 +9356,7 @@ export declare const sliding: {
|
|
|
8941
9356
|
* // Output: [ [1, 2], [2, 3], [3, 4], [4, 5] ]
|
|
8942
9357
|
* ```
|
|
8943
9358
|
*
|
|
8944
|
-
* @category
|
|
9359
|
+
* @category grouping
|
|
8945
9360
|
* @since 2.0.0
|
|
8946
9361
|
*/
|
|
8947
9362
|
<A, E, R>(self: Stream<A, E, R>, chunkSize: number): Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
@@ -8966,7 +9381,7 @@ export declare const sliding: {
|
|
|
8966
9381
|
* // Output: [ [ 1, 2, 3 ], [ 3, 4, 5 ] ]
|
|
8967
9382
|
* ```
|
|
8968
9383
|
*
|
|
8969
|
-
* @category
|
|
9384
|
+
* @category grouping
|
|
8970
9385
|
* @since 2.0.0
|
|
8971
9386
|
*/
|
|
8972
9387
|
export declare const slidingSize: {
|
|
@@ -8990,7 +9405,7 @@ export declare const slidingSize: {
|
|
|
8990
9405
|
* // Output: [ [ 1, 2, 3 ], [ 3, 4, 5 ] ]
|
|
8991
9406
|
* ```
|
|
8992
9407
|
*
|
|
8993
|
-
* @category
|
|
9408
|
+
* @category grouping
|
|
8994
9409
|
* @since 2.0.0
|
|
8995
9410
|
*/
|
|
8996
9411
|
(chunkSize: number, stepSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
@@ -9014,7 +9429,7 @@ export declare const slidingSize: {
|
|
|
9014
9429
|
* // Output: [ [ 1, 2, 3 ], [ 3, 4, 5 ] ]
|
|
9015
9430
|
* ```
|
|
9016
9431
|
*
|
|
9017
|
-
* @category
|
|
9432
|
+
* @category grouping
|
|
9018
9433
|
* @since 2.0.0
|
|
9019
9434
|
*/
|
|
9020
9435
|
<A, E, R>(self: Stream<A, E, R>, chunkSize: number, stepSize: number): Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
@@ -9043,7 +9458,7 @@ export declare const slidingSize: {
|
|
|
9043
9458
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
9044
9459
|
* ```
|
|
9045
9460
|
*
|
|
9046
|
-
* @category
|
|
9461
|
+
* @category grouping
|
|
9047
9462
|
* @since 2.0.0
|
|
9048
9463
|
*/
|
|
9049
9464
|
export declare const split: {
|
|
@@ -9071,7 +9486,7 @@ export declare const split: {
|
|
|
9071
9486
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
9072
9487
|
* ```
|
|
9073
9488
|
*
|
|
9074
|
-
* @category
|
|
9489
|
+
* @category grouping
|
|
9075
9490
|
* @since 2.0.0
|
|
9076
9491
|
*/
|
|
9077
9492
|
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<Exclude<A, B>>, E, R>;
|
|
@@ -9099,7 +9514,7 @@ export declare const split: {
|
|
|
9099
9514
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
9100
9515
|
* ```
|
|
9101
9516
|
*
|
|
9102
|
-
* @category
|
|
9517
|
+
* @category grouping
|
|
9103
9518
|
* @since 2.0.0
|
|
9104
9519
|
*/
|
|
9105
9520
|
<A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
@@ -9127,7 +9542,7 @@ export declare const split: {
|
|
|
9127
9542
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
9128
9543
|
* ```
|
|
9129
9544
|
*
|
|
9130
|
-
* @category
|
|
9545
|
+
* @category grouping
|
|
9131
9546
|
* @since 2.0.0
|
|
9132
9547
|
*/
|
|
9133
9548
|
<A, E, R, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<Arr.NonEmptyReadonlyArray<Exclude<A, B>>, E, R>;
|
|
@@ -9155,7 +9570,7 @@ export declare const split: {
|
|
|
9155
9570
|
* // Output: [ [1, 2, 3], [5, 6, 7], [9] ]
|
|
9156
9571
|
* ```
|
|
9157
9572
|
*
|
|
9158
|
-
* @category
|
|
9573
|
+
* @category grouping
|
|
9159
9574
|
* @since 2.0.0
|
|
9160
9575
|
*/
|
|
9161
9576
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
@@ -9273,11 +9688,18 @@ export declare const combine: {
|
|
|
9273
9688
|
<A, E, R, A2, E2, R2, S, A3, E3, R3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, s: LazyArg<S>, f: (s: S, pullLeft: Pull.Pull<A, E, void>, pullRight: Pull.Pull<A2, E2, void>) => Effect.Effect<readonly [A3, S], E3, R3>): Stream<A3, E3, R | R2 | R3>;
|
|
9274
9689
|
};
|
|
9275
9690
|
/**
|
|
9276
|
-
* Combines
|
|
9277
|
-
*
|
|
9278
|
-
*
|
|
9279
|
-
*
|
|
9280
|
-
*
|
|
9691
|
+
* Combines two streams chunk-by-chunk with a stateful pull function.
|
|
9692
|
+
*
|
|
9693
|
+
* **When to use**
|
|
9694
|
+
*
|
|
9695
|
+
* Use to coordinate pulling chunks from two streams when each emitted chunk
|
|
9696
|
+
* depends on both sides and local state.
|
|
9697
|
+
*
|
|
9698
|
+
* **Details**
|
|
9699
|
+
*
|
|
9700
|
+
* The combining function receives the current state and pull functions for the
|
|
9701
|
+
* left and right streams. It returns the next non-empty chunk together with the
|
|
9702
|
+
* next state.
|
|
9281
9703
|
*
|
|
9282
9704
|
* **Example** (Combining stream chunks with state)
|
|
9283
9705
|
*
|
|
@@ -9310,11 +9732,18 @@ export declare const combine: {
|
|
|
9310
9732
|
*/
|
|
9311
9733
|
export declare const combineArray: {
|
|
9312
9734
|
/**
|
|
9313
|
-
* Combines
|
|
9314
|
-
*
|
|
9315
|
-
*
|
|
9316
|
-
*
|
|
9317
|
-
*
|
|
9735
|
+
* Combines two streams chunk-by-chunk with a stateful pull function.
|
|
9736
|
+
*
|
|
9737
|
+
* **When to use**
|
|
9738
|
+
*
|
|
9739
|
+
* Use to coordinate pulling chunks from two streams when each emitted chunk
|
|
9740
|
+
* depends on both sides and local state.
|
|
9741
|
+
*
|
|
9742
|
+
* **Details**
|
|
9743
|
+
*
|
|
9744
|
+
* The combining function receives the current state and pull functions for the
|
|
9745
|
+
* left and right streams. It returns the next non-empty chunk together with the
|
|
9746
|
+
* next state.
|
|
9318
9747
|
*
|
|
9319
9748
|
* **Example** (Combining stream chunks with state)
|
|
9320
9749
|
*
|
|
@@ -9347,11 +9776,18 @@ export declare const combineArray: {
|
|
|
9347
9776
|
*/
|
|
9348
9777
|
<A2, E2, R2, S, E, A, A3, E3, R3>(that: Stream<A2, E2, R2>, s: LazyArg<S>, f: (s: S, pullLeft: Pull.Pull<Arr.NonEmptyReadonlyArray<A>, E, void>, pullRight: Pull.Pull<Arr.NonEmptyReadonlyArray<A2>, E2, void>) => Effect.Effect<readonly [Arr.NonEmptyReadonlyArray<A3>, S], E3, R3>): <R>(self: Stream<A, E, R>) => Stream<A3, Pull.ExcludeDone<E3>, R2 | R3 | R>;
|
|
9349
9778
|
/**
|
|
9350
|
-
* Combines
|
|
9351
|
-
*
|
|
9352
|
-
*
|
|
9353
|
-
*
|
|
9354
|
-
*
|
|
9779
|
+
* Combines two streams chunk-by-chunk with a stateful pull function.
|
|
9780
|
+
*
|
|
9781
|
+
* **When to use**
|
|
9782
|
+
*
|
|
9783
|
+
* Use to coordinate pulling chunks from two streams when each emitted chunk
|
|
9784
|
+
* depends on both sides and local state.
|
|
9785
|
+
*
|
|
9786
|
+
* **Details**
|
|
9787
|
+
*
|
|
9788
|
+
* The combining function receives the current state and pull functions for the
|
|
9789
|
+
* left and right streams. It returns the next non-empty chunk together with the
|
|
9790
|
+
* next state.
|
|
9355
9791
|
*
|
|
9356
9792
|
* **Example** (Combining stream chunks with state)
|
|
9357
9793
|
*
|
|
@@ -9385,7 +9821,7 @@ export declare const combineArray: {
|
|
|
9385
9821
|
<R, A2, E2, R2, S, E, A, A3, E3, R3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, s: LazyArg<S>, f: (s: S, pullLeft: Pull.Pull<Arr.NonEmptyReadonlyArray<A>, E, void>, pullRight: Pull.Pull<Arr.NonEmptyReadonlyArray<A2>, E2, void>) => Effect.Effect<readonly [Arr.NonEmptyReadonlyArray<A3>, S], E3, R3>): Stream<A3, Pull.ExcludeDone<E3>, R | R2 | R3>;
|
|
9386
9822
|
};
|
|
9387
9823
|
/**
|
|
9388
|
-
*
|
|
9824
|
+
* Maps elements statefully, emitting zero or more outputs per input.
|
|
9389
9825
|
*
|
|
9390
9826
|
* **Example** (Statefully mapping stream values)
|
|
9391
9827
|
*
|
|
@@ -9413,7 +9849,7 @@ export declare const combineArray: {
|
|
|
9413
9849
|
*/
|
|
9414
9850
|
export declare const mapAccum: {
|
|
9415
9851
|
/**
|
|
9416
|
-
*
|
|
9852
|
+
* Maps elements statefully, emitting zero or more outputs per input.
|
|
9417
9853
|
*
|
|
9418
9854
|
* **Example** (Statefully mapping stream values)
|
|
9419
9855
|
*
|
|
@@ -9443,7 +9879,7 @@ export declare const mapAccum: {
|
|
|
9443
9879
|
readonly onHalt?: ((state: S) => ReadonlyArray<B>) | undefined;
|
|
9444
9880
|
}): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
9445
9881
|
/**
|
|
9446
|
-
*
|
|
9882
|
+
* Maps elements statefully, emitting zero or more outputs per input.
|
|
9447
9883
|
*
|
|
9448
9884
|
* **Example** (Statefully mapping stream values)
|
|
9449
9885
|
*
|
|
@@ -9474,7 +9910,7 @@ export declare const mapAccum: {
|
|
|
9474
9910
|
}): Stream<B, E, R>;
|
|
9475
9911
|
};
|
|
9476
9912
|
/**
|
|
9477
|
-
*
|
|
9913
|
+
* Maps over non-empty chunk arrays statefully, emitting zero or more values per chunk.
|
|
9478
9914
|
*
|
|
9479
9915
|
* **Details**
|
|
9480
9916
|
*
|
|
@@ -9506,7 +9942,7 @@ export declare const mapAccum: {
|
|
|
9506
9942
|
*/
|
|
9507
9943
|
export declare const mapAccumArray: {
|
|
9508
9944
|
/**
|
|
9509
|
-
*
|
|
9945
|
+
* Maps over non-empty chunk arrays statefully, emitting zero or more values per chunk.
|
|
9510
9946
|
*
|
|
9511
9947
|
* **Details**
|
|
9512
9948
|
*
|
|
@@ -9540,7 +9976,7 @@ export declare const mapAccumArray: {
|
|
|
9540
9976
|
readonly onHalt?: ((state: S) => ReadonlyArray<B>) | undefined;
|
|
9541
9977
|
}): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
9542
9978
|
/**
|
|
9543
|
-
*
|
|
9979
|
+
* Maps over non-empty chunk arrays statefully, emitting zero or more values per chunk.
|
|
9544
9980
|
*
|
|
9545
9981
|
* **Details**
|
|
9546
9982
|
*
|
|
@@ -9575,7 +10011,7 @@ export declare const mapAccumArray: {
|
|
|
9575
10011
|
}): Stream<B, E, R>;
|
|
9576
10012
|
};
|
|
9577
10013
|
/**
|
|
9578
|
-
*
|
|
10014
|
+
* Maps each element statefully and effectfully, emitting zero or more output
|
|
9579
10015
|
* values per input.
|
|
9580
10016
|
*
|
|
9581
10017
|
* **Details**
|
|
@@ -9609,7 +10045,7 @@ export declare const mapAccumArray: {
|
|
|
9609
10045
|
*/
|
|
9610
10046
|
export declare const mapAccumEffect: {
|
|
9611
10047
|
/**
|
|
9612
|
-
*
|
|
10048
|
+
* Maps each element statefully and effectfully, emitting zero or more output
|
|
9613
10049
|
* values per input.
|
|
9614
10050
|
*
|
|
9615
10051
|
* **Details**
|
|
@@ -9645,7 +10081,7 @@ export declare const mapAccumEffect: {
|
|
|
9645
10081
|
readonly onHalt?: ((state: S) => ReadonlyArray<B>) | undefined;
|
|
9646
10082
|
}): <E, R>(self: Stream<A, E, R>) => Stream<B, E | E2, R | R2>;
|
|
9647
10083
|
/**
|
|
9648
|
-
*
|
|
10084
|
+
* Maps each element statefully and effectfully, emitting zero or more output
|
|
9649
10085
|
* values per input.
|
|
9650
10086
|
*
|
|
9651
10087
|
* **Details**
|
|
@@ -9682,7 +10118,7 @@ export declare const mapAccumEffect: {
|
|
|
9682
10118
|
}): Stream<B, E | E2, R | R2>;
|
|
9683
10119
|
};
|
|
9684
10120
|
/**
|
|
9685
|
-
*
|
|
10121
|
+
* Maps each non-empty input chunk statefully and effectfully, emitting zero or
|
|
9686
10122
|
* more output values per chunk.
|
|
9687
10123
|
*
|
|
9688
10124
|
* **Details**
|
|
@@ -9718,7 +10154,7 @@ export declare const mapAccumEffect: {
|
|
|
9718
10154
|
*/
|
|
9719
10155
|
export declare const mapAccumArrayEffect: {
|
|
9720
10156
|
/**
|
|
9721
|
-
*
|
|
10157
|
+
* Maps each non-empty input chunk statefully and effectfully, emitting zero or
|
|
9722
10158
|
* more output values per chunk.
|
|
9723
10159
|
*
|
|
9724
10160
|
* **Details**
|
|
@@ -9756,7 +10192,7 @@ export declare const mapAccumArrayEffect: {
|
|
|
9756
10192
|
readonly onHalt?: ((state: S) => ReadonlyArray<B>) | undefined;
|
|
9757
10193
|
}): <E, R>(self: Stream<A, E, R>) => Stream<B, E | E2, R | R2>;
|
|
9758
10194
|
/**
|
|
9759
|
-
*
|
|
10195
|
+
* Maps each non-empty input chunk statefully and effectfully, emitting zero or
|
|
9760
10196
|
* more output values per chunk.
|
|
9761
10197
|
*
|
|
9762
10198
|
* **Details**
|
|
@@ -9868,7 +10304,7 @@ export declare const scan: {
|
|
|
9868
10304
|
<A, E, R, S>(self: Stream<A, E, R>, initial: S, f: (s: S, a: A) => S): Stream<S, E, R>;
|
|
9869
10305
|
};
|
|
9870
10306
|
/**
|
|
9871
|
-
*
|
|
10307
|
+
* Accumulates state effectfully and emits the initial state plus each accumulated state.
|
|
9872
10308
|
*
|
|
9873
10309
|
* **Example** (Effectfully scanning stream state)
|
|
9874
10310
|
*
|
|
@@ -9890,7 +10326,7 @@ export declare const scan: {
|
|
|
9890
10326
|
*/
|
|
9891
10327
|
export declare const scanEffect: {
|
|
9892
10328
|
/**
|
|
9893
|
-
*
|
|
10329
|
+
* Accumulates state effectfully and emits the initial state plus each accumulated state.
|
|
9894
10330
|
*
|
|
9895
10331
|
* **Example** (Effectfully scanning stream state)
|
|
9896
10332
|
*
|
|
@@ -9912,7 +10348,7 @@ export declare const scanEffect: {
|
|
|
9912
10348
|
*/
|
|
9913
10349
|
<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>;
|
|
9914
10350
|
/**
|
|
9915
|
-
*
|
|
10351
|
+
* Accumulates state effectfully and emits the initial state plus each accumulated state.
|
|
9916
10352
|
*
|
|
9917
10353
|
* **Example** (Effectfully scanning stream state)
|
|
9918
10354
|
*
|
|
@@ -9955,7 +10391,7 @@ export declare const scanEffect: {
|
|
|
9955
10391
|
* })
|
|
9956
10392
|
* ```
|
|
9957
10393
|
*
|
|
9958
|
-
* @category
|
|
10394
|
+
* @category rate limiting
|
|
9959
10395
|
* @since 2.0.0
|
|
9960
10396
|
*/
|
|
9961
10397
|
export declare const debounce: {
|
|
@@ -9980,7 +10416,7 @@ export declare const debounce: {
|
|
|
9980
10416
|
* })
|
|
9981
10417
|
* ```
|
|
9982
10418
|
*
|
|
9983
|
-
* @category
|
|
10419
|
+
* @category rate limiting
|
|
9984
10420
|
* @since 2.0.0
|
|
9985
10421
|
*/
|
|
9986
10422
|
(duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
@@ -10005,19 +10441,23 @@ export declare const debounce: {
|
|
|
10005
10441
|
* })
|
|
10006
10442
|
* ```
|
|
10007
10443
|
*
|
|
10008
|
-
* @category
|
|
10444
|
+
* @category rate limiting
|
|
10009
10445
|
* @since 2.0.0
|
|
10010
10446
|
*/
|
|
10011
10447
|
<A, E, R>(self: Stream<A, E, R>, duration: Duration.Input): Stream<A, E, R>;
|
|
10012
10448
|
};
|
|
10013
10449
|
/**
|
|
10014
|
-
*
|
|
10015
|
-
*
|
|
10016
|
-
*
|
|
10017
|
-
*
|
|
10450
|
+
* Rate-limits stream chunks with an effectful cost function.
|
|
10451
|
+
*
|
|
10452
|
+
* **When to use**
|
|
10453
|
+
*
|
|
10454
|
+
* Use to throttle chunks when computing each chunk's cost requires an effect.
|
|
10018
10455
|
*
|
|
10019
10456
|
* **Details**
|
|
10020
10457
|
*
|
|
10458
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
10459
|
+
* and each chunk consumes the cost returned by the effectful `cost` function.
|
|
10460
|
+
*
|
|
10021
10461
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
10022
10462
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
10023
10463
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -10046,18 +10486,22 @@ export declare const debounce: {
|
|
|
10046
10486
|
* // Output: [0, 1, 2, 3, 4, 5]
|
|
10047
10487
|
* ```
|
|
10048
10488
|
*
|
|
10049
|
-
* @category
|
|
10489
|
+
* @category rate limiting
|
|
10050
10490
|
* @since 2.0.0
|
|
10051
10491
|
*/
|
|
10052
10492
|
export declare const throttleEffect: {
|
|
10053
10493
|
/**
|
|
10054
|
-
*
|
|
10055
|
-
*
|
|
10056
|
-
*
|
|
10057
|
-
*
|
|
10494
|
+
* Rate-limits stream chunks with an effectful cost function.
|
|
10495
|
+
*
|
|
10496
|
+
* **When to use**
|
|
10497
|
+
*
|
|
10498
|
+
* Use to throttle chunks when computing each chunk's cost requires an effect.
|
|
10058
10499
|
*
|
|
10059
10500
|
* **Details**
|
|
10060
10501
|
*
|
|
10502
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
10503
|
+
* and each chunk consumes the cost returned by the effectful `cost` function.
|
|
10504
|
+
*
|
|
10061
10505
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
10062
10506
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
10063
10507
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -10086,7 +10530,7 @@ export declare const throttleEffect: {
|
|
|
10086
10530
|
* // Output: [0, 1, 2, 3, 4, 5]
|
|
10087
10531
|
* ```
|
|
10088
10532
|
*
|
|
10089
|
-
* @category
|
|
10533
|
+
* @category rate limiting
|
|
10090
10534
|
* @since 2.0.0
|
|
10091
10535
|
*/
|
|
10092
10536
|
<A, E2, R2>(options: {
|
|
@@ -10097,13 +10541,17 @@ export declare const throttleEffect: {
|
|
|
10097
10541
|
readonly strategy?: "enforce" | "shape" | undefined;
|
|
10098
10542
|
}): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
10099
10543
|
/**
|
|
10100
|
-
*
|
|
10101
|
-
*
|
|
10102
|
-
*
|
|
10103
|
-
*
|
|
10544
|
+
* Rate-limits stream chunks with an effectful cost function.
|
|
10545
|
+
*
|
|
10546
|
+
* **When to use**
|
|
10547
|
+
*
|
|
10548
|
+
* Use to throttle chunks when computing each chunk's cost requires an effect.
|
|
10104
10549
|
*
|
|
10105
10550
|
* **Details**
|
|
10106
10551
|
*
|
|
10552
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
10553
|
+
* and each chunk consumes the cost returned by the effectful `cost` function.
|
|
10554
|
+
*
|
|
10107
10555
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
10108
10556
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
10109
10557
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -10132,7 +10580,7 @@ export declare const throttleEffect: {
|
|
|
10132
10580
|
* // Output: [0, 1, 2, 3, 4, 5]
|
|
10133
10581
|
* ```
|
|
10134
10582
|
*
|
|
10135
|
-
* @category
|
|
10583
|
+
* @category rate limiting
|
|
10136
10584
|
* @since 2.0.0
|
|
10137
10585
|
*/
|
|
10138
10586
|
<A, E, R, E2, R2>(self: Stream<A, E, R>, options: {
|
|
@@ -10144,12 +10592,17 @@ export declare const throttleEffect: {
|
|
|
10144
10592
|
}): Stream<A, E | E2, R | R2>;
|
|
10145
10593
|
};
|
|
10146
10594
|
/**
|
|
10147
|
-
*
|
|
10148
|
-
*
|
|
10149
|
-
*
|
|
10595
|
+
* Rate-limits stream chunks with a synchronous cost function.
|
|
10596
|
+
*
|
|
10597
|
+
* **When to use**
|
|
10598
|
+
*
|
|
10599
|
+
* Use to throttle chunks when each chunk's cost can be computed synchronously.
|
|
10150
10600
|
*
|
|
10151
10601
|
* **Details**
|
|
10152
10602
|
*
|
|
10603
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
10604
|
+
* and each chunk consumes the cost returned by `cost`.
|
|
10605
|
+
*
|
|
10153
10606
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
10154
10607
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
10155
10608
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -10178,17 +10631,22 @@ export declare const throttleEffect: {
|
|
|
10178
10631
|
* })
|
|
10179
10632
|
* ```
|
|
10180
10633
|
*
|
|
10181
|
-
* @category
|
|
10634
|
+
* @category rate limiting
|
|
10182
10635
|
* @since 2.0.0
|
|
10183
10636
|
*/
|
|
10184
10637
|
export declare const throttle: {
|
|
10185
10638
|
/**
|
|
10186
|
-
*
|
|
10187
|
-
*
|
|
10188
|
-
*
|
|
10639
|
+
* Rate-limits stream chunks with a synchronous cost function.
|
|
10640
|
+
*
|
|
10641
|
+
* **When to use**
|
|
10642
|
+
*
|
|
10643
|
+
* Use to throttle chunks when each chunk's cost can be computed synchronously.
|
|
10189
10644
|
*
|
|
10190
10645
|
* **Details**
|
|
10191
10646
|
*
|
|
10647
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
10648
|
+
* and each chunk consumes the cost returned by `cost`.
|
|
10649
|
+
*
|
|
10192
10650
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
10193
10651
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
10194
10652
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -10217,7 +10675,7 @@ export declare const throttle: {
|
|
|
10217
10675
|
* })
|
|
10218
10676
|
* ```
|
|
10219
10677
|
*
|
|
10220
|
-
* @category
|
|
10678
|
+
* @category rate limiting
|
|
10221
10679
|
* @since 2.0.0
|
|
10222
10680
|
*/
|
|
10223
10681
|
<A>(options: {
|
|
@@ -10228,12 +10686,17 @@ export declare const throttle: {
|
|
|
10228
10686
|
readonly strategy?: "enforce" | "shape" | undefined;
|
|
10229
10687
|
}): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
10230
10688
|
/**
|
|
10231
|
-
*
|
|
10232
|
-
*
|
|
10233
|
-
*
|
|
10689
|
+
* Rate-limits stream chunks with a synchronous cost function.
|
|
10690
|
+
*
|
|
10691
|
+
* **When to use**
|
|
10692
|
+
*
|
|
10693
|
+
* Use to throttle chunks when each chunk's cost can be computed synchronously.
|
|
10234
10694
|
*
|
|
10235
10695
|
* **Details**
|
|
10236
10696
|
*
|
|
10697
|
+
* Uses a token bucket. The bucket can accumulate up to `units + burst` tokens,
|
|
10698
|
+
* and each chunk consumes the cost returned by `cost`.
|
|
10699
|
+
*
|
|
10237
10700
|
* If using the "enforce" strategy, arrays that do not meet the bandwidth
|
|
10238
10701
|
* constraints are dropped. If using the "shape" strategy, arrays are delayed
|
|
10239
10702
|
* until they can be emitted without exceeding the bandwidth constraints.
|
|
@@ -10262,7 +10725,7 @@ export declare const throttle: {
|
|
|
10262
10725
|
* })
|
|
10263
10726
|
* ```
|
|
10264
10727
|
*
|
|
10265
|
-
* @category
|
|
10728
|
+
* @category rate limiting
|
|
10266
10729
|
* @since 2.0.0
|
|
10267
10730
|
*/
|
|
10268
10731
|
<A, E, R>(self: Stream<A, E, R>, options: {
|
|
@@ -10297,7 +10760,7 @@ export declare const throttle: {
|
|
|
10297
10760
|
* // Output: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8 ] ]
|
|
10298
10761
|
* ```
|
|
10299
10762
|
*
|
|
10300
|
-
* @category
|
|
10763
|
+
* @category grouping
|
|
10301
10764
|
* @since 2.0.0
|
|
10302
10765
|
*/
|
|
10303
10766
|
export declare const grouped: {
|
|
@@ -10325,7 +10788,7 @@ export declare const grouped: {
|
|
|
10325
10788
|
* // Output: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8 ] ]
|
|
10326
10789
|
* ```
|
|
10327
10790
|
*
|
|
10328
|
-
* @category
|
|
10791
|
+
* @category grouping
|
|
10329
10792
|
* @since 2.0.0
|
|
10330
10793
|
*/
|
|
10331
10794
|
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
@@ -10353,7 +10816,7 @@ export declare const grouped: {
|
|
|
10353
10816
|
* // Output: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8 ] ]
|
|
10354
10817
|
* ```
|
|
10355
10818
|
*
|
|
10356
|
-
* @category
|
|
10819
|
+
* @category grouping
|
|
10357
10820
|
* @since 2.0.0
|
|
10358
10821
|
*/
|
|
10359
10822
|
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<Arr.NonEmptyReadonlyArray<A>, E, R>;
|
|
@@ -10379,7 +10842,7 @@ export declare const grouped: {
|
|
|
10379
10842
|
* // Output: [ [ 1, 2 ], [ 3 ] ]
|
|
10380
10843
|
* ```
|
|
10381
10844
|
*
|
|
10382
|
-
* @category
|
|
10845
|
+
* @category grouping
|
|
10383
10846
|
* @since 2.0.0
|
|
10384
10847
|
*/
|
|
10385
10848
|
export declare const groupedWithin: {
|
|
@@ -10404,7 +10867,7 @@ export declare const groupedWithin: {
|
|
|
10404
10867
|
* // Output: [ [ 1, 2 ], [ 3 ] ]
|
|
10405
10868
|
* ```
|
|
10406
10869
|
*
|
|
10407
|
-
* @category
|
|
10870
|
+
* @category grouping
|
|
10408
10871
|
* @since 2.0.0
|
|
10409
10872
|
*/
|
|
10410
10873
|
(chunkSize: number, duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<Array<A>, E, R>;
|
|
@@ -10429,7 +10892,7 @@ export declare const groupedWithin: {
|
|
|
10429
10892
|
* // Output: [ [ 1, 2 ], [ 3 ] ]
|
|
10430
10893
|
* ```
|
|
10431
10894
|
*
|
|
10432
|
-
* @category
|
|
10895
|
+
* @category grouping
|
|
10433
10896
|
* @since 2.0.0
|
|
10434
10897
|
*/
|
|
10435
10898
|
<A, E, R>(self: Stream<A, E, R>, chunkSize: number, duration: Duration.Input): Stream<Array<A>, E, R>;
|
|
@@ -10463,7 +10926,7 @@ export declare const groupedWithin: {
|
|
|
10463
10926
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
10464
10927
|
* ```
|
|
10465
10928
|
*
|
|
10466
|
-
* @category
|
|
10929
|
+
* @category grouping
|
|
10467
10930
|
* @since 2.0.0
|
|
10468
10931
|
*/
|
|
10469
10932
|
export declare const groupBy: {
|
|
@@ -10496,7 +10959,7 @@ export declare const groupBy: {
|
|
|
10496
10959
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
10497
10960
|
* ```
|
|
10498
10961
|
*
|
|
10499
|
-
* @category
|
|
10962
|
+
* @category grouping
|
|
10500
10963
|
* @since 2.0.0
|
|
10501
10964
|
*/
|
|
10502
10965
|
<A, K, V, E2, R2>(f: (a: NoInfer<A>) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
|
|
@@ -10532,7 +10995,7 @@ export declare const groupBy: {
|
|
|
10532
10995
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
10533
10996
|
* ```
|
|
10534
10997
|
*
|
|
10535
|
-
* @category
|
|
10998
|
+
* @category grouping
|
|
10536
10999
|
* @since 2.0.0
|
|
10537
11000
|
*/
|
|
10538
11001
|
<A, E, R, K, V, E2, R2>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
|
|
@@ -10567,7 +11030,7 @@ export declare const groupBy: {
|
|
|
10567
11030
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
10568
11031
|
* ```
|
|
10569
11032
|
*
|
|
10570
|
-
* @category
|
|
11033
|
+
* @category grouping
|
|
10571
11034
|
* @since 2.0.0
|
|
10572
11035
|
*/
|
|
10573
11036
|
export declare const groupByKey: {
|
|
@@ -10598,7 +11061,7 @@ export declare const groupByKey: {
|
|
|
10598
11061
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
10599
11062
|
* ```
|
|
10600
11063
|
*
|
|
10601
|
-
* @category
|
|
11064
|
+
* @category grouping
|
|
10602
11065
|
* @since 2.0.0
|
|
10603
11066
|
*/
|
|
10604
11067
|
<A, K>(f: (a: NoInfer<A>) => K, options?: {
|
|
@@ -10632,7 +11095,7 @@ export declare const groupByKey: {
|
|
|
10632
11095
|
* // Output: [ [ "odd", [ 1, 3, 5 ] ], [ "even", [ 2, 4 ] ] ]
|
|
10633
11096
|
* ```
|
|
10634
11097
|
*
|
|
10635
|
-
* @category
|
|
11098
|
+
* @category grouping
|
|
10636
11099
|
* @since 2.0.0
|
|
10637
11100
|
*/
|
|
10638
11101
|
<A, E, R, K>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => K, options?: {
|
|
@@ -10643,39 +11106,66 @@ export declare const groupByKey: {
|
|
|
10643
11106
|
/**
|
|
10644
11107
|
* Groups consecutive elements that have equal keys into non-empty arrays.
|
|
10645
11108
|
*
|
|
11109
|
+
* **When to use**
|
|
11110
|
+
*
|
|
11111
|
+
* Use when a stream is already ordered by the grouping key and you want to emit
|
|
11112
|
+
* each consecutive run as a non-empty array while keeping later non-adjacent
|
|
11113
|
+
* runs separate.
|
|
11114
|
+
*
|
|
10646
11115
|
* **Details**
|
|
10647
11116
|
*
|
|
10648
11117
|
* The key is computed with `f`; adjacent elements whose keys are equal by
|
|
10649
11118
|
* `Equal.equals` are emitted as one `[key, group]`. Later non-adjacent runs
|
|
10650
11119
|
* with the same key are emitted separately.
|
|
10651
11120
|
*
|
|
10652
|
-
* @
|
|
11121
|
+
* @see {@link groupByKey} for grouping all elements with the same key across the stream
|
|
11122
|
+
* @see {@link groupBy} for custom grouped stream construction
|
|
11123
|
+
*
|
|
11124
|
+
* @category grouping
|
|
10653
11125
|
* @since 2.0.0
|
|
10654
11126
|
*/
|
|
10655
11127
|
export declare const groupAdjacentBy: {
|
|
10656
11128
|
/**
|
|
10657
11129
|
* Groups consecutive elements that have equal keys into non-empty arrays.
|
|
10658
11130
|
*
|
|
11131
|
+
* **When to use**
|
|
11132
|
+
*
|
|
11133
|
+
* Use when a stream is already ordered by the grouping key and you want to emit
|
|
11134
|
+
* each consecutive run as a non-empty array while keeping later non-adjacent
|
|
11135
|
+
* runs separate.
|
|
11136
|
+
*
|
|
10659
11137
|
* **Details**
|
|
10660
11138
|
*
|
|
10661
11139
|
* The key is computed with `f`; adjacent elements whose keys are equal by
|
|
10662
11140
|
* `Equal.equals` are emitted as one `[key, group]`. Later non-adjacent runs
|
|
10663
11141
|
* with the same key are emitted separately.
|
|
10664
11142
|
*
|
|
10665
|
-
* @
|
|
11143
|
+
* @see {@link groupByKey} for grouping all elements with the same key across the stream
|
|
11144
|
+
* @see {@link groupBy} for custom grouped stream construction
|
|
11145
|
+
*
|
|
11146
|
+
* @category grouping
|
|
10666
11147
|
* @since 2.0.0
|
|
10667
11148
|
*/
|
|
10668
11149
|
<A, K>(f: (a: NoInfer<A>) => K): <E, R>(self: Stream<A, E, R>) => Stream<readonly [K, Arr.NonEmptyArray<A>], E, R>;
|
|
10669
11150
|
/**
|
|
10670
11151
|
* Groups consecutive elements that have equal keys into non-empty arrays.
|
|
10671
11152
|
*
|
|
11153
|
+
* **When to use**
|
|
11154
|
+
*
|
|
11155
|
+
* Use when a stream is already ordered by the grouping key and you want to emit
|
|
11156
|
+
* each consecutive run as a non-empty array while keeping later non-adjacent
|
|
11157
|
+
* runs separate.
|
|
11158
|
+
*
|
|
10672
11159
|
* **Details**
|
|
10673
11160
|
*
|
|
10674
11161
|
* The key is computed with `f`; adjacent elements whose keys are equal by
|
|
10675
11162
|
* `Equal.equals` are emitted as one `[key, group]`. Later non-adjacent runs
|
|
10676
11163
|
* with the same key are emitted separately.
|
|
10677
11164
|
*
|
|
10678
|
-
* @
|
|
11165
|
+
* @see {@link groupByKey} for grouping all elements with the same key across the stream
|
|
11166
|
+
* @see {@link groupBy} for custom grouped stream construction
|
|
11167
|
+
*
|
|
11168
|
+
* @category grouping
|
|
10679
11169
|
* @since 2.0.0
|
|
10680
11170
|
*/
|
|
10681
11171
|
<A, E, R, K>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => K): Stream<readonly [K, Arr.NonEmptyArray<A>], E, R>;
|
|
@@ -10886,7 +11376,7 @@ export declare const aggregateWithin: {
|
|
|
10886
11376
|
<A, E, R, B, A2, E2, R2, C, E3, R3>(self: Stream<A, E, R>, sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<C, Option.Option<B>, E3, R3>): Stream<B, E | E2 | E3, R | R2 | R3>;
|
|
10887
11377
|
};
|
|
10888
11378
|
/**
|
|
10889
|
-
*
|
|
11379
|
+
* Creates a fixed-size tuple of streams that each emit
|
|
10890
11380
|
* the same elements as the source stream.
|
|
10891
11381
|
*
|
|
10892
11382
|
* **Details**
|
|
@@ -10926,7 +11416,7 @@ export declare const aggregateWithin: {
|
|
|
10926
11416
|
*/
|
|
10927
11417
|
export declare const broadcastN: {
|
|
10928
11418
|
/**
|
|
10929
|
-
*
|
|
11419
|
+
* Creates a fixed-size tuple of streams that each emit
|
|
10930
11420
|
* the same elements as the source stream.
|
|
10931
11421
|
*
|
|
10932
11422
|
* **Details**
|
|
@@ -10975,7 +11465,7 @@ export declare const broadcastN: {
|
|
|
10975
11465
|
readonly replay?: number | undefined;
|
|
10976
11466
|
}): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<TupleOf<N, Stream<A, E>>, never, Scope.Scope | R>;
|
|
10977
11467
|
/**
|
|
10978
|
-
*
|
|
11468
|
+
* Creates a fixed-size tuple of streams that each emit
|
|
10979
11469
|
* the same elements as the source stream.
|
|
10980
11470
|
*
|
|
10981
11471
|
* **Details**
|
|
@@ -11961,7 +12451,7 @@ export declare const intersperse: {
|
|
|
11961
12451
|
<A, E, R, A2>(self: Stream<A, E, R>, element: A2): Stream<A | A2, E, R>;
|
|
11962
12452
|
};
|
|
11963
12453
|
/**
|
|
11964
|
-
*
|
|
12454
|
+
* Adds a start value, middle value, and end value around stream elements.
|
|
11965
12455
|
*
|
|
11966
12456
|
* **Details**
|
|
11967
12457
|
*
|
|
@@ -11990,7 +12480,7 @@ export declare const intersperse: {
|
|
|
11990
12480
|
*/
|
|
11991
12481
|
export declare const intersperseAffixes: {
|
|
11992
12482
|
/**
|
|
11993
|
-
*
|
|
12483
|
+
* Adds a start value, middle value, and end value around stream elements.
|
|
11994
12484
|
*
|
|
11995
12485
|
* **Details**
|
|
11996
12486
|
*
|
|
@@ -12023,7 +12513,7 @@ export declare const intersperseAffixes: {
|
|
|
12023
12513
|
readonly end: A4;
|
|
12024
12514
|
}): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A3 | A4 | A, E, R>;
|
|
12025
12515
|
/**
|
|
12026
|
-
*
|
|
12516
|
+
* Adds a start value, middle value, and end value around stream elements.
|
|
12027
12517
|
*
|
|
12028
12518
|
* **Details**
|
|
12029
12519
|
*
|
|
@@ -12360,7 +12850,21 @@ export declare const interruptWhen: {
|
|
|
12360
12850
|
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, effect: Effect.Effect<X, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
12361
12851
|
};
|
|
12362
12852
|
/**
|
|
12363
|
-
*
|
|
12853
|
+
* Stops a stream after the current element when an effect completes.
|
|
12854
|
+
*
|
|
12855
|
+
* **When to use**
|
|
12856
|
+
*
|
|
12857
|
+
* Use to stop before the next pull after an external signal completes.
|
|
12858
|
+
*
|
|
12859
|
+
* **Details**
|
|
12860
|
+
*
|
|
12861
|
+
* The effect is forked, its success value is discarded, and its failure fails
|
|
12862
|
+
* the stream.
|
|
12863
|
+
*
|
|
12864
|
+
* **Gotchas**
|
|
12865
|
+
*
|
|
12866
|
+
* This does not interrupt an in-progress pull. Use {@link interruptWhen} when
|
|
12867
|
+
* the stream should be interrupted immediately.
|
|
12364
12868
|
*
|
|
12365
12869
|
* **Example** (Halting a stream after an effect completes)
|
|
12366
12870
|
*
|
|
@@ -12387,7 +12891,21 @@ export declare const interruptWhen: {
|
|
|
12387
12891
|
*/
|
|
12388
12892
|
export declare const haltWhen: {
|
|
12389
12893
|
/**
|
|
12390
|
-
*
|
|
12894
|
+
* Stops a stream after the current element when an effect completes.
|
|
12895
|
+
*
|
|
12896
|
+
* **When to use**
|
|
12897
|
+
*
|
|
12898
|
+
* Use to stop before the next pull after an external signal completes.
|
|
12899
|
+
*
|
|
12900
|
+
* **Details**
|
|
12901
|
+
*
|
|
12902
|
+
* The effect is forked, its success value is discarded, and its failure fails
|
|
12903
|
+
* the stream.
|
|
12904
|
+
*
|
|
12905
|
+
* **Gotchas**
|
|
12906
|
+
*
|
|
12907
|
+
* This does not interrupt an in-progress pull. Use {@link interruptWhen} when
|
|
12908
|
+
* the stream should be interrupted immediately.
|
|
12391
12909
|
*
|
|
12392
12910
|
* **Example** (Halting a stream after an effect completes)
|
|
12393
12911
|
*
|
|
@@ -12414,7 +12932,21 @@ export declare const haltWhen: {
|
|
|
12414
12932
|
*/
|
|
12415
12933
|
<X, E2, R2>(effect: Effect.Effect<X, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
12416
12934
|
/**
|
|
12417
|
-
*
|
|
12935
|
+
* Stops a stream after the current element when an effect completes.
|
|
12936
|
+
*
|
|
12937
|
+
* **When to use**
|
|
12938
|
+
*
|
|
12939
|
+
* Use to stop before the next pull after an external signal completes.
|
|
12940
|
+
*
|
|
12941
|
+
* **Details**
|
|
12942
|
+
*
|
|
12943
|
+
* The effect is forked, its success value is discarded, and its failure fails
|
|
12944
|
+
* the stream.
|
|
12945
|
+
*
|
|
12946
|
+
* **Gotchas**
|
|
12947
|
+
*
|
|
12948
|
+
* This does not interrupt an in-progress pull. Use {@link interruptWhen} when
|
|
12949
|
+
* the stream should be interrupted immediately.
|
|
12418
12950
|
*
|
|
12419
12951
|
* **Example** (Halting a stream after an effect completes)
|
|
12420
12952
|
*
|
|
@@ -14248,6 +14780,24 @@ export declare const runHead: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<
|
|
|
14248
14780
|
/**
|
|
14249
14781
|
* Runs the stream and returns the last element as an `Option`.
|
|
14250
14782
|
*
|
|
14783
|
+
* **When to use**
|
|
14784
|
+
*
|
|
14785
|
+
* Use to consume a finite stream when only the final emitted element matters.
|
|
14786
|
+
*
|
|
14787
|
+
* **Details**
|
|
14788
|
+
*
|
|
14789
|
+
* `Option.some` contains the last emitted element. `Option.none` means the
|
|
14790
|
+
* stream completed without emitting.
|
|
14791
|
+
*
|
|
14792
|
+
* **Gotchas**
|
|
14793
|
+
*
|
|
14794
|
+
* The returned effect waits for the stream to complete before it can produce a
|
|
14795
|
+
* value.
|
|
14796
|
+
*
|
|
14797
|
+
* @see {@link runHead} for consuming only the first emitted element
|
|
14798
|
+
* @see {@link runCollect} for collecting every emitted element
|
|
14799
|
+
* @see {@link runDrain} for consuming the stream while discarding emitted elements
|
|
14800
|
+
*
|
|
14251
14801
|
* @category destructors
|
|
14252
14802
|
* @since 2.0.0
|
|
14253
14803
|
*/
|
|
@@ -15012,7 +15562,7 @@ export declare const runIntoPubSub: {
|
|
|
15012
15562
|
} | undefined): Effect.Effect<void, never, R>;
|
|
15013
15563
|
};
|
|
15014
15564
|
/**
|
|
15015
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
15565
|
+
* Converts a stream to a PubSub of emitted values for concurrent consumption.
|
|
15016
15566
|
*
|
|
15017
15567
|
* **Details**
|
|
15018
15568
|
*
|
|
@@ -15040,7 +15590,7 @@ export declare const runIntoPubSub: {
|
|
|
15040
15590
|
*/
|
|
15041
15591
|
export declare const toPubSub: {
|
|
15042
15592
|
/**
|
|
15043
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
15593
|
+
* Converts a stream to a PubSub of emitted values for concurrent consumption.
|
|
15044
15594
|
*
|
|
15045
15595
|
* **Details**
|
|
15046
15596
|
*
|
|
@@ -15077,7 +15627,7 @@ export declare const toPubSub: {
|
|
|
15077
15627
|
readonly shutdownOnEnd?: boolean | undefined;
|
|
15078
15628
|
}): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<PubSub.PubSub<A>, never, R | Scope.Scope>;
|
|
15079
15629
|
/**
|
|
15080
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
15630
|
+
* Converts a stream to a PubSub of emitted values for concurrent consumption.
|
|
15081
15631
|
*
|
|
15082
15632
|
* **Details**
|
|
15083
15633
|
*
|
|
@@ -15115,7 +15665,7 @@ export declare const toPubSub: {
|
|
|
15115
15665
|
}): Effect.Effect<PubSub.PubSub<A>, never, R | Scope.Scope>;
|
|
15116
15666
|
};
|
|
15117
15667
|
/**
|
|
15118
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
15668
|
+
* Converts a stream to a PubSub of `Take` values for concurrent consumption.
|
|
15119
15669
|
*
|
|
15120
15670
|
* **Details**
|
|
15121
15671
|
*
|
|
@@ -15144,7 +15694,7 @@ export declare const toPubSub: {
|
|
|
15144
15694
|
*/
|
|
15145
15695
|
export declare const toPubSubTake: {
|
|
15146
15696
|
/**
|
|
15147
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
15697
|
+
* Converts a stream to a PubSub of `Take` values for concurrent consumption.
|
|
15148
15698
|
*
|
|
15149
15699
|
* **Details**
|
|
15150
15700
|
*
|
|
@@ -15180,7 +15730,7 @@ export declare const toPubSubTake: {
|
|
|
15180
15730
|
readonly replay?: number | undefined;
|
|
15181
15731
|
}): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<PubSub.PubSub<Take.Take<A, E>>, never, R | Scope.Scope>;
|
|
15182
15732
|
/**
|
|
15183
|
-
* Converts a stream to a PubSub for concurrent consumption.
|
|
15733
|
+
* Converts a stream to a PubSub of `Take` values for concurrent consumption.
|
|
15184
15734
|
*
|
|
15185
15735
|
* **Details**
|
|
15186
15736
|
*
|