effect 4.0.0-beta.66 → 4.0.0-beta.67
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 +113 -67
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +28 -18
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +404 -337
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +190 -146
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +167 -97
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +87 -47
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +62 -31
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +30 -15
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +20 -1
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +16 -0
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +236 -132
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +133 -57
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +74 -62
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +43 -36
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +1518 -575
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +661 -287
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +119 -10
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +45 -6
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +548 -379
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +238 -170
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +15 -8
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +8 -4
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +2 -4
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +2 -4
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +4 -2
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +2 -2
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +1 -1
- package/dist/ConfigProvider.js +1 -1
- package/dist/Console.d.ts +76 -50
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +69 -46
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +383 -134
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +134 -54
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +69 -48
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +96 -36
- package/dist/Cron.js.map +1 -1
- package/dist/Data.d.ts +3 -2
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +874 -443
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +374 -215
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +367 -174
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +145 -71
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +42 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Differ.js +36 -0
- package/dist/Duration.d.ts +329 -185
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +174 -106
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2109 -1945
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +901 -726
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +37 -2
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +2 -2
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +78 -28
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +75 -27
- package/dist/Encoding.js.map +1 -1
- package/dist/Equivalence.d.ts +14 -19
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +14 -19
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +66 -82
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +38 -29
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +94 -9
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +20 -5
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +7 -5
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +72 -40
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +39 -21
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +117 -56
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +120 -38
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +286 -158
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +174 -72
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +92 -51
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +96 -33
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +104 -73
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +53 -39
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +166 -88
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +68 -42
- package/dist/Filter.js.map +1 -1
- package/dist/Function.d.ts +154 -86
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +53 -37
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +682 -365
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +308 -157
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +29 -13
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +31 -18
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +25 -15
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +444 -256
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +223 -105
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +36 -17
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +75 -8
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +194 -104
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +93 -38
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +20 -9
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +16 -6
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +309 -149
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +129 -65
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +4 -3
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +4 -3
- package/dist/JsonPatch.js.map +1 -1
- package/dist/Latch.d.ts +98 -15
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +41 -10
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +412 -309
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +261 -180
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +95 -21
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +55 -11
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +92 -131
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +25 -15
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +155 -99
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +211 -184
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +75 -17
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +22 -16
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +133 -157
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +85 -76
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +325 -284
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +217 -212
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +117 -58
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +52 -29
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +52 -30
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +94 -38
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +92 -49
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +123 -71
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +99 -62
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +79 -60
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +3 -0
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +36 -39
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +34 -20
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +116 -64
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +54 -30
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +1 -2
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +0 -1
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +28 -47
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +14 -12
- package/dist/Option.js.map +1 -1
- package/dist/Ordering.d.ts +43 -28
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +4 -2
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +225 -40
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +113 -17
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +77 -13
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +48 -4
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +71 -15
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +59 -12
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +74 -6
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +68 -5
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +66 -31
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +26 -24
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +16 -21
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +9 -14
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +9 -2
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +7 -1
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +364 -262
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +245 -174
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +94 -25
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +61 -13
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +284 -150
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +216 -113
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +54 -35
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +36 -24
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +151 -141
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +66 -20
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +69 -32
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +33 -16
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +273 -129
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +117 -57
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +3 -3
- package/dist/Redactable.js +2 -2
- package/dist/Redacted.d.ts +63 -33
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +30 -14
- package/dist/Redacted.js.map +1 -1
- package/dist/Ref.d.ts +81 -52
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +54 -35
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +73 -31
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +66 -30
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +11 -5
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +11 -5
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +158 -34
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +67 -12
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +261 -116
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +77 -41
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +13 -7
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +44 -6
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +16 -14
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +6 -6
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +43 -18
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +35 -16
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +545 -576
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +260 -246
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +43 -6
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +33 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +803 -282
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +281 -189
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +24 -15
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +13 -9
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +26 -13
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +22 -9
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +1 -8
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +194 -25
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +220 -26
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +61 -41
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +56 -33
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +7 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +23 -0
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +102 -43
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +57 -23
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +138 -46
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +80 -19
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +28 -8
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +25 -5
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +64 -28
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +22 -13
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +458 -200
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +240 -89
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +43 -6
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +33 -4
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +1896 -1183
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +867 -524
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +171 -95
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +125 -67
- package/dist/String.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +308 -203
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +125 -76
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +13 -5
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +13 -5
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +278 -62
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +116 -23
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +26 -2
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +4 -1
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +39 -7
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +10 -4
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +229 -55
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +94 -18
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +213 -142
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +88 -60
- package/dist/Trie.js.map +1 -1
- package/dist/TxChunk.d.ts +182 -146
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +73 -56
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +43 -29
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +22 -15
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +362 -222
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +171 -98
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +178 -104
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +84 -43
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +93 -62
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +54 -36
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +77 -49
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +60 -37
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +279 -241
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +147 -101
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +69 -46
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +48 -32
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +69 -40
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +34 -19
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +101 -54
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +76 -34
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +72 -48
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +33 -22
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +34 -34
- package/dist/UndefinedOr.d.ts +48 -25
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +28 -25
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +71 -116
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +20 -6
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +4 -0
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +4 -0
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +81 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -32
- package/dist/index.js.map +1 -1
- package/dist/internal/schema/schema.js +1 -1
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +6 -3
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +6 -3
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts +39 -34
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +42 -12
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +39 -30
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +25 -10
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.js +7 -7
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +197 -130
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +166 -102
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
- package/dist/unstable/ai/Chat.d.ts +65 -41
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +51 -33
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +9 -8
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +28 -18
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +18 -11
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +31 -25
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +20 -14
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +339 -119
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +264 -98
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +53 -19
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +63 -15
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +8 -6
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +7 -5
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
- package/dist/unstable/ai/Prompt.d.ts +194 -168
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +75 -66
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +153 -140
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +43 -48
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +27 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +42 -32
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +14 -10
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +13 -8
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +10 -6
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +153 -84
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +97 -44
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +32 -39
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +7 -5
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +42 -24
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +42 -24
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +226 -134
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +101 -65
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +72 -26
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +86 -23
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +43 -13
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +30 -6
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +194 -113
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +45 -31
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +7 -7
- package/dist/unstable/cli/Completions.js +1 -1
- package/dist/unstable/cli/Flag.d.ts +235 -142
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +111 -71
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +41 -13
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +30 -7
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +35 -10
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/HelpDoc.js +21 -0
- package/dist/unstable/cli/Param.d.ts +79 -31
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +160 -98
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +79 -42
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +66 -35
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +177 -45
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +103 -21
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
- package/dist/unstable/cli/internal/ansi.js +13 -0
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +5 -1
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +5 -1
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/config.d.ts +3 -0
- package/dist/unstable/cli/internal/config.d.ts.map +1 -1
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cli/internal/lexer.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +35 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +56 -7
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +56 -7
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +39 -5
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +61 -8
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +35 -2
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +11 -3
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +75 -16
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +75 -10
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +30 -2
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts +18 -3
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.js +15 -2
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +34 -2
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +24 -2
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +17 -2
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +40 -8
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +43 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +11 -4
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts +27 -3
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityType.js +24 -2
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +105 -23
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +88 -14
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +88 -13
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +31 -6
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.d.ts +24 -3
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.js +21 -2
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +102 -13
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +86 -10
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +127 -21
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +70 -10
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +101 -12
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +64 -8
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +47 -17
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +47 -17
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +34 -2
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +40 -12
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +31 -4
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +38 -4
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +73 -10
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +70 -9
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +51 -5
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +47 -4
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +10 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +35 -4
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +66 -9
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +23 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts +15 -1
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.js +15 -1
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +21 -1
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +89 -19
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +48 -13
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +29 -2
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +18 -1
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +18 -1
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/internal/hash.js +12 -0
- package/dist/unstable/cluster/internal/hash.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts +26 -3
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/devtools/DevTools.js +26 -3
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +32 -5
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +102 -20
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +21 -1
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +81 -12
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +75 -9
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +149 -21
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +97 -13
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +109 -18
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +69 -13
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +115 -30
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +22 -2
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +24 -6
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +108 -16
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +151 -31
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +111 -20
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +92 -18
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +72 -16
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +54 -8
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +17 -3
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +156 -77
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +93 -39
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +40 -7
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +27 -4
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +33 -4
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/FindMyWay.d.ts +1 -1
- package/dist/unstable/http/FindMyWay.js +1 -1
- package/dist/unstable/http/Headers.d.ts +182 -36
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +86 -16
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +114 -26
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +98 -20
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +205 -96
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +84 -38
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +68 -12
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +71 -9
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +151 -45
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +44 -11
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +42 -16
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +33 -13
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +47 -7
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +44 -6
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +35 -5
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +23 -1
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +37 -11
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +52 -10
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +34 -3
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +34 -3
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +194 -45
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +118 -24
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +151 -22
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +76 -11
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +90 -10
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +82 -8
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +101 -20
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +43 -5
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +390 -67
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +204 -33
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +22 -4
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +22 -4
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +47 -5
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +178 -28
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +129 -19
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Node.js +1 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Search.js +1 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Web.js +1 -1
- package/dist/unstable/http/Multipasta.d.ts +1 -1
- package/dist/unstable/http/Multipasta.js +1 -1
- package/dist/unstable/http/Template.d.ts +53 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +26 -0
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +56 -42
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +29 -15
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +233 -49
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +116 -23
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +14 -8
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +55 -16
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +44 -6
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +58 -15
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +42 -6
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +98 -1
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +111 -22
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +47 -5
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +67 -30
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +48 -27
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +74 -17
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts +5 -2
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +24 -2
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +6 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +26 -1
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +73 -15
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +33 -3
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js +14 -3
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +32 -1
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +14 -2
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +29 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +15 -4
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +32 -2
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +49 -12
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +47 -5
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +28 -3
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +16 -2
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +32 -2
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +32 -12
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +7 -5
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/observability/index.d.ts +2 -1
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +2 -1
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +81 -21
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +76 -15
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +22 -5
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +24 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +60 -13
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +97 -16
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +90 -14
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +97 -21
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +81 -16
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +26 -5
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +36 -4
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +87 -64
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +24 -17
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +22 -11
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +11 -6
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.d.ts +2 -1
- package/dist/unstable/process/index.d.ts.map +1 -1
- package/dist/unstable/process/index.js +2 -1
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +196 -59
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +121 -36
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +539 -130
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +252 -58
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +29 -3
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +69 -10
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +29 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +28 -5
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +35 -3
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +95 -13
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +61 -7
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +255 -56
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +44 -11
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +81 -19
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +52 -12
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
- package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +26 -2
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +3 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +23 -7
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +39 -3
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +34 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +56 -12
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +73 -23
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +69 -22
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.d.ts +20 -1
- package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcTest.js +20 -1
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +40 -6
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js +16 -4
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts +8 -0
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +8 -0
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +130 -52
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +79 -34
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +104 -24
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +22 -6
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +167 -34
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +123 -28
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +58 -10
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +43 -5
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts +35 -4
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +44 -4
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +34 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +38 -1
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +31 -0
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js +22 -0
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +99 -0
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +114 -0
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +26 -5
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +8 -4
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +56 -13
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +44 -10
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +29 -8
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +29 -8
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/SqlStream.d.ts +3 -0
- package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
- package/dist/unstable/sql/SqlStream.js +23 -0
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +124 -0
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +82 -0
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +1 -1
- package/dist/unstable/sql/index.js +1 -1
- package/dist/unstable/workers/Transferable.d.ts +65 -13
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +53 -10
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +60 -8
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +43 -4
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +31 -9
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.js +44 -7
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +24 -1
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.d.ts +1 -1
- package/dist/unstable/workers/index.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +61 -10
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +20 -5
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +12 -3
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +22 -2
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +126 -31
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +76 -13
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +30 -7
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +23 -5
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +100 -31
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +75 -19
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +16 -4
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +32 -2
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +2 -2
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts +36 -2
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +11 -11
- package/src/Array.ts +113 -67
- package/src/BigDecimal.ts +404 -337
- package/src/BigInt.ts +167 -97
- package/src/Boolean.ts +62 -31
- package/src/Brand.ts +20 -1
- package/src/Cache.ts +331 -164
- package/src/Cause.ts +74 -62
- package/src/Channel.ts +1585 -607
- package/src/ChannelSchema.ts +137 -12
- package/src/Chunk.ts +549 -380
- package/src/Clock.ts +15 -8
- package/src/Combiner.ts +2 -4
- package/src/Config.ts +4 -2
- package/src/ConfigProvider.ts +1 -1
- package/src/Console.ts +88 -58
- package/src/Context.ts +384 -135
- package/src/Cron.ts +111 -48
- package/src/Data.ts +3 -2
- package/src/DateTime.ts +874 -443
- package/src/Deferred.ts +367 -174
- package/src/Differ.ts +42 -0
- package/src/Duration.ts +329 -185
- package/src/Effect.ts +2127 -1957
- package/src/Effectable.ts +37 -2
- package/src/Encoding.ts +78 -28
- package/src/Equivalence.ts +14 -19
- package/src/ErrorReporter.ts +66 -82
- package/src/ExecutionPlan.ts +94 -9
- package/src/Exit.ts +7 -5
- package/src/Fiber.ts +72 -40
- package/src/FiberHandle.ts +156 -56
- package/src/FiberMap.ts +327 -162
- package/src/FiberSet.ts +129 -51
- package/src/FileSystem.ts +106 -74
- package/src/Filter.ts +166 -88
- package/src/Function.ts +154 -86
- package/src/Graph.ts +682 -365
- package/src/HKT.ts +29 -13
- package/src/Hash.ts +31 -18
- package/src/HashMap.ts +444 -256
- package/src/HashRing.ts +94 -17
- package/src/HashSet.ts +194 -104
- package/src/Inspectable.ts +22 -10
- package/src/Iterable.ts +309 -149
- package/src/JsonPatch.ts +4 -3
- package/src/Latch.ts +98 -15
- package/src/Layer.ts +487 -344
- package/src/LayerMap.ts +95 -21
- package/src/LogLevel.ts +92 -131
- package/src/Logger.ts +357 -288
- package/src/ManagedRuntime.ts +75 -17
- package/src/Match.ts +133 -157
- package/src/Metric.ts +355 -304
- package/src/MutableHashMap.ts +161 -84
- package/src/MutableHashSet.ts +122 -52
- package/src/MutableList.ts +141 -81
- package/src/MutableRef.ts +130 -90
- package/src/Newtype.ts +3 -0
- package/src/NonEmptyIterable.ts +36 -39
- package/src/Number.ts +116 -64
- package/src/Optic.ts +1 -2
- package/src/Option.ts +28 -47
- package/src/Ordering.ts +43 -28
- package/src/PartitionedSemaphore.ts +225 -40
- package/src/Path.ts +77 -13
- package/src/Pipeable.ts +76 -21
- package/src/PlatformError.ts +74 -6
- package/src/Pool.ts +94 -31
- package/src/Predicate.ts +16 -21
- package/src/PrimaryKey.ts +9 -2
- package/src/PubSub.ts +364 -262
- package/src/Pull.ts +94 -25
- package/src/Queue.ts +284 -150
- package/src/Random.ts +54 -35
- package/src/RcMap.ts +151 -141
- package/src/RcRef.ts +69 -32
- package/src/Record.ts +273 -129
- package/src/Redactable.ts +3 -3
- package/src/Redacted.ts +63 -33
- package/src/Ref.ts +161 -104
- package/src/References.ts +73 -31
- package/src/RegExp.ts +11 -5
- package/src/Request.ts +158 -34
- package/src/RequestResolver.ts +277 -119
- package/src/Resource.ts +45 -7
- package/src/Result.ts +18 -16
- package/src/Runtime.ts +45 -19
- package/src/Schedule.ts +574 -599
- package/src/Scheduler.ts +43 -6
- package/src/Schema.ts +819 -295
- package/src/SchemaAST.ts +25 -16
- package/src/SchemaGetter.ts +29 -14
- package/src/SchemaIssue.ts +1 -8
- package/src/SchemaParser.ts +262 -38
- package/src/SchemaTransformation.ts +61 -41
- package/src/SchemaUtils.ts +23 -0
- package/src/Scope.ts +102 -43
- package/src/ScopedCache.ts +192 -56
- package/src/ScopedRef.ts +28 -8
- package/src/Semaphore.ts +64 -28
- package/src/Sink.ts +458 -200
- package/src/Stdio.ts +43 -6
- package/src/Stream.ts +2039 -1252
- package/src/String.ts +171 -95
- package/src/SubscriptionRef.ts +308 -203
- package/src/Symbol.ts +13 -5
- package/src/SynchronizedRef.ts +278 -62
- package/src/Take.ts +26 -2
- package/src/Terminal.ts +40 -7
- package/src/Tracer.ts +229 -55
- package/src/Trie.ts +213 -142
- package/src/TxChunk.ts +182 -146
- package/src/TxDeferred.ts +43 -29
- package/src/TxHashMap.ts +370 -230
- package/src/TxHashSet.ts +250 -152
- package/src/TxPriorityQueue.ts +96 -64
- package/src/TxPubSub.ts +77 -49
- package/src/TxQueue.ts +279 -241
- package/src/TxReentrantLock.ts +70 -47
- package/src/TxRef.ts +69 -40
- package/src/TxSemaphore.ts +101 -54
- package/src/TxSubscriptionRef.ts +72 -48
- package/src/Types.ts +34 -34
- package/src/UndefinedOr.ts +48 -25
- package/src/Unify.ts +71 -116
- package/src/Utils.ts +4 -0
- package/src/index.ts +81 -32
- package/src/internal/schema/schema.ts +1 -1
- package/src/testing/FastCheck.ts +6 -3
- package/src/testing/TestClock.ts +63 -34
- package/src/testing/TestConsole.ts +49 -30
- package/src/testing/TestSchema.ts +8 -8
- package/src/unstable/ai/AiError.ts +187 -120
- package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
- package/src/unstable/ai/Chat.ts +69 -43
- package/src/unstable/ai/EmbeddingModel.ts +12 -11
- package/src/unstable/ai/IdGenerator.ts +28 -18
- package/src/unstable/ai/LanguageModel.ts +35 -27
- package/src/unstable/ai/McpSchema.ts +339 -119
- package/src/unstable/ai/McpServer.ts +76 -19
- package/src/unstable/ai/Model.ts +8 -6
- package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
- package/src/unstable/ai/Prompt.ts +210 -184
- package/src/unstable/ai/Response.ts +159 -147
- package/src/unstable/ai/ResponseIdTracker.ts +43 -4
- package/src/unstable/ai/Telemetry.ts +42 -32
- package/src/unstable/ai/Tokenizer.ts +13 -8
- package/src/unstable/ai/Tool.ts +154 -85
- package/src/unstable/ai/Toolkit.ts +51 -46
- package/src/unstable/ai/index.ts +42 -24
- package/src/unstable/cli/Argument.ts +226 -134
- package/src/unstable/cli/CliError.ts +96 -26
- package/src/unstable/cli/CliOutput.ts +43 -13
- package/src/unstable/cli/Command.ts +194 -113
- package/src/unstable/cli/Completions.ts +7 -7
- package/src/unstable/cli/Flag.ts +235 -142
- package/src/unstable/cli/GlobalFlag.ts +41 -13
- package/src/unstable/cli/HelpDoc.ts +35 -10
- package/src/unstable/cli/Param.ts +327 -189
- package/src/unstable/cli/Primitive.ts +79 -42
- package/src/unstable/cli/Prompt.ts +201 -45
- package/src/unstable/cli/internal/ansi.ts +13 -0
- package/src/unstable/cli/internal/command.ts +5 -1
- package/src/unstable/cli/internal/config.ts +3 -0
- package/src/unstable/cli/internal/lexer.ts +11 -0
- package/src/unstable/cluster/ClusterCron.ts +35 -1
- package/src/unstable/cluster/ClusterError.ts +56 -7
- package/src/unstable/cluster/ClusterMetrics.ts +39 -5
- package/src/unstable/cluster/ClusterSchema.ts +61 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +35 -2
- package/src/unstable/cluster/DeliverAt.ts +39 -4
- package/src/unstable/cluster/Entity.ts +107 -16
- package/src/unstable/cluster/EntityAddress.ts +30 -2
- package/src/unstable/cluster/EntityId.ts +18 -3
- package/src/unstable/cluster/EntityProxy.ts +34 -2
- package/src/unstable/cluster/EntityProxyServer.ts +44 -8
- package/src/unstable/cluster/EntityResource.ts +43 -6
- package/src/unstable/cluster/EntityType.ts +27 -3
- package/src/unstable/cluster/Envelope.ts +128 -23
- package/src/unstable/cluster/HttpRunner.ts +88 -13
- package/src/unstable/cluster/K8sHttpClient.ts +49 -6
- package/src/unstable/cluster/MachineId.ts +24 -3
- package/src/unstable/cluster/Message.ts +102 -13
- package/src/unstable/cluster/MessageStorage.ts +127 -21
- package/src/unstable/cluster/Reply.ts +101 -12
- package/src/unstable/cluster/Runner.ts +47 -17
- package/src/unstable/cluster/RunnerAddress.ts +34 -2
- package/src/unstable/cluster/RunnerHealth.ts +40 -12
- package/src/unstable/cluster/RunnerServer.ts +31 -4
- package/src/unstable/cluster/RunnerStorage.ts +42 -5
- package/src/unstable/cluster/Runners.ts +73 -10
- package/src/unstable/cluster/ShardId.ts +51 -5
- package/src/unstable/cluster/Sharding.ts +35 -4
- package/src/unstable/cluster/ShardingConfig.ts +75 -10
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
- package/src/unstable/cluster/SingleRunner.ts +23 -1
- package/src/unstable/cluster/Singleton.ts +15 -1
- package/src/unstable/cluster/SingletonAddress.ts +21 -1
- package/src/unstable/cluster/Snowflake.ts +89 -19
- package/src/unstable/cluster/SocketRunner.ts +29 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
- package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
- package/src/unstable/cluster/TestRunner.ts +18 -1
- package/src/unstable/cluster/internal/hash.ts +12 -0
- package/src/unstable/devtools/DevTools.ts +26 -3
- package/src/unstable/devtools/DevToolsClient.ts +32 -5
- package/src/unstable/devtools/DevToolsSchema.ts +201 -44
- package/src/unstable/devtools/DevToolsServer.ts +27 -2
- package/src/unstable/encoding/Msgpack.ts +97 -12
- package/src/unstable/encoding/Ndjson.ts +149 -21
- package/src/unstable/encoding/Sse.ts +109 -18
- package/src/unstable/eventlog/Event.ts +131 -30
- package/src/unstable/eventlog/EventGroup.ts +50 -17
- package/src/unstable/eventlog/EventJournal.ts +120 -20
- package/src/unstable/eventlog/EventLog.ts +151 -31
- package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
- package/src/unstable/eventlog/EventLogMessage.ts +92 -18
- package/src/unstable/eventlog/EventLogRemote.ts +54 -8
- package/src/unstable/eventlog/EventLogServer.ts +33 -3
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
- package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
- package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
- package/src/unstable/http/Cookies.ts +156 -77
- package/src/unstable/http/Etag.ts +40 -7
- package/src/unstable/http/FetchHttpClient.ts +33 -4
- package/src/unstable/http/FindMyWay.ts +1 -1
- package/src/unstable/http/Headers.ts +252 -50
- package/src/unstable/http/HttpBody.ts +128 -26
- package/src/unstable/http/HttpClient.ts +205 -96
- package/src/unstable/http/HttpClientError.ts +80 -12
- package/src/unstable/http/HttpClientRequest.ts +318 -100
- package/src/unstable/http/HttpClientResponse.ts +59 -16
- package/src/unstable/http/HttpEffect.ts +66 -18
- package/src/unstable/http/HttpIncomingMessage.ts +47 -7
- package/src/unstable/http/HttpMethod.ts +35 -5
- package/src/unstable/http/HttpMiddleware.ts +59 -11
- package/src/unstable/http/HttpPlatform.ts +34 -3
- package/src/unstable/http/HttpRouter.ts +217 -52
- package/src/unstable/http/HttpServer.ts +151 -22
- package/src/unstable/http/HttpServerError.ts +90 -10
- package/src/unstable/http/HttpServerRequest.ts +125 -21
- package/src/unstable/http/HttpServerRespondable.ts +49 -6
- package/src/unstable/http/HttpServerResponse.ts +390 -67
- package/src/unstable/http/HttpStaticServer.ts +22 -4
- package/src/unstable/http/HttpTraceContext.ts +53 -6
- package/src/unstable/http/Multipart.ts +178 -28
- package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
- package/src/unstable/http/Multipasta/Node.ts +1 -1
- package/src/unstable/http/Multipasta/Search.ts +1 -1
- package/src/unstable/http/Multipasta/Web.ts +1 -1
- package/src/unstable/http/Multipasta.ts +1 -1
- package/src/unstable/http/Template.ts +53 -0
- package/src/unstable/http/Url.ts +56 -42
- package/src/unstable/http/UrlParams.ts +233 -49
- package/src/unstable/httpapi/HttpApi.ts +49 -14
- package/src/unstable/httpapi/HttpApiBuilder.ts +82 -16
- package/src/unstable/httpapi/HttpApiClient.ts +79 -15
- package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
- package/src/unstable/httpapi/HttpApiError.ts +100 -1
- package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
- package/src/unstable/httpapi/HttpApiMiddleware.ts +111 -22
- package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
- package/src/unstable/httpapi/HttpApiSchema.ts +67 -30
- package/src/unstable/httpapi/HttpApiSecurity.ts +74 -17
- package/src/unstable/httpapi/HttpApiSwagger.ts +24 -2
- package/src/unstable/httpapi/HttpApiTest.ts +26 -1
- package/src/unstable/httpapi/OpenApi.ts +115 -15
- package/src/unstable/observability/Otlp.ts +33 -3
- package/src/unstable/observability/OtlpExporter.ts +32 -1
- package/src/unstable/observability/OtlpLogger.ts +31 -2
- package/src/unstable/observability/OtlpMetrics.ts +37 -4
- package/src/unstable/observability/OtlpResource.ts +68 -12
- package/src/unstable/observability/OtlpSerialization.ts +28 -3
- package/src/unstable/observability/OtlpTracer.ts +38 -2
- package/src/unstable/observability/PrometheusMetrics.ts +32 -12
- package/src/unstable/observability/index.ts +2 -1
- package/src/unstable/persistence/KeyValueStore.ts +108 -28
- package/src/unstable/persistence/Persistable.ts +76 -15
- package/src/unstable/persistence/PersistedCache.ts +27 -2
- package/src/unstable/persistence/PersistedQueue.ts +98 -16
- package/src/unstable/persistence/Persistence.ts +97 -16
- package/src/unstable/persistence/RateLimiter.ts +97 -21
- package/src/unstable/persistence/Redis.ts +42 -5
- package/src/unstable/process/ChildProcess.ts +89 -65
- package/src/unstable/process/ChildProcessSpawner.ts +22 -11
- package/src/unstable/process/index.ts +2 -1
- package/src/unstable/reactivity/AsyncResult.ts +202 -61
- package/src/unstable/reactivity/Atom.ts +593 -139
- package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
- package/src/unstable/reactivity/AtomRef.ts +51 -7
- package/src/unstable/reactivity/AtomRegistry.ts +141 -22
- package/src/unstable/reactivity/AtomRpc.ts +36 -2
- package/src/unstable/reactivity/Hydration.ts +45 -5
- package/src/unstable/reactivity/Reactivity.ts +95 -13
- package/src/unstable/rpc/Rpc.ts +255 -56
- package/src/unstable/rpc/RpcClient.ts +107 -19
- package/src/unstable/rpc/RpcClientError.ts +26 -2
- package/src/unstable/rpc/RpcGroup.ts +51 -8
- package/src/unstable/rpc/RpcMessage.ts +128 -32
- package/src/unstable/rpc/RpcMiddleware.ts +100 -20
- package/src/unstable/rpc/RpcSchema.ts +38 -4
- package/src/unstable/rpc/RpcSerialization.ts +60 -13
- package/src/unstable/rpc/RpcServer.ts +107 -23
- package/src/unstable/rpc/RpcTest.ts +20 -1
- package/src/unstable/rpc/RpcWorker.ts +40 -6
- package/src/unstable/rpc/Utils.ts +31 -0
- package/src/unstable/schema/Model.ts +148 -52
- package/src/unstable/schema/VariantSchema.ts +104 -24
- package/src/unstable/socket/Socket.ts +167 -34
- package/src/unstable/socket/SocketServer.ts +58 -10
- package/src/unstable/sql/Migrator.ts +56 -4
- package/src/unstable/sql/SqlClient.ts +55 -2
- package/src/unstable/sql/SqlConnection.ts +31 -0
- package/src/unstable/sql/SqlError.ts +117 -0
- package/src/unstable/sql/SqlModel.ts +26 -5
- package/src/unstable/sql/SqlResolver.ts +56 -13
- package/src/unstable/sql/SqlSchema.ts +29 -8
- package/src/unstable/sql/SqlStream.ts +23 -0
- package/src/unstable/sql/Statement.ts +141 -0
- package/src/unstable/sql/index.ts +1 -1
- package/src/unstable/workers/Transferable.ts +65 -13
- package/src/unstable/workers/Worker.ts +60 -8
- package/src/unstable/workers/WorkerError.ts +50 -9
- package/src/unstable/workers/WorkerRunner.ts +32 -3
- package/src/unstable/workers/index.ts +1 -1
- package/src/unstable/workflow/Activity.ts +61 -10
- package/src/unstable/workflow/DurableClock.ts +26 -3
- package/src/unstable/workflow/DurableDeferred.ts +146 -31
- package/src/unstable/workflow/DurableQueue.ts +30 -7
- package/src/unstable/workflow/Workflow.ts +121 -31
- package/src/unstable/workflow/WorkflowEngine.ts +40 -5
- package/src/unstable/workflow/WorkflowProxy.ts +32 -2
- package/src/unstable/workflow/WorkflowProxyServer.ts +40 -6
package/dist/Chunk.d.ts
CHANGED
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
* - **Iteration**: O(n)
|
|
29
29
|
* - **Memory**: Structural sharing minimizes allocation
|
|
30
30
|
*
|
|
31
|
-
*
|
|
31
|
+
* **Example** (Creating and combining chunks)
|
|
32
|
+
*
|
|
32
33
|
* ```ts
|
|
33
34
|
* import { Chunk } from "effect"
|
|
34
35
|
*
|
|
@@ -42,7 +43,8 @@
|
|
|
42
43
|
* console.log(Chunk.toReadonlyArray(combined)) // [1, 2, 3, 4, 5, 6]
|
|
43
44
|
* ```
|
|
44
45
|
*
|
|
45
|
-
*
|
|
46
|
+
* **Example** (Transforming chunks)
|
|
47
|
+
*
|
|
46
48
|
* ```ts
|
|
47
49
|
* import { Chunk } from "effect"
|
|
48
50
|
*
|
|
@@ -53,17 +55,17 @@
|
|
|
53
55
|
* const sum = Chunk.reduce(evens, 0, (acc, n) => acc + n) // 12
|
|
54
56
|
* ```
|
|
55
57
|
*
|
|
56
|
-
*
|
|
58
|
+
* **Example** (Processing chunks with Effect)
|
|
59
|
+
*
|
|
57
60
|
* ```ts
|
|
58
61
|
* import { Chunk, Effect } from "effect"
|
|
59
62
|
*
|
|
60
63
|
* // Working with Effects
|
|
61
|
-
* const processChunk = (chunk: Chunk.Chunk<number>)
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* })
|
|
64
|
+
* const processChunk = Effect.fnUntraced(function*(chunk: Chunk.Chunk<number>) {
|
|
65
|
+
* const mapped = Chunk.map(chunk, (n) => n * 2)
|
|
66
|
+
* const filtered = Chunk.filter(mapped, (n) => n > 5)
|
|
67
|
+
* return Chunk.toReadonlyArray(filtered)
|
|
68
|
+
* })
|
|
67
69
|
* ```
|
|
68
70
|
*
|
|
69
71
|
* @since 2.0.0
|
|
@@ -87,7 +89,8 @@ declare const TypeId = "~effect/collections/Chunk";
|
|
|
87
89
|
/**
|
|
88
90
|
* A Chunk is an immutable, ordered collection optimized for efficient concatenation and access patterns.
|
|
89
91
|
*
|
|
90
|
-
*
|
|
92
|
+
* **Example** (Inspecting chunk values)
|
|
93
|
+
*
|
|
91
94
|
* ```ts
|
|
92
95
|
* import { Chunk } from "effect"
|
|
93
96
|
*
|
|
@@ -112,7 +115,8 @@ export interface Chunk<out A> extends Iterable<A>, Equal.Equal, Pipeable, Inspec
|
|
|
112
115
|
/**
|
|
113
116
|
* A non-empty Chunk guaranteed to contain at least one element.
|
|
114
117
|
*
|
|
115
|
-
*
|
|
118
|
+
* **Example** (Working with non-empty chunks)
|
|
119
|
+
*
|
|
116
120
|
* ```ts
|
|
117
121
|
* import { Chunk } from "effect"
|
|
118
122
|
*
|
|
@@ -129,7 +133,8 @@ export interface NonEmptyChunk<out A> extends Chunk<A>, NonEmptyIterable<A> {
|
|
|
129
133
|
/**
|
|
130
134
|
* Type lambda for Chunk, used for higher-kinded type operations.
|
|
131
135
|
*
|
|
132
|
-
*
|
|
136
|
+
* **Example** (Applying the Chunk type lambda)
|
|
137
|
+
*
|
|
133
138
|
* ```ts
|
|
134
139
|
* import type { ChunkTypeLambda } from "effect/Chunk"
|
|
135
140
|
* import type { Kind } from "effect/HKT"
|
|
@@ -169,9 +174,11 @@ interface ISlice<A> {
|
|
|
169
174
|
readonly length: number;
|
|
170
175
|
}
|
|
171
176
|
/**
|
|
172
|
-
*
|
|
177
|
+
* Creates an `Equivalence` for chunks that compares chunk lengths and then
|
|
178
|
+
* compares corresponding elements with the provided element equivalence.
|
|
179
|
+
*
|
|
180
|
+
* **Example** (Comparing chunks for equivalence)
|
|
173
181
|
*
|
|
174
|
-
* @example
|
|
175
182
|
* ```ts
|
|
176
183
|
* import { Chunk } from "effect"
|
|
177
184
|
* import * as Equivalence from "effect/Equivalence"
|
|
@@ -192,7 +199,8 @@ export declare const makeEquivalence: <A>(isEquivalent: Equivalence.Equivalence<
|
|
|
192
199
|
/**
|
|
193
200
|
* Checks if `u` is a `Chunk<unknown>`
|
|
194
201
|
*
|
|
195
|
-
*
|
|
202
|
+
* **Example** (Checking for chunks)
|
|
203
|
+
*
|
|
196
204
|
* ```ts
|
|
197
205
|
* import { Chunk } from "effect"
|
|
198
206
|
*
|
|
@@ -211,7 +219,8 @@ export declare const isChunk: {
|
|
|
211
219
|
/**
|
|
212
220
|
* Checks if `u` is a `Chunk<unknown>`
|
|
213
221
|
*
|
|
214
|
-
*
|
|
222
|
+
* **Example** (Checking for chunks)
|
|
223
|
+
*
|
|
215
224
|
* ```ts
|
|
216
225
|
* import { Chunk } from "effect"
|
|
217
226
|
*
|
|
@@ -230,7 +239,8 @@ export declare const isChunk: {
|
|
|
230
239
|
/**
|
|
231
240
|
* Checks if `u` is a `Chunk<unknown>`
|
|
232
241
|
*
|
|
233
|
-
*
|
|
242
|
+
* **Example** (Checking for chunks)
|
|
243
|
+
*
|
|
234
244
|
* ```ts
|
|
235
245
|
* import { Chunk } from "effect"
|
|
236
246
|
*
|
|
@@ -250,7 +260,8 @@ export declare const isChunk: {
|
|
|
250
260
|
/**
|
|
251
261
|
* Creates an empty `Chunk`.
|
|
252
262
|
*
|
|
253
|
-
*
|
|
263
|
+
* **Example** (Creating an empty chunk)
|
|
264
|
+
*
|
|
254
265
|
* ```ts
|
|
255
266
|
* import { Chunk } from "effect"
|
|
256
267
|
*
|
|
@@ -265,13 +276,13 @@ export declare const empty: <A = never>() => Chunk<A>;
|
|
|
265
276
|
/**
|
|
266
277
|
* Builds a `NonEmptyChunk` from an non-empty collection of elements.
|
|
267
278
|
*
|
|
268
|
-
*
|
|
279
|
+
* **Example** (Creating a non-empty chunk)
|
|
280
|
+
*
|
|
269
281
|
* ```ts
|
|
270
282
|
* import { Chunk } from "effect"
|
|
271
283
|
*
|
|
272
284
|
* const chunk = Chunk.make(1, 2, 3, 4)
|
|
273
|
-
* console.log(chunk)
|
|
274
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3, 4 ] }
|
|
285
|
+
* console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4]
|
|
275
286
|
* ```
|
|
276
287
|
*
|
|
277
288
|
* @category constructors
|
|
@@ -281,13 +292,13 @@ export declare const make: <As extends readonly [any, ...Array<any>]>(...as: As)
|
|
|
281
292
|
/**
|
|
282
293
|
* Builds a `NonEmptyChunk` from a single element.
|
|
283
294
|
*
|
|
284
|
-
*
|
|
295
|
+
* **Example** (Creating a single-element chunk)
|
|
296
|
+
*
|
|
285
297
|
* ```ts
|
|
286
298
|
* import { Chunk } from "effect"
|
|
287
299
|
*
|
|
288
300
|
* const chunk = Chunk.of("hello")
|
|
289
|
-
* console.log(chunk)
|
|
290
|
-
* // { _id: 'Chunk', values: [ "hello" ] }
|
|
301
|
+
* console.log(Chunk.toArray(chunk)) // ["hello"]
|
|
291
302
|
* ```
|
|
292
303
|
*
|
|
293
304
|
* @category constructors
|
|
@@ -297,13 +308,13 @@ export declare const of: <A>(a: A) => NonEmptyChunk<A>;
|
|
|
297
308
|
/**
|
|
298
309
|
* Creates a new `Chunk` from an iterable collection of values.
|
|
299
310
|
*
|
|
300
|
-
*
|
|
311
|
+
* **Example** (Creating chunks from iterables)
|
|
312
|
+
*
|
|
301
313
|
* ```ts
|
|
302
314
|
* import { Chunk } from "effect"
|
|
303
315
|
*
|
|
304
316
|
* const chunk = Chunk.fromIterable([1, 2, 3])
|
|
305
|
-
* console.log(chunk)
|
|
306
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
317
|
+
* console.log(Chunk.toArray(chunk)) // [1, 2, 3]
|
|
307
318
|
* ```
|
|
308
319
|
*
|
|
309
320
|
* @category constructors
|
|
@@ -315,7 +326,8 @@ export declare const fromIterable: <A>(self: Iterable<A>) => Chunk<A>;
|
|
|
315
326
|
* (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the
|
|
316
327
|
* non-empty property is preserved.
|
|
317
328
|
*
|
|
318
|
-
*
|
|
329
|
+
* **Example** (Converting chunks to mutable arrays)
|
|
330
|
+
*
|
|
319
331
|
* ```ts
|
|
320
332
|
* import { Chunk } from "effect"
|
|
321
333
|
*
|
|
@@ -338,7 +350,8 @@ export declare const toArray: <S extends Chunk<any>>(self: S) => S extends NonEm
|
|
|
338
350
|
* non-empty (`NonEmptyChunk`), the function will return a
|
|
339
351
|
* `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved.
|
|
340
352
|
*
|
|
341
|
-
*
|
|
353
|
+
* **Example** (Converting chunks to readonly arrays)
|
|
354
|
+
*
|
|
342
355
|
* ```ts
|
|
343
356
|
* import { Chunk } from "effect"
|
|
344
357
|
*
|
|
@@ -362,7 +375,7 @@ export declare const toReadonlyArray: <S extends Chunk<any>>(self: S) => S exten
|
|
|
362
375
|
* Reverses the order of elements in a `Chunk`.
|
|
363
376
|
* Importantly, if the input chunk is a `NonEmptyChunk`, the reversed chunk will also be a `NonEmptyChunk`.
|
|
364
377
|
*
|
|
365
|
-
*
|
|
378
|
+
* **Example** (Reversing chunks)
|
|
366
379
|
*
|
|
367
380
|
* ```ts
|
|
368
381
|
* import { Chunk } from "effect"
|
|
@@ -370,18 +383,18 @@ export declare const toReadonlyArray: <S extends Chunk<any>>(self: S) => S exten
|
|
|
370
383
|
* const chunk = Chunk.make(1, 2, 3)
|
|
371
384
|
* const result = Chunk.reverse(chunk)
|
|
372
385
|
*
|
|
373
|
-
* console.log(result)
|
|
374
|
-
* // { _id: 'Chunk', values: [ 3, 2, 1 ] }
|
|
386
|
+
* console.log(Chunk.toArray(result)) // [3, 2, 1]
|
|
375
387
|
* ```
|
|
376
388
|
*
|
|
377
|
-
* @since 2.0.0
|
|
378
389
|
* @category elements
|
|
390
|
+
* @since 2.0.0
|
|
379
391
|
*/
|
|
380
392
|
export declare const reverse: <S extends Chunk<any>>(self: S) => Chunk.With<S, Chunk.Infer<S>>;
|
|
381
393
|
/**
|
|
382
394
|
* This function provides a safe way to read a value at a particular index from a `Chunk`.
|
|
383
395
|
*
|
|
384
|
-
*
|
|
396
|
+
* **Example** (Accessing elements safely)
|
|
397
|
+
*
|
|
385
398
|
* ```ts
|
|
386
399
|
* import { Chunk } from "effect"
|
|
387
400
|
*
|
|
@@ -403,7 +416,8 @@ export declare const get: {
|
|
|
403
416
|
/**
|
|
404
417
|
* This function provides a safe way to read a value at a particular index from a `Chunk`.
|
|
405
418
|
*
|
|
406
|
-
*
|
|
419
|
+
* **Example** (Accessing elements safely)
|
|
420
|
+
*
|
|
407
421
|
* ```ts
|
|
408
422
|
* import { Chunk } from "effect"
|
|
409
423
|
*
|
|
@@ -425,7 +439,8 @@ export declare const get: {
|
|
|
425
439
|
/**
|
|
426
440
|
* This function provides a safe way to read a value at a particular index from a `Chunk`.
|
|
427
441
|
*
|
|
428
|
-
*
|
|
442
|
+
* **Example** (Accessing elements safely)
|
|
443
|
+
*
|
|
429
444
|
* ```ts
|
|
430
445
|
* import { Chunk } from "effect"
|
|
431
446
|
*
|
|
@@ -448,7 +463,8 @@ export declare const get: {
|
|
|
448
463
|
/**
|
|
449
464
|
* Wraps an array into a chunk without copying, unsafe on mutable arrays
|
|
450
465
|
*
|
|
451
|
-
*
|
|
466
|
+
* **Example** (Creating chunks without copying arrays)
|
|
467
|
+
*
|
|
452
468
|
* ```ts
|
|
453
469
|
* import { Chunk } from "effect"
|
|
454
470
|
*
|
|
@@ -461,14 +477,15 @@ export declare const get: {
|
|
|
461
477
|
* console.log(Chunk.toArray(chunk)) // [999, 2, 3, 4, 5]
|
|
462
478
|
* ```
|
|
463
479
|
*
|
|
464
|
-
* @since 2.0.0
|
|
465
480
|
* @category unsafe
|
|
481
|
+
* @since 2.0.0
|
|
466
482
|
*/
|
|
467
483
|
export declare const fromArrayUnsafe: <A>(self: ReadonlyArray<A>) => Chunk<A>;
|
|
468
484
|
/**
|
|
469
485
|
* Wraps an array into a chunk without copying, unsafe on mutable arrays
|
|
470
486
|
*
|
|
471
|
-
*
|
|
487
|
+
* **Example** (Creating non-empty chunks without copying arrays)
|
|
488
|
+
*
|
|
472
489
|
* ```ts
|
|
473
490
|
* import { Chunk } from "effect"
|
|
474
491
|
* import * as Array from "effect/Array"
|
|
@@ -481,87 +498,79 @@ export declare const fromArrayUnsafe: <A>(self: ReadonlyArray<A>) => Chunk<A>;
|
|
|
481
498
|
* console.log(Chunk.isNonEmpty(chunk)) // true
|
|
482
499
|
* ```
|
|
483
500
|
*
|
|
484
|
-
* @since 2.0.0
|
|
485
501
|
* @category unsafe
|
|
502
|
+
* @since 2.0.0
|
|
486
503
|
*/
|
|
487
504
|
export declare const fromNonEmptyArrayUnsafe: <A>(self: NonEmptyReadonlyArray<A>) => NonEmptyChunk<A>;
|
|
488
505
|
/**
|
|
489
506
|
* Gets an element unsafely, will throw on out of bounds
|
|
490
507
|
*
|
|
491
|
-
*
|
|
508
|
+
* **Example** (Accessing elements unsafely)
|
|
509
|
+
*
|
|
492
510
|
* ```ts
|
|
493
|
-
* import { Chunk } from "effect"
|
|
511
|
+
* import { Chunk, Option } from "effect"
|
|
494
512
|
*
|
|
495
513
|
* const chunk = Chunk.make("a", "b", "c", "d")
|
|
496
514
|
*
|
|
497
515
|
* console.log(Chunk.getUnsafe(chunk, 1)) // "b"
|
|
498
516
|
* console.log(Chunk.getUnsafe(chunk, 3)) // "d"
|
|
499
517
|
*
|
|
500
|
-
* //
|
|
501
|
-
*
|
|
502
|
-
* Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
|
|
503
|
-
* } catch (error) {
|
|
504
|
-
* console.log((error as Error).message) // "Index out of bounds"
|
|
505
|
-
* }
|
|
518
|
+
* // Use Chunk.get when the index may be out of bounds
|
|
519
|
+
* console.log(Option.isNone(Chunk.get(chunk, 10))) // true
|
|
506
520
|
* ```
|
|
507
521
|
*
|
|
508
|
-
* @since 2.0.0
|
|
509
522
|
* @category unsafe
|
|
523
|
+
* @since 2.0.0
|
|
510
524
|
*/
|
|
511
525
|
export declare const getUnsafe: {
|
|
512
526
|
/**
|
|
513
527
|
* Gets an element unsafely, will throw on out of bounds
|
|
514
528
|
*
|
|
515
|
-
*
|
|
529
|
+
* **Example** (Accessing elements unsafely)
|
|
530
|
+
*
|
|
516
531
|
* ```ts
|
|
517
|
-
* import { Chunk } from "effect"
|
|
532
|
+
* import { Chunk, Option } from "effect"
|
|
518
533
|
*
|
|
519
534
|
* const chunk = Chunk.make("a", "b", "c", "d")
|
|
520
535
|
*
|
|
521
536
|
* console.log(Chunk.getUnsafe(chunk, 1)) // "b"
|
|
522
537
|
* console.log(Chunk.getUnsafe(chunk, 3)) // "d"
|
|
523
538
|
*
|
|
524
|
-
* //
|
|
525
|
-
*
|
|
526
|
-
* Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
|
|
527
|
-
* } catch (error) {
|
|
528
|
-
* console.log((error as Error).message) // "Index out of bounds"
|
|
529
|
-
* }
|
|
539
|
+
* // Use Chunk.get when the index may be out of bounds
|
|
540
|
+
* console.log(Option.isNone(Chunk.get(chunk, 10))) // true
|
|
530
541
|
* ```
|
|
531
542
|
*
|
|
532
|
-
* @since 2.0.0
|
|
533
543
|
* @category unsafe
|
|
544
|
+
* @since 2.0.0
|
|
534
545
|
*/
|
|
535
546
|
(index: number): <A>(self: Chunk<A>) => A;
|
|
536
547
|
/**
|
|
537
548
|
* Gets an element unsafely, will throw on out of bounds
|
|
538
549
|
*
|
|
539
|
-
*
|
|
550
|
+
* **Example** (Accessing elements unsafely)
|
|
551
|
+
*
|
|
540
552
|
* ```ts
|
|
541
|
-
* import { Chunk } from "effect"
|
|
553
|
+
* import { Chunk, Option } from "effect"
|
|
542
554
|
*
|
|
543
555
|
* const chunk = Chunk.make("a", "b", "c", "d")
|
|
544
556
|
*
|
|
545
557
|
* console.log(Chunk.getUnsafe(chunk, 1)) // "b"
|
|
546
558
|
* console.log(Chunk.getUnsafe(chunk, 3)) // "d"
|
|
547
559
|
*
|
|
548
|
-
* //
|
|
549
|
-
*
|
|
550
|
-
* Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
|
|
551
|
-
* } catch (error) {
|
|
552
|
-
* console.log((error as Error).message) // "Index out of bounds"
|
|
553
|
-
* }
|
|
560
|
+
* // Use Chunk.get when the index may be out of bounds
|
|
561
|
+
* console.log(Option.isNone(Chunk.get(chunk, 10))) // true
|
|
554
562
|
* ```
|
|
555
563
|
*
|
|
556
|
-
* @since 2.0.0
|
|
557
564
|
* @category unsafe
|
|
565
|
+
* @since 2.0.0
|
|
558
566
|
*/
|
|
559
567
|
<A>(self: Chunk<A>, index: number): A;
|
|
560
568
|
};
|
|
561
569
|
/**
|
|
562
570
|
* Appends the specified element to the end of the `Chunk`.
|
|
563
571
|
*
|
|
564
|
-
*
|
|
572
|
+
* **Example** (Appending an element)
|
|
573
|
+
*
|
|
565
574
|
* ```ts
|
|
566
575
|
* import { Chunk } from "effect"
|
|
567
576
|
*
|
|
@@ -582,7 +591,8 @@ export declare const append: {
|
|
|
582
591
|
/**
|
|
583
592
|
* Appends the specified element to the end of the `Chunk`.
|
|
584
593
|
*
|
|
585
|
-
*
|
|
594
|
+
* **Example** (Appending an element)
|
|
595
|
+
*
|
|
586
596
|
* ```ts
|
|
587
597
|
* import { Chunk } from "effect"
|
|
588
598
|
*
|
|
@@ -603,7 +613,8 @@ export declare const append: {
|
|
|
603
613
|
/**
|
|
604
614
|
* Appends the specified element to the end of the `Chunk`.
|
|
605
615
|
*
|
|
606
|
-
*
|
|
616
|
+
* **Example** (Appending an element)
|
|
617
|
+
*
|
|
607
618
|
* ```ts
|
|
608
619
|
* import { Chunk } from "effect"
|
|
609
620
|
*
|
|
@@ -625,7 +636,8 @@ export declare const append: {
|
|
|
625
636
|
/**
|
|
626
637
|
* Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
|
|
627
638
|
*
|
|
628
|
-
*
|
|
639
|
+
* **Example** (Prepending an element)
|
|
640
|
+
*
|
|
629
641
|
* ```ts
|
|
630
642
|
* import { Chunk } from "effect"
|
|
631
643
|
*
|
|
@@ -646,7 +658,8 @@ export declare const prepend: {
|
|
|
646
658
|
/**
|
|
647
659
|
* Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
|
|
648
660
|
*
|
|
649
|
-
*
|
|
661
|
+
* **Example** (Prepending an element)
|
|
662
|
+
*
|
|
650
663
|
* ```ts
|
|
651
664
|
* import { Chunk } from "effect"
|
|
652
665
|
*
|
|
@@ -667,7 +680,8 @@ export declare const prepend: {
|
|
|
667
680
|
/**
|
|
668
681
|
* Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
|
|
669
682
|
*
|
|
670
|
-
*
|
|
683
|
+
* **Example** (Prepending an element)
|
|
684
|
+
*
|
|
671
685
|
* ```ts
|
|
672
686
|
* import { Chunk } from "effect"
|
|
673
687
|
*
|
|
@@ -689,14 +703,14 @@ export declare const prepend: {
|
|
|
689
703
|
/**
|
|
690
704
|
* Takes the first up to `n` elements from the chunk.
|
|
691
705
|
*
|
|
692
|
-
*
|
|
706
|
+
* **Example** (Taking elements from the start)
|
|
707
|
+
*
|
|
693
708
|
* ```ts
|
|
694
709
|
* import { Chunk } from "effect"
|
|
695
710
|
*
|
|
696
711
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
697
712
|
* const result = Chunk.take(chunk, 3)
|
|
698
|
-
* console.log(result)
|
|
699
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
713
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
700
714
|
* ```
|
|
701
715
|
*
|
|
702
716
|
* @category elements
|
|
@@ -706,14 +720,14 @@ export declare const take: {
|
|
|
706
720
|
/**
|
|
707
721
|
* Takes the first up to `n` elements from the chunk.
|
|
708
722
|
*
|
|
709
|
-
*
|
|
723
|
+
* **Example** (Taking elements from the start)
|
|
724
|
+
*
|
|
710
725
|
* ```ts
|
|
711
726
|
* import { Chunk } from "effect"
|
|
712
727
|
*
|
|
713
728
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
714
729
|
* const result = Chunk.take(chunk, 3)
|
|
715
|
-
* console.log(result)
|
|
716
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
730
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
717
731
|
* ```
|
|
718
732
|
*
|
|
719
733
|
* @category elements
|
|
@@ -723,14 +737,14 @@ export declare const take: {
|
|
|
723
737
|
/**
|
|
724
738
|
* Takes the first up to `n` elements from the chunk.
|
|
725
739
|
*
|
|
726
|
-
*
|
|
740
|
+
* **Example** (Taking elements from the start)
|
|
741
|
+
*
|
|
727
742
|
* ```ts
|
|
728
743
|
* import { Chunk } from "effect"
|
|
729
744
|
*
|
|
730
745
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
731
746
|
* const result = Chunk.take(chunk, 3)
|
|
732
|
-
* console.log(result)
|
|
733
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
747
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
734
748
|
* ```
|
|
735
749
|
*
|
|
736
750
|
* @category elements
|
|
@@ -741,14 +755,14 @@ export declare const take: {
|
|
|
741
755
|
/**
|
|
742
756
|
* Drops the first up to `n` elements from the chunk.
|
|
743
757
|
*
|
|
744
|
-
*
|
|
758
|
+
* **Example** (Dropping elements from the start)
|
|
759
|
+
*
|
|
745
760
|
* ```ts
|
|
746
761
|
* import { Chunk } from "effect"
|
|
747
762
|
*
|
|
748
763
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
749
764
|
* const result = Chunk.drop(chunk, 2)
|
|
750
|
-
* console.log(result)
|
|
751
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
765
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
752
766
|
* ```
|
|
753
767
|
*
|
|
754
768
|
* @category elements
|
|
@@ -758,14 +772,14 @@ export declare const drop: {
|
|
|
758
772
|
/**
|
|
759
773
|
* Drops the first up to `n` elements from the chunk.
|
|
760
774
|
*
|
|
761
|
-
*
|
|
775
|
+
* **Example** (Dropping elements from the start)
|
|
776
|
+
*
|
|
762
777
|
* ```ts
|
|
763
778
|
* import { Chunk } from "effect"
|
|
764
779
|
*
|
|
765
780
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
766
781
|
* const result = Chunk.drop(chunk, 2)
|
|
767
|
-
* console.log(result)
|
|
768
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
782
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
769
783
|
* ```
|
|
770
784
|
*
|
|
771
785
|
* @category elements
|
|
@@ -775,14 +789,14 @@ export declare const drop: {
|
|
|
775
789
|
/**
|
|
776
790
|
* Drops the first up to `n` elements from the chunk.
|
|
777
791
|
*
|
|
778
|
-
*
|
|
792
|
+
* **Example** (Dropping elements from the start)
|
|
793
|
+
*
|
|
779
794
|
* ```ts
|
|
780
795
|
* import { Chunk } from "effect"
|
|
781
796
|
*
|
|
782
797
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
783
798
|
* const result = Chunk.drop(chunk, 2)
|
|
784
|
-
* console.log(result)
|
|
785
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
799
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
786
800
|
* ```
|
|
787
801
|
*
|
|
788
802
|
* @category elements
|
|
@@ -793,14 +807,14 @@ export declare const drop: {
|
|
|
793
807
|
/**
|
|
794
808
|
* Drops the last `n` elements.
|
|
795
809
|
*
|
|
796
|
-
*
|
|
810
|
+
* **Example** (Dropping elements from the end)
|
|
811
|
+
*
|
|
797
812
|
* ```ts
|
|
798
813
|
* import { Chunk } from "effect"
|
|
799
814
|
*
|
|
800
815
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
801
816
|
* const result = Chunk.dropRight(chunk, 2)
|
|
802
|
-
* console.log(result)
|
|
803
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
817
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
804
818
|
* ```
|
|
805
819
|
*
|
|
806
820
|
* @category elements
|
|
@@ -810,14 +824,14 @@ export declare const dropRight: {
|
|
|
810
824
|
/**
|
|
811
825
|
* Drops the last `n` elements.
|
|
812
826
|
*
|
|
813
|
-
*
|
|
827
|
+
* **Example** (Dropping elements from the end)
|
|
828
|
+
*
|
|
814
829
|
* ```ts
|
|
815
830
|
* import { Chunk } from "effect"
|
|
816
831
|
*
|
|
817
832
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
818
833
|
* const result = Chunk.dropRight(chunk, 2)
|
|
819
|
-
* console.log(result)
|
|
820
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
834
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
821
835
|
* ```
|
|
822
836
|
*
|
|
823
837
|
* @category elements
|
|
@@ -827,14 +841,14 @@ export declare const dropRight: {
|
|
|
827
841
|
/**
|
|
828
842
|
* Drops the last `n` elements.
|
|
829
843
|
*
|
|
830
|
-
*
|
|
844
|
+
* **Example** (Dropping elements from the end)
|
|
845
|
+
*
|
|
831
846
|
* ```ts
|
|
832
847
|
* import { Chunk } from "effect"
|
|
833
848
|
*
|
|
834
849
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
835
850
|
* const result = Chunk.dropRight(chunk, 2)
|
|
836
|
-
* console.log(result)
|
|
837
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
851
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
838
852
|
* ```
|
|
839
853
|
*
|
|
840
854
|
* @category elements
|
|
@@ -845,14 +859,14 @@ export declare const dropRight: {
|
|
|
845
859
|
/**
|
|
846
860
|
* Drops all elements so long as the predicate returns true.
|
|
847
861
|
*
|
|
848
|
-
*
|
|
862
|
+
* **Example** (Dropping elements while a predicate matches)
|
|
863
|
+
*
|
|
849
864
|
* ```ts
|
|
850
865
|
* import { Chunk } from "effect"
|
|
851
866
|
*
|
|
852
867
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
853
868
|
* const result = Chunk.dropWhile(chunk, (n) => n < 3)
|
|
854
|
-
* console.log(result)
|
|
855
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
869
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
856
870
|
* ```
|
|
857
871
|
*
|
|
858
872
|
* @category elements
|
|
@@ -862,14 +876,14 @@ export declare const dropWhile: {
|
|
|
862
876
|
/**
|
|
863
877
|
* Drops all elements so long as the predicate returns true.
|
|
864
878
|
*
|
|
865
|
-
*
|
|
879
|
+
* **Example** (Dropping elements while a predicate matches)
|
|
880
|
+
*
|
|
866
881
|
* ```ts
|
|
867
882
|
* import { Chunk } from "effect"
|
|
868
883
|
*
|
|
869
884
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
870
885
|
* const result = Chunk.dropWhile(chunk, (n) => n < 3)
|
|
871
|
-
* console.log(result)
|
|
872
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
886
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
873
887
|
* ```
|
|
874
888
|
*
|
|
875
889
|
* @category elements
|
|
@@ -879,14 +893,14 @@ export declare const dropWhile: {
|
|
|
879
893
|
/**
|
|
880
894
|
* Drops all elements so long as the predicate returns true.
|
|
881
895
|
*
|
|
882
|
-
*
|
|
896
|
+
* **Example** (Dropping elements while a predicate matches)
|
|
897
|
+
*
|
|
883
898
|
* ```ts
|
|
884
899
|
* import { Chunk } from "effect"
|
|
885
900
|
*
|
|
886
901
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
887
902
|
* const result = Chunk.dropWhile(chunk, (n) => n < 3)
|
|
888
|
-
* console.log(result)
|
|
889
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
903
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
890
904
|
* ```
|
|
891
905
|
*
|
|
892
906
|
* @category elements
|
|
@@ -898,7 +912,7 @@ export declare const dropWhile: {
|
|
|
898
912
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
899
913
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
900
914
|
*
|
|
901
|
-
*
|
|
915
|
+
* **Example** (Prepending all elements)
|
|
902
916
|
*
|
|
903
917
|
* ```ts
|
|
904
918
|
* import { Chunk } from "effect"
|
|
@@ -920,7 +934,7 @@ export declare const prependAll: {
|
|
|
920
934
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
921
935
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
922
936
|
*
|
|
923
|
-
*
|
|
937
|
+
* **Example** (Prepending all elements)
|
|
924
938
|
*
|
|
925
939
|
* ```ts
|
|
926
940
|
* import { Chunk } from "effect"
|
|
@@ -942,7 +956,7 @@ export declare const prependAll: {
|
|
|
942
956
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
943
957
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
944
958
|
*
|
|
945
|
-
*
|
|
959
|
+
* **Example** (Prepending all elements)
|
|
946
960
|
*
|
|
947
961
|
* ```ts
|
|
948
962
|
* import { Chunk } from "effect"
|
|
@@ -964,7 +978,7 @@ export declare const prependAll: {
|
|
|
964
978
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
965
979
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
966
980
|
*
|
|
967
|
-
*
|
|
981
|
+
* **Example** (Prepending all elements)
|
|
968
982
|
*
|
|
969
983
|
* ```ts
|
|
970
984
|
* import { Chunk } from "effect"
|
|
@@ -986,7 +1000,7 @@ export declare const prependAll: {
|
|
|
986
1000
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
987
1001
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
988
1002
|
*
|
|
989
|
-
*
|
|
1003
|
+
* **Example** (Prepending all elements)
|
|
990
1004
|
*
|
|
991
1005
|
* ```ts
|
|
992
1006
|
* import { Chunk } from "effect"
|
|
@@ -1009,7 +1023,7 @@ export declare const prependAll: {
|
|
|
1009
1023
|
* Concatenates two chunks, combining their elements.
|
|
1010
1024
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1011
1025
|
*
|
|
1012
|
-
*
|
|
1026
|
+
* **Example** (Appending all elements)
|
|
1013
1027
|
*
|
|
1014
1028
|
* ```ts
|
|
1015
1029
|
* import { Chunk } from "effect"
|
|
@@ -1031,7 +1045,7 @@ export declare const appendAll: {
|
|
|
1031
1045
|
* Concatenates two chunks, combining their elements.
|
|
1032
1046
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1033
1047
|
*
|
|
1034
|
-
*
|
|
1048
|
+
* **Example** (Appending all elements)
|
|
1035
1049
|
*
|
|
1036
1050
|
* ```ts
|
|
1037
1051
|
* import { Chunk } from "effect"
|
|
@@ -1053,7 +1067,7 @@ export declare const appendAll: {
|
|
|
1053
1067
|
* Concatenates two chunks, combining their elements.
|
|
1054
1068
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1055
1069
|
*
|
|
1056
|
-
*
|
|
1070
|
+
* **Example** (Appending all elements)
|
|
1057
1071
|
*
|
|
1058
1072
|
* ```ts
|
|
1059
1073
|
* import { Chunk } from "effect"
|
|
@@ -1075,7 +1089,7 @@ export declare const appendAll: {
|
|
|
1075
1089
|
* Concatenates two chunks, combining their elements.
|
|
1076
1090
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1077
1091
|
*
|
|
1078
|
-
*
|
|
1092
|
+
* **Example** (Appending all elements)
|
|
1079
1093
|
*
|
|
1080
1094
|
* ```ts
|
|
1081
1095
|
* import { Chunk } from "effect"
|
|
@@ -1097,7 +1111,7 @@ export declare const appendAll: {
|
|
|
1097
1111
|
* Concatenates two chunks, combining their elements.
|
|
1098
1112
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1099
1113
|
*
|
|
1100
|
-
*
|
|
1114
|
+
* **Example** (Appending all elements)
|
|
1101
1115
|
*
|
|
1102
1116
|
* ```ts
|
|
1103
1117
|
* import { Chunk } from "effect"
|
|
@@ -1119,7 +1133,8 @@ export declare const appendAll: {
|
|
|
1119
1133
|
/**
|
|
1120
1134
|
* Returns a filtered and mapped subset of the elements.
|
|
1121
1135
|
*
|
|
1122
|
-
*
|
|
1136
|
+
* **Example** (Filtering and mapping values)
|
|
1137
|
+
*
|
|
1123
1138
|
* ```ts
|
|
1124
1139
|
* import { Chunk } from "effect"
|
|
1125
1140
|
* import * as Result from "effect/Result"
|
|
@@ -1139,14 +1154,15 @@ export declare const appendAll: {
|
|
|
1139
1154
|
* console.log(Chunk.toArray(evenIndexNumbers)) // [1]
|
|
1140
1155
|
* ```
|
|
1141
1156
|
*
|
|
1142
|
-
* @since 2.0.0
|
|
1143
1157
|
* @category filtering
|
|
1158
|
+
* @since 2.0.0
|
|
1144
1159
|
*/
|
|
1145
1160
|
export declare const filterMap: {
|
|
1146
1161
|
/**
|
|
1147
1162
|
* Returns a filtered and mapped subset of the elements.
|
|
1148
1163
|
*
|
|
1149
|
-
*
|
|
1164
|
+
* **Example** (Filtering and mapping values)
|
|
1165
|
+
*
|
|
1150
1166
|
* ```ts
|
|
1151
1167
|
* import { Chunk } from "effect"
|
|
1152
1168
|
* import * as Result from "effect/Result"
|
|
@@ -1166,14 +1182,15 @@ export declare const filterMap: {
|
|
|
1166
1182
|
* console.log(Chunk.toArray(evenIndexNumbers)) // [1]
|
|
1167
1183
|
* ```
|
|
1168
1184
|
*
|
|
1169
|
-
* @since 2.0.0
|
|
1170
1185
|
* @category filtering
|
|
1186
|
+
* @since 2.0.0
|
|
1171
1187
|
*/
|
|
1172
1188
|
<A, B, X>(f: (input: A, i: number) => Result<B, X>): (self: Chunk<A>) => Chunk<B>;
|
|
1173
1189
|
/**
|
|
1174
1190
|
* Returns a filtered and mapped subset of the elements.
|
|
1175
1191
|
*
|
|
1176
|
-
*
|
|
1192
|
+
* **Example** (Filtering and mapping values)
|
|
1193
|
+
*
|
|
1177
1194
|
* ```ts
|
|
1178
1195
|
* import { Chunk } from "effect"
|
|
1179
1196
|
* import * as Result from "effect/Result"
|
|
@@ -1193,15 +1210,16 @@ export declare const filterMap: {
|
|
|
1193
1210
|
* console.log(Chunk.toArray(evenIndexNumbers)) // [1]
|
|
1194
1211
|
* ```
|
|
1195
1212
|
*
|
|
1196
|
-
* @since 2.0.0
|
|
1197
1213
|
* @category filtering
|
|
1214
|
+
* @since 2.0.0
|
|
1198
1215
|
*/
|
|
1199
1216
|
<A, B, X>(self: Chunk<A>, f: (input: A, i: number) => Result<B, X>): Chunk<B>;
|
|
1200
1217
|
};
|
|
1201
1218
|
/**
|
|
1202
1219
|
* Returns a filtered subset of the elements.
|
|
1203
1220
|
*
|
|
1204
|
-
*
|
|
1221
|
+
* **Example** (Filtering values)
|
|
1222
|
+
*
|
|
1205
1223
|
* ```ts
|
|
1206
1224
|
* import { Chunk } from "effect"
|
|
1207
1225
|
*
|
|
@@ -1215,14 +1233,15 @@ export declare const filterMap: {
|
|
|
1215
1233
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1216
1234
|
* ```
|
|
1217
1235
|
*
|
|
1218
|
-
* @since 2.0.0
|
|
1219
1236
|
* @category filtering
|
|
1237
|
+
* @since 2.0.0
|
|
1220
1238
|
*/
|
|
1221
1239
|
export declare const filter: {
|
|
1222
1240
|
/**
|
|
1223
1241
|
* Returns a filtered subset of the elements.
|
|
1224
1242
|
*
|
|
1225
|
-
*
|
|
1243
|
+
* **Example** (Filtering values)
|
|
1244
|
+
*
|
|
1226
1245
|
* ```ts
|
|
1227
1246
|
* import { Chunk } from "effect"
|
|
1228
1247
|
*
|
|
@@ -1236,14 +1255,15 @@ export declare const filter: {
|
|
|
1236
1255
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1237
1256
|
* ```
|
|
1238
1257
|
*
|
|
1239
|
-
* @since 2.0.0
|
|
1240
1258
|
* @category filtering
|
|
1259
|
+
* @since 2.0.0
|
|
1241
1260
|
*/
|
|
1242
1261
|
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Chunk<B>;
|
|
1243
1262
|
/**
|
|
1244
1263
|
* Returns a filtered subset of the elements.
|
|
1245
1264
|
*
|
|
1246
|
-
*
|
|
1265
|
+
* **Example** (Filtering values)
|
|
1266
|
+
*
|
|
1247
1267
|
* ```ts
|
|
1248
1268
|
* import { Chunk } from "effect"
|
|
1249
1269
|
*
|
|
@@ -1257,14 +1277,15 @@ export declare const filter: {
|
|
|
1257
1277
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1258
1278
|
* ```
|
|
1259
1279
|
*
|
|
1260
|
-
* @since 2.0.0
|
|
1261
1280
|
* @category filtering
|
|
1281
|
+
* @since 2.0.0
|
|
1262
1282
|
*/
|
|
1263
1283
|
<A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Chunk<A>;
|
|
1264
1284
|
/**
|
|
1265
1285
|
* Returns a filtered subset of the elements.
|
|
1266
1286
|
*
|
|
1267
|
-
*
|
|
1287
|
+
* **Example** (Filtering values)
|
|
1288
|
+
*
|
|
1268
1289
|
* ```ts
|
|
1269
1290
|
* import { Chunk } from "effect"
|
|
1270
1291
|
*
|
|
@@ -1278,14 +1299,15 @@ export declare const filter: {
|
|
|
1278
1299
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1279
1300
|
* ```
|
|
1280
1301
|
*
|
|
1281
|
-
* @since 2.0.0
|
|
1282
1302
|
* @category filtering
|
|
1303
|
+
* @since 2.0.0
|
|
1283
1304
|
*/
|
|
1284
1305
|
<A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Chunk<B>;
|
|
1285
1306
|
/**
|
|
1286
1307
|
* Returns a filtered subset of the elements.
|
|
1287
1308
|
*
|
|
1288
|
-
*
|
|
1309
|
+
* **Example** (Filtering values)
|
|
1310
|
+
*
|
|
1289
1311
|
* ```ts
|
|
1290
1312
|
* import { Chunk } from "effect"
|
|
1291
1313
|
*
|
|
@@ -1299,15 +1321,16 @@ export declare const filter: {
|
|
|
1299
1321
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1300
1322
|
* ```
|
|
1301
1323
|
*
|
|
1302
|
-
* @since 2.0.0
|
|
1303
1324
|
* @category filtering
|
|
1325
|
+
* @since 2.0.0
|
|
1304
1326
|
*/
|
|
1305
1327
|
<A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A>;
|
|
1306
1328
|
};
|
|
1307
1329
|
/**
|
|
1308
1330
|
* Transforms all elements of the chunk for as long as the specified function succeeds.
|
|
1309
1331
|
*
|
|
1310
|
-
*
|
|
1332
|
+
* **Example** (Filtering and mapping while values match)
|
|
1333
|
+
*
|
|
1311
1334
|
* ```ts
|
|
1312
1335
|
* import { Chunk } from "effect"
|
|
1313
1336
|
* import * as Result from "effect/Result"
|
|
@@ -1328,14 +1351,15 @@ export declare const filter: {
|
|
|
1328
1351
|
* console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
|
|
1329
1352
|
* ```
|
|
1330
1353
|
*
|
|
1331
|
-
* @since 2.0.0
|
|
1332
1354
|
* @category filtering
|
|
1355
|
+
* @since 2.0.0
|
|
1333
1356
|
*/
|
|
1334
1357
|
export declare const filterMapWhile: {
|
|
1335
1358
|
/**
|
|
1336
1359
|
* Transforms all elements of the chunk for as long as the specified function succeeds.
|
|
1337
1360
|
*
|
|
1338
|
-
*
|
|
1361
|
+
* **Example** (Filtering and mapping while values match)
|
|
1362
|
+
*
|
|
1339
1363
|
* ```ts
|
|
1340
1364
|
* import { Chunk } from "effect"
|
|
1341
1365
|
* import * as Result from "effect/Result"
|
|
@@ -1356,14 +1380,15 @@ export declare const filterMapWhile: {
|
|
|
1356
1380
|
* console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
|
|
1357
1381
|
* ```
|
|
1358
1382
|
*
|
|
1359
|
-
* @since 2.0.0
|
|
1360
1383
|
* @category filtering
|
|
1384
|
+
* @since 2.0.0
|
|
1361
1385
|
*/
|
|
1362
1386
|
<A, B, X>(f: Filter.Filter<A, B, X>): (self: Chunk<A>) => Chunk<B>;
|
|
1363
1387
|
/**
|
|
1364
1388
|
* Transforms all elements of the chunk for as long as the specified function succeeds.
|
|
1365
1389
|
*
|
|
1366
|
-
*
|
|
1390
|
+
* **Example** (Filtering and mapping while values match)
|
|
1391
|
+
*
|
|
1367
1392
|
* ```ts
|
|
1368
1393
|
* import { Chunk } from "effect"
|
|
1369
1394
|
* import * as Result from "effect/Result"
|
|
@@ -1384,23 +1409,23 @@ export declare const filterMapWhile: {
|
|
|
1384
1409
|
* console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
|
|
1385
1410
|
* ```
|
|
1386
1411
|
*
|
|
1387
|
-
* @since 2.0.0
|
|
1388
1412
|
* @category filtering
|
|
1413
|
+
* @since 2.0.0
|
|
1389
1414
|
*/
|
|
1390
1415
|
<A, B, X>(self: Chunk<A>, f: Filter.Filter<A, B, X>): Chunk<B>;
|
|
1391
1416
|
};
|
|
1392
1417
|
/**
|
|
1393
1418
|
* Filter out optional values
|
|
1394
1419
|
*
|
|
1395
|
-
*
|
|
1420
|
+
* **Example** (Compacting optional values)
|
|
1421
|
+
*
|
|
1396
1422
|
* ```ts
|
|
1397
1423
|
* import { Chunk } from "effect"
|
|
1398
1424
|
* import * as Option from "effect/Option"
|
|
1399
1425
|
*
|
|
1400
1426
|
* const chunk = Chunk.make(Option.some(1), Option.none(), Option.some(3))
|
|
1401
1427
|
* const result = Chunk.compact(chunk)
|
|
1402
|
-
* console.log(result)
|
|
1403
|
-
* // { _id: 'Chunk', values: [ 1, 3 ] }
|
|
1428
|
+
* console.log(Chunk.toArray(result)) // [1, 3]
|
|
1404
1429
|
* ```
|
|
1405
1430
|
*
|
|
1406
1431
|
* @category filtering
|
|
@@ -1410,7 +1435,8 @@ export declare const compact: <A>(self: Chunk<Option<A>>) => Chunk<A>;
|
|
|
1410
1435
|
/**
|
|
1411
1436
|
* Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
|
|
1412
1437
|
*
|
|
1413
|
-
*
|
|
1438
|
+
* **Example** (Flat mapping chunks)
|
|
1439
|
+
*
|
|
1414
1440
|
* ```ts
|
|
1415
1441
|
* import { Chunk } from "effect"
|
|
1416
1442
|
*
|
|
@@ -1431,14 +1457,15 @@ export declare const compact: <A>(self: Chunk<Option<A>>) => Chunk<A>;
|
|
|
1431
1457
|
* console.log(Chunk.toArray(indexed)) // [1, 3, 5]
|
|
1432
1458
|
* ```
|
|
1433
1459
|
*
|
|
1434
|
-
* @since 2.0.0
|
|
1435
1460
|
* @category sequencing
|
|
1461
|
+
* @since 2.0.0
|
|
1436
1462
|
*/
|
|
1437
1463
|
export declare const flatMap: {
|
|
1438
1464
|
/**
|
|
1439
1465
|
* Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
|
|
1440
1466
|
*
|
|
1441
|
-
*
|
|
1467
|
+
* **Example** (Flat mapping chunks)
|
|
1468
|
+
*
|
|
1442
1469
|
* ```ts
|
|
1443
1470
|
* import { Chunk } from "effect"
|
|
1444
1471
|
*
|
|
@@ -1459,14 +1486,15 @@ export declare const flatMap: {
|
|
|
1459
1486
|
* console.log(Chunk.toArray(indexed)) // [1, 3, 5]
|
|
1460
1487
|
* ```
|
|
1461
1488
|
*
|
|
1462
|
-
* @since 2.0.0
|
|
1463
1489
|
* @category sequencing
|
|
1490
|
+
* @since 2.0.0
|
|
1464
1491
|
*/
|
|
1465
1492
|
<S extends Chunk<any>, T extends Chunk<any>>(f: (a: Chunk.Infer<S>, i: number) => T): (self: S) => Chunk.AndNonEmpty<S, T, Chunk.Infer<T>>;
|
|
1466
1493
|
/**
|
|
1467
1494
|
* Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
|
|
1468
1495
|
*
|
|
1469
|
-
*
|
|
1496
|
+
* **Example** (Flat mapping chunks)
|
|
1497
|
+
*
|
|
1470
1498
|
* ```ts
|
|
1471
1499
|
* import { Chunk } from "effect"
|
|
1472
1500
|
*
|
|
@@ -1487,14 +1515,15 @@ export declare const flatMap: {
|
|
|
1487
1515
|
* console.log(Chunk.toArray(indexed)) // [1, 3, 5]
|
|
1488
1516
|
* ```
|
|
1489
1517
|
*
|
|
1490
|
-
* @since 2.0.0
|
|
1491
1518
|
* @category sequencing
|
|
1519
|
+
* @since 2.0.0
|
|
1492
1520
|
*/
|
|
1493
1521
|
<A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => NonEmptyChunk<B>): NonEmptyChunk<B>;
|
|
1494
1522
|
/**
|
|
1495
1523
|
* Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
|
|
1496
1524
|
*
|
|
1497
|
-
*
|
|
1525
|
+
* **Example** (Flat mapping chunks)
|
|
1526
|
+
*
|
|
1498
1527
|
* ```ts
|
|
1499
1528
|
* import { Chunk } from "effect"
|
|
1500
1529
|
*
|
|
@@ -1515,8 +1544,8 @@ export declare const flatMap: {
|
|
|
1515
1544
|
* console.log(Chunk.toArray(indexed)) // [1, 3, 5]
|
|
1516
1545
|
* ```
|
|
1517
1546
|
*
|
|
1518
|
-
* @since 2.0.0
|
|
1519
1547
|
* @category sequencing
|
|
1548
|
+
* @since 2.0.0
|
|
1520
1549
|
*/
|
|
1521
1550
|
<A, B>(self: Chunk<A>, f: (a: A, i: number) => Chunk<B>): Chunk<B>;
|
|
1522
1551
|
};
|
|
@@ -1530,7 +1559,8 @@ export declare const flatMap: {
|
|
|
1530
1559
|
* instead, it is primarily used for side effects, such as logging or
|
|
1531
1560
|
* accumulating data in an external variable.
|
|
1532
1561
|
*
|
|
1533
|
-
*
|
|
1562
|
+
* **Example** (Iterating over chunk values)
|
|
1563
|
+
*
|
|
1534
1564
|
* ```ts
|
|
1535
1565
|
* import { Chunk } from "effect"
|
|
1536
1566
|
*
|
|
@@ -1553,8 +1583,8 @@ export declare const flatMap: {
|
|
|
1553
1583
|
* // Index 3: 4
|
|
1554
1584
|
* ```
|
|
1555
1585
|
*
|
|
1556
|
-
* @since 2.0.0
|
|
1557
1586
|
* @category combinators
|
|
1587
|
+
* @since 2.0.0
|
|
1558
1588
|
*/
|
|
1559
1589
|
export declare const forEach: {
|
|
1560
1590
|
/**
|
|
@@ -1567,7 +1597,8 @@ export declare const forEach: {
|
|
|
1567
1597
|
* instead, it is primarily used for side effects, such as logging or
|
|
1568
1598
|
* accumulating data in an external variable.
|
|
1569
1599
|
*
|
|
1570
|
-
*
|
|
1600
|
+
* **Example** (Iterating over chunk values)
|
|
1601
|
+
*
|
|
1571
1602
|
* ```ts
|
|
1572
1603
|
* import { Chunk } from "effect"
|
|
1573
1604
|
*
|
|
@@ -1590,8 +1621,8 @@ export declare const forEach: {
|
|
|
1590
1621
|
* // Index 3: 4
|
|
1591
1622
|
* ```
|
|
1592
1623
|
*
|
|
1593
|
-
* @since 2.0.0
|
|
1594
1624
|
* @category combinators
|
|
1625
|
+
* @since 2.0.0
|
|
1595
1626
|
*/
|
|
1596
1627
|
<A, B>(f: (a: A, index: number) => B): (self: Chunk<A>) => void;
|
|
1597
1628
|
/**
|
|
@@ -1604,7 +1635,8 @@ export declare const forEach: {
|
|
|
1604
1635
|
* instead, it is primarily used for side effects, such as logging or
|
|
1605
1636
|
* accumulating data in an external variable.
|
|
1606
1637
|
*
|
|
1607
|
-
*
|
|
1638
|
+
* **Example** (Iterating over chunk values)
|
|
1639
|
+
*
|
|
1608
1640
|
* ```ts
|
|
1609
1641
|
* import { Chunk } from "effect"
|
|
1610
1642
|
*
|
|
@@ -1627,15 +1659,16 @@ export declare const forEach: {
|
|
|
1627
1659
|
* // Index 3: 4
|
|
1628
1660
|
* ```
|
|
1629
1661
|
*
|
|
1630
|
-
* @since 2.0.0
|
|
1631
1662
|
* @category combinators
|
|
1663
|
+
* @since 2.0.0
|
|
1632
1664
|
*/
|
|
1633
1665
|
<A, B>(self: Chunk<A>, f: (a: A, index: number) => B): void;
|
|
1634
1666
|
};
|
|
1635
1667
|
/**
|
|
1636
1668
|
* Flattens a chunk of chunks into a single chunk by concatenating all chunks.
|
|
1637
1669
|
*
|
|
1638
|
-
*
|
|
1670
|
+
* **Example** (Flattening nested chunks)
|
|
1671
|
+
*
|
|
1639
1672
|
* ```ts
|
|
1640
1673
|
* import { Chunk } from "effect"
|
|
1641
1674
|
*
|
|
@@ -1656,14 +1689,15 @@ export declare const forEach: {
|
|
|
1656
1689
|
* console.log(Chunk.toArray(Chunk.flatten(withEmpty))) // [1, 2, 3, 4]
|
|
1657
1690
|
* ```
|
|
1658
1691
|
*
|
|
1659
|
-
* @since 2.0.0
|
|
1660
1692
|
* @category sequencing
|
|
1693
|
+
* @since 2.0.0
|
|
1661
1694
|
*/
|
|
1662
1695
|
export declare const flatten: <S extends Chunk<Chunk<any>>>(self: S) => Chunk.Flatten<S>;
|
|
1663
1696
|
/**
|
|
1664
1697
|
* Groups elements in chunks of up to `n` elements.
|
|
1665
1698
|
*
|
|
1666
|
-
*
|
|
1699
|
+
* **Example** (Splitting into fixed-size chunks)
|
|
1700
|
+
*
|
|
1667
1701
|
* ```ts
|
|
1668
1702
|
* import { Chunk } from "effect"
|
|
1669
1703
|
*
|
|
@@ -1680,14 +1714,15 @@ export declare const flatten: <S extends Chunk<Chunk<any>>>(self: S) => Chunk.Fl
|
|
|
1680
1714
|
* // [[1, 2], [3, 4], [5]]
|
|
1681
1715
|
* ```
|
|
1682
1716
|
*
|
|
1683
|
-
* @since 2.0.0
|
|
1684
1717
|
* @category elements
|
|
1718
|
+
* @since 2.0.0
|
|
1685
1719
|
*/
|
|
1686
1720
|
export declare const chunksOf: {
|
|
1687
1721
|
/**
|
|
1688
1722
|
* Groups elements in chunks of up to `n` elements.
|
|
1689
1723
|
*
|
|
1690
|
-
*
|
|
1724
|
+
* **Example** (Splitting into fixed-size chunks)
|
|
1725
|
+
*
|
|
1691
1726
|
* ```ts
|
|
1692
1727
|
* import { Chunk } from "effect"
|
|
1693
1728
|
*
|
|
@@ -1704,14 +1739,15 @@ export declare const chunksOf: {
|
|
|
1704
1739
|
* // [[1, 2], [3, 4], [5]]
|
|
1705
1740
|
* ```
|
|
1706
1741
|
*
|
|
1707
|
-
* @since 2.0.0
|
|
1708
1742
|
* @category elements
|
|
1743
|
+
* @since 2.0.0
|
|
1709
1744
|
*/
|
|
1710
1745
|
(n: number): <A>(self: Chunk<A>) => Chunk<Chunk<A>>;
|
|
1711
1746
|
/**
|
|
1712
1747
|
* Groups elements in chunks of up to `n` elements.
|
|
1713
1748
|
*
|
|
1714
|
-
*
|
|
1749
|
+
* **Example** (Splitting into fixed-size chunks)
|
|
1750
|
+
*
|
|
1715
1751
|
* ```ts
|
|
1716
1752
|
* import { Chunk } from "effect"
|
|
1717
1753
|
*
|
|
@@ -1728,8 +1764,8 @@ export declare const chunksOf: {
|
|
|
1728
1764
|
* // [[1, 2], [3, 4], [5]]
|
|
1729
1765
|
* ```
|
|
1730
1766
|
*
|
|
1731
|
-
* @since 2.0.0
|
|
1732
1767
|
* @category elements
|
|
1768
|
+
* @since 2.0.0
|
|
1733
1769
|
*/
|
|
1734
1770
|
<A>(self: Chunk<A>, n: number): Chunk<Chunk<A>>;
|
|
1735
1771
|
};
|
|
@@ -1738,7 +1774,8 @@ export declare const chunksOf: {
|
|
|
1738
1774
|
*
|
|
1739
1775
|
* The order and references of result values are determined by the Chunk.
|
|
1740
1776
|
*
|
|
1741
|
-
*
|
|
1777
|
+
* **Example** (Intersecting chunks)
|
|
1778
|
+
*
|
|
1742
1779
|
* ```ts
|
|
1743
1780
|
* import { Chunk } from "effect"
|
|
1744
1781
|
*
|
|
@@ -1758,8 +1795,8 @@ export declare const chunksOf: {
|
|
|
1758
1795
|
* console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
|
|
1759
1796
|
* ```
|
|
1760
1797
|
*
|
|
1761
|
-
* @since 2.0.0
|
|
1762
1798
|
* @category elements
|
|
1799
|
+
* @since 2.0.0
|
|
1763
1800
|
*/
|
|
1764
1801
|
export declare const intersection: {
|
|
1765
1802
|
/**
|
|
@@ -1767,7 +1804,8 @@ export declare const intersection: {
|
|
|
1767
1804
|
*
|
|
1768
1805
|
* The order and references of result values are determined by the Chunk.
|
|
1769
1806
|
*
|
|
1770
|
-
*
|
|
1807
|
+
* **Example** (Intersecting chunks)
|
|
1808
|
+
*
|
|
1771
1809
|
* ```ts
|
|
1772
1810
|
* import { Chunk } from "effect"
|
|
1773
1811
|
*
|
|
@@ -1787,8 +1825,8 @@ export declare const intersection: {
|
|
|
1787
1825
|
* console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
|
|
1788
1826
|
* ```
|
|
1789
1827
|
*
|
|
1790
|
-
* @since 2.0.0
|
|
1791
1828
|
* @category elements
|
|
1829
|
+
* @since 2.0.0
|
|
1792
1830
|
*/
|
|
1793
1831
|
<A>(that: Chunk<A>): <B>(self: Chunk<B>) => Chunk<A & B>;
|
|
1794
1832
|
/**
|
|
@@ -1796,7 +1834,8 @@ export declare const intersection: {
|
|
|
1796
1834
|
*
|
|
1797
1835
|
* The order and references of result values are determined by the Chunk.
|
|
1798
1836
|
*
|
|
1799
|
-
*
|
|
1837
|
+
* **Example** (Intersecting chunks)
|
|
1838
|
+
*
|
|
1800
1839
|
* ```ts
|
|
1801
1840
|
* import { Chunk } from "effect"
|
|
1802
1841
|
*
|
|
@@ -1816,15 +1855,16 @@ export declare const intersection: {
|
|
|
1816
1855
|
* console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
|
|
1817
1856
|
* ```
|
|
1818
1857
|
*
|
|
1819
|
-
* @since 2.0.0
|
|
1820
1858
|
* @category elements
|
|
1859
|
+
* @since 2.0.0
|
|
1821
1860
|
*/
|
|
1822
1861
|
<A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<A & B>;
|
|
1823
1862
|
};
|
|
1824
1863
|
/**
|
|
1825
1864
|
* Determines if the chunk is empty.
|
|
1826
1865
|
*
|
|
1827
|
-
*
|
|
1866
|
+
* **Example** (Checking for empty chunks)
|
|
1867
|
+
*
|
|
1828
1868
|
* ```ts
|
|
1829
1869
|
* import { Chunk } from "effect"
|
|
1830
1870
|
*
|
|
@@ -1839,7 +1879,8 @@ export declare const isEmpty: <A>(self: Chunk<A>) => boolean;
|
|
|
1839
1879
|
/**
|
|
1840
1880
|
* Determines if the chunk is not empty.
|
|
1841
1881
|
*
|
|
1842
|
-
*
|
|
1882
|
+
* **Example** (Checking for non-empty chunks)
|
|
1883
|
+
*
|
|
1843
1884
|
* ```ts
|
|
1844
1885
|
* import { Chunk } from "effect"
|
|
1845
1886
|
*
|
|
@@ -1854,7 +1895,8 @@ export declare const isNonEmpty: <A>(self: Chunk<A>) => self is NonEmptyChunk<A>
|
|
|
1854
1895
|
/**
|
|
1855
1896
|
* Returns the first element of this chunk if it exists.
|
|
1856
1897
|
*
|
|
1857
|
-
*
|
|
1898
|
+
* **Example** (Getting the first element)
|
|
1899
|
+
*
|
|
1858
1900
|
* ```ts
|
|
1859
1901
|
* import { Chunk } from "effect"
|
|
1860
1902
|
*
|
|
@@ -1871,9 +1913,10 @@ export declare const head: <A>(self: Chunk<A>) => Option<A>;
|
|
|
1871
1913
|
*
|
|
1872
1914
|
* It will throw an error if the chunk is empty.
|
|
1873
1915
|
*
|
|
1874
|
-
*
|
|
1916
|
+
* **Example** (Getting the first element unsafely)
|
|
1917
|
+
*
|
|
1875
1918
|
* ```ts
|
|
1876
|
-
* import { Chunk } from "effect"
|
|
1919
|
+
* import { Chunk, Option } from "effect"
|
|
1877
1920
|
*
|
|
1878
1921
|
* const chunk = Chunk.make(1, 2, 3, 4)
|
|
1879
1922
|
* console.log(Chunk.headUnsafe(chunk)) // 1
|
|
@@ -1881,22 +1924,19 @@ export declare const head: <A>(self: Chunk<A>) => Option<A>;
|
|
|
1881
1924
|
* const singleElement = Chunk.make("hello")
|
|
1882
1925
|
* console.log(Chunk.headUnsafe(singleElement)) // "hello"
|
|
1883
1926
|
*
|
|
1884
|
-
* //
|
|
1885
|
-
*
|
|
1886
|
-
* Chunk.headUnsafe(Chunk.empty())
|
|
1887
|
-
* } catch (error) {
|
|
1888
|
-
* console.log((error as Error).message) // "Index out of bounds"
|
|
1889
|
-
* }
|
|
1927
|
+
* // Use Chunk.head when the chunk may be empty
|
|
1928
|
+
* console.log(Option.isNone(Chunk.head(Chunk.empty()))) // true
|
|
1890
1929
|
* ```
|
|
1891
1930
|
*
|
|
1892
|
-
* @since 2.0.0
|
|
1893
1931
|
* @category unsafe
|
|
1932
|
+
* @since 2.0.0
|
|
1894
1933
|
*/
|
|
1895
1934
|
export declare const headUnsafe: <A>(self: Chunk<A>) => A;
|
|
1896
1935
|
/**
|
|
1897
1936
|
* Returns the first element of this non empty chunk.
|
|
1898
1937
|
*
|
|
1899
|
-
*
|
|
1938
|
+
* **Example** (Getting the first element of a non-empty chunk)
|
|
1939
|
+
*
|
|
1900
1940
|
* ```ts
|
|
1901
1941
|
* import { Chunk } from "effect"
|
|
1902
1942
|
*
|
|
@@ -1910,14 +1950,15 @@ export declare const headUnsafe: <A>(self: Chunk<A>) => A;
|
|
|
1910
1950
|
* // Chunk.headNonEmpty(Chunk.empty()) // TypeScript error
|
|
1911
1951
|
* ```
|
|
1912
1952
|
*
|
|
1913
|
-
* @since 2.0.0
|
|
1914
1953
|
* @category elements
|
|
1954
|
+
* @since 2.0.0
|
|
1915
1955
|
*/
|
|
1916
1956
|
export declare const headNonEmpty: <A>(self: NonEmptyChunk<A>) => A;
|
|
1917
1957
|
/**
|
|
1918
1958
|
* Returns the last element of this chunk if it exists.
|
|
1919
1959
|
*
|
|
1920
|
-
*
|
|
1960
|
+
* **Example** (Getting the last element)
|
|
1961
|
+
*
|
|
1921
1962
|
* ```ts
|
|
1922
1963
|
* import { Chunk } from "effect"
|
|
1923
1964
|
*
|
|
@@ -1934,9 +1975,10 @@ export declare const last: <A>(self: Chunk<A>) => Option<A>;
|
|
|
1934
1975
|
*
|
|
1935
1976
|
* It will throw an error if the chunk is empty.
|
|
1936
1977
|
*
|
|
1937
|
-
*
|
|
1978
|
+
* **Example** (Getting the last element unsafely)
|
|
1979
|
+
*
|
|
1938
1980
|
* ```ts
|
|
1939
|
-
* import { Chunk } from "effect"
|
|
1981
|
+
* import { Chunk, Option } from "effect"
|
|
1940
1982
|
*
|
|
1941
1983
|
* const chunk = Chunk.make(1, 2, 3, 4)
|
|
1942
1984
|
* console.log(Chunk.lastUnsafe(chunk)) // 4
|
|
@@ -1944,22 +1986,19 @@ export declare const last: <A>(self: Chunk<A>) => Option<A>;
|
|
|
1944
1986
|
* const singleElement = Chunk.make("hello")
|
|
1945
1987
|
* console.log(Chunk.lastUnsafe(singleElement)) // "hello"
|
|
1946
1988
|
*
|
|
1947
|
-
* //
|
|
1948
|
-
*
|
|
1949
|
-
* Chunk.lastUnsafe(Chunk.empty())
|
|
1950
|
-
* } catch (error) {
|
|
1951
|
-
* console.log((error as Error).message) // "Index out of bounds"
|
|
1952
|
-
* }
|
|
1989
|
+
* // Use Chunk.last when the chunk may be empty
|
|
1990
|
+
* console.log(Option.isNone(Chunk.last(Chunk.empty()))) // true
|
|
1953
1991
|
* ```
|
|
1954
1992
|
*
|
|
1955
|
-
* @since 2.0.0
|
|
1956
1993
|
* @category unsafe
|
|
1994
|
+
* @since 2.0.0
|
|
1957
1995
|
*/
|
|
1958
1996
|
export declare const lastUnsafe: <A>(self: Chunk<A>) => A;
|
|
1959
1997
|
/**
|
|
1960
1998
|
* Returns the last element of this non empty chunk.
|
|
1961
1999
|
*
|
|
1962
|
-
*
|
|
2000
|
+
* **Example** (Getting the last element of a non-empty chunk)
|
|
2001
|
+
*
|
|
1963
2002
|
* ```ts
|
|
1964
2003
|
* import { Chunk } from "effect"
|
|
1965
2004
|
*
|
|
@@ -1973,14 +2012,15 @@ export declare const lastUnsafe: <A>(self: Chunk<A>) => A;
|
|
|
1973
2012
|
* // Chunk.lastNonEmpty(Chunk.empty()) // TypeScript error
|
|
1974
2013
|
* ```
|
|
1975
2014
|
*
|
|
1976
|
-
* @since 3.4.0
|
|
1977
2015
|
* @category elements
|
|
2016
|
+
* @since 3.4.0
|
|
1978
2017
|
*/
|
|
1979
2018
|
export declare const lastNonEmpty: <A>(self: NonEmptyChunk<A>) => A;
|
|
1980
2019
|
/**
|
|
1981
2020
|
* A namespace containing utility types for Chunk operations.
|
|
1982
2021
|
*
|
|
1983
|
-
*
|
|
2022
|
+
* **Example** (Working with Chunk utility types)
|
|
2023
|
+
*
|
|
1984
2024
|
* ```ts
|
|
1985
2025
|
* import type { Chunk } from "effect"
|
|
1986
2026
|
*
|
|
@@ -2000,7 +2040,8 @@ export declare namespace Chunk {
|
|
|
2000
2040
|
/**
|
|
2001
2041
|
* Infers the element type of a Chunk.
|
|
2002
2042
|
*
|
|
2003
|
-
*
|
|
2043
|
+
* **Example** (Inferring element types)
|
|
2044
|
+
*
|
|
2004
2045
|
* ```ts
|
|
2005
2046
|
* import type { Chunk } from "effect"
|
|
2006
2047
|
*
|
|
@@ -2018,7 +2059,8 @@ export declare namespace Chunk {
|
|
|
2018
2059
|
/**
|
|
2019
2060
|
* Constructs a Chunk type preserving non-emptiness.
|
|
2020
2061
|
*
|
|
2021
|
-
*
|
|
2062
|
+
* **Example** (Preserving non-emptiness)
|
|
2063
|
+
*
|
|
2022
2064
|
* ```ts
|
|
2023
2065
|
* import type { Chunk } from "effect"
|
|
2024
2066
|
*
|
|
@@ -2036,7 +2078,8 @@ export declare namespace Chunk {
|
|
|
2036
2078
|
/**
|
|
2037
2079
|
* Creates a non-empty Chunk if either input is non-empty.
|
|
2038
2080
|
*
|
|
2039
|
-
*
|
|
2081
|
+
* **Example** (Preserving non-emptiness from either input)
|
|
2082
|
+
*
|
|
2040
2083
|
* ```ts
|
|
2041
2084
|
* import type { Chunk } from "effect"
|
|
2042
2085
|
*
|
|
@@ -2067,7 +2110,8 @@ export declare namespace Chunk {
|
|
|
2067
2110
|
/**
|
|
2068
2111
|
* Creates a non-empty Chunk only if both inputs are non-empty.
|
|
2069
2112
|
*
|
|
2070
|
-
*
|
|
2113
|
+
* **Example** (Requiring non-emptiness from both inputs)
|
|
2114
|
+
*
|
|
2071
2115
|
* ```ts
|
|
2072
2116
|
* import type { Chunk } from "effect"
|
|
2073
2117
|
*
|
|
@@ -2098,7 +2142,8 @@ export declare namespace Chunk {
|
|
|
2098
2142
|
/**
|
|
2099
2143
|
* Flattens a nested Chunk type.
|
|
2100
2144
|
*
|
|
2101
|
-
*
|
|
2145
|
+
* **Example** (Flattening nested chunk types)
|
|
2146
|
+
*
|
|
2102
2147
|
* ```ts
|
|
2103
2148
|
* import type { Chunk } from "effect"
|
|
2104
2149
|
*
|
|
@@ -2118,83 +2163,80 @@ export declare namespace Chunk {
|
|
|
2118
2163
|
* Transforms the elements of a chunk using the specified mapping function.
|
|
2119
2164
|
* If the input chunk is non-empty, the resulting chunk will also be non-empty.
|
|
2120
2165
|
*
|
|
2121
|
-
*
|
|
2166
|
+
* **Example** (Mapping values)
|
|
2122
2167
|
*
|
|
2123
2168
|
* ```ts
|
|
2124
2169
|
* import { Chunk } from "effect"
|
|
2125
2170
|
*
|
|
2126
2171
|
* const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
|
|
2127
2172
|
*
|
|
2128
|
-
* console.log(result)
|
|
2129
|
-
* // { _id: 'Chunk', values: [ 2, 3 ] }
|
|
2173
|
+
* console.log(Chunk.toArray(result)) // [2, 3]
|
|
2130
2174
|
* ```
|
|
2131
2175
|
*
|
|
2132
|
-
* @since 2.0.0
|
|
2133
2176
|
* @category mapping
|
|
2177
|
+
* @since 2.0.0
|
|
2134
2178
|
*/
|
|
2135
2179
|
export declare const map: {
|
|
2136
2180
|
/**
|
|
2137
2181
|
* Transforms the elements of a chunk using the specified mapping function.
|
|
2138
2182
|
* If the input chunk is non-empty, the resulting chunk will also be non-empty.
|
|
2139
2183
|
*
|
|
2140
|
-
*
|
|
2184
|
+
* **Example** (Mapping values)
|
|
2141
2185
|
*
|
|
2142
2186
|
* ```ts
|
|
2143
2187
|
* import { Chunk } from "effect"
|
|
2144
2188
|
*
|
|
2145
2189
|
* const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
|
|
2146
2190
|
*
|
|
2147
|
-
* console.log(result)
|
|
2148
|
-
* // { _id: 'Chunk', values: [ 2, 3 ] }
|
|
2191
|
+
* console.log(Chunk.toArray(result)) // [2, 3]
|
|
2149
2192
|
* ```
|
|
2150
2193
|
*
|
|
2151
|
-
* @since 2.0.0
|
|
2152
2194
|
* @category mapping
|
|
2195
|
+
* @since 2.0.0
|
|
2153
2196
|
*/
|
|
2154
2197
|
<S extends Chunk<any>, B>(f: (a: Chunk.Infer<S>, i: number) => B): (self: S) => Chunk.With<S, B>;
|
|
2155
2198
|
/**
|
|
2156
2199
|
* Transforms the elements of a chunk using the specified mapping function.
|
|
2157
2200
|
* If the input chunk is non-empty, the resulting chunk will also be non-empty.
|
|
2158
2201
|
*
|
|
2159
|
-
*
|
|
2202
|
+
* **Example** (Mapping values)
|
|
2160
2203
|
*
|
|
2161
2204
|
* ```ts
|
|
2162
2205
|
* import { Chunk } from "effect"
|
|
2163
2206
|
*
|
|
2164
2207
|
* const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
|
|
2165
2208
|
*
|
|
2166
|
-
* console.log(result)
|
|
2167
|
-
* // { _id: 'Chunk', values: [ 2, 3 ] }
|
|
2209
|
+
* console.log(Chunk.toArray(result)) // [2, 3]
|
|
2168
2210
|
* ```
|
|
2169
2211
|
*
|
|
2170
|
-
* @since 2.0.0
|
|
2171
2212
|
* @category mapping
|
|
2213
|
+
* @since 2.0.0
|
|
2172
2214
|
*/
|
|
2173
2215
|
<A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => B): NonEmptyChunk<B>;
|
|
2174
2216
|
/**
|
|
2175
2217
|
* Transforms the elements of a chunk using the specified mapping function.
|
|
2176
2218
|
* If the input chunk is non-empty, the resulting chunk will also be non-empty.
|
|
2177
2219
|
*
|
|
2178
|
-
*
|
|
2220
|
+
* **Example** (Mapping values)
|
|
2179
2221
|
*
|
|
2180
2222
|
* ```ts
|
|
2181
2223
|
* import { Chunk } from "effect"
|
|
2182
2224
|
*
|
|
2183
2225
|
* const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
|
|
2184
2226
|
*
|
|
2185
|
-
* console.log(result)
|
|
2186
|
-
* // { _id: 'Chunk', values: [ 2, 3 ] }
|
|
2227
|
+
* console.log(Chunk.toArray(result)) // [2, 3]
|
|
2187
2228
|
* ```
|
|
2188
2229
|
*
|
|
2189
|
-
* @since 2.0.0
|
|
2190
2230
|
* @category mapping
|
|
2231
|
+
* @since 2.0.0
|
|
2191
2232
|
*/
|
|
2192
2233
|
<A, B>(self: Chunk<A>, f: (a: A, i: number) => B): Chunk<B>;
|
|
2193
2234
|
};
|
|
2194
2235
|
/**
|
|
2195
2236
|
* Statefully maps over the chunk, producing new elements of type `B`.
|
|
2196
2237
|
*
|
|
2197
|
-
*
|
|
2238
|
+
* **Example** (Mapping with accumulated state)
|
|
2239
|
+
*
|
|
2198
2240
|
* ```ts
|
|
2199
2241
|
* import { Chunk } from "effect"
|
|
2200
2242
|
*
|
|
@@ -2217,14 +2259,15 @@ export declare const map: {
|
|
|
2217
2259
|
* console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
|
|
2218
2260
|
* ```
|
|
2219
2261
|
*
|
|
2220
|
-
* @since 2.0.0
|
|
2221
2262
|
* @category folding
|
|
2263
|
+
* @since 2.0.0
|
|
2222
2264
|
*/
|
|
2223
2265
|
export declare const mapAccum: {
|
|
2224
2266
|
/**
|
|
2225
2267
|
* Statefully maps over the chunk, producing new elements of type `B`.
|
|
2226
2268
|
*
|
|
2227
|
-
*
|
|
2269
|
+
* **Example** (Mapping with accumulated state)
|
|
2270
|
+
*
|
|
2228
2271
|
* ```ts
|
|
2229
2272
|
* import { Chunk } from "effect"
|
|
2230
2273
|
*
|
|
@@ -2247,14 +2290,15 @@ export declare const mapAccum: {
|
|
|
2247
2290
|
* console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
|
|
2248
2291
|
* ```
|
|
2249
2292
|
*
|
|
2250
|
-
* @since 2.0.0
|
|
2251
2293
|
* @category folding
|
|
2294
|
+
* @since 2.0.0
|
|
2252
2295
|
*/
|
|
2253
2296
|
<S, A, B>(s: S, f: (s: S, a: A) => readonly [S, B]): (self: Chunk<A>) => [S, Chunk<B>];
|
|
2254
2297
|
/**
|
|
2255
2298
|
* Statefully maps over the chunk, producing new elements of type `B`.
|
|
2256
2299
|
*
|
|
2257
|
-
*
|
|
2300
|
+
* **Example** (Mapping with accumulated state)
|
|
2301
|
+
*
|
|
2258
2302
|
* ```ts
|
|
2259
2303
|
* import { Chunk } from "effect"
|
|
2260
2304
|
*
|
|
@@ -2277,8 +2321,8 @@ export declare const mapAccum: {
|
|
|
2277
2321
|
* console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
|
|
2278
2322
|
* ```
|
|
2279
2323
|
*
|
|
2280
|
-
* @since 2.0.0
|
|
2281
2324
|
* @category folding
|
|
2325
|
+
* @since 2.0.0
|
|
2282
2326
|
*/
|
|
2283
2327
|
<S, A, B>(self: Chunk<A>, s: S, f: (s: S, a: A) => readonly [S, B]): [S, Chunk<B>];
|
|
2284
2328
|
};
|
|
@@ -2288,7 +2332,8 @@ export declare const mapAccum: {
|
|
|
2288
2332
|
* - Returns `[excluded, satisfying]`.
|
|
2289
2333
|
* - The filter receives `(element, index)`.
|
|
2290
2334
|
*
|
|
2291
|
-
*
|
|
2335
|
+
* **Example** (Partitioning with a Result)
|
|
2336
|
+
*
|
|
2292
2337
|
* ```ts
|
|
2293
2338
|
* import { Chunk, Result } from "effect"
|
|
2294
2339
|
*
|
|
@@ -2310,7 +2355,8 @@ export declare const partition: {
|
|
|
2310
2355
|
* - Returns `[excluded, satisfying]`.
|
|
2311
2356
|
* - The filter receives `(element, index)`.
|
|
2312
2357
|
*
|
|
2313
|
-
*
|
|
2358
|
+
* **Example** (Partitioning with a Result)
|
|
2359
|
+
*
|
|
2314
2360
|
* ```ts
|
|
2315
2361
|
* import { Chunk, Result } from "effect"
|
|
2316
2362
|
*
|
|
@@ -2332,7 +2378,8 @@ export declare const partition: {
|
|
|
2332
2378
|
* - Returns `[excluded, satisfying]`.
|
|
2333
2379
|
* - The filter receives `(element, index)`.
|
|
2334
2380
|
*
|
|
2335
|
-
*
|
|
2381
|
+
* **Example** (Partitioning with a Result)
|
|
2382
|
+
*
|
|
2336
2383
|
* ```ts
|
|
2337
2384
|
* import { Chunk, Result } from "effect"
|
|
2338
2385
|
*
|
|
@@ -2350,9 +2397,14 @@ export declare const partition: {
|
|
|
2350
2397
|
<A, Pass, Fail>(self: Chunk<A>, f: (input: A, i: number) => Result<Pass, Fail>): [excluded: Chunk<Fail>, satisfying: Chunk<Pass>];
|
|
2351
2398
|
};
|
|
2352
2399
|
/**
|
|
2353
|
-
*
|
|
2400
|
+
* Separates a chunk of `Result` values into a chunk of failures and a chunk of
|
|
2401
|
+
* successes.
|
|
2402
|
+
*
|
|
2403
|
+
* The returned tuple is `[failures, successes]`, preserving the original order
|
|
2404
|
+
* within each side.
|
|
2405
|
+
*
|
|
2406
|
+
* **Example** (Separating failures and successes)
|
|
2354
2407
|
*
|
|
2355
|
-
* @example
|
|
2356
2408
|
* ```ts
|
|
2357
2409
|
* import { Chunk } from "effect"
|
|
2358
2410
|
* import * as Result from "effect/Result"
|
|
@@ -2383,7 +2435,8 @@ export declare const separate: <A, B>(self: Chunk<Result<B, A>>) => [Chunk<A>, C
|
|
|
2383
2435
|
/**
|
|
2384
2436
|
* Retrieves the size of the chunk.
|
|
2385
2437
|
*
|
|
2386
|
-
*
|
|
2438
|
+
* **Example** (Getting chunk size)
|
|
2439
|
+
*
|
|
2387
2440
|
* ```ts
|
|
2388
2441
|
* import { Chunk } from "effect"
|
|
2389
2442
|
*
|
|
@@ -2398,7 +2451,8 @@ export declare const size: <A>(self: Chunk<A>) => number;
|
|
|
2398
2451
|
/**
|
|
2399
2452
|
* Sort the elements of a Chunk in increasing order, creating a new Chunk.
|
|
2400
2453
|
*
|
|
2401
|
-
*
|
|
2454
|
+
* **Example** (Sorting chunks)
|
|
2455
|
+
*
|
|
2402
2456
|
* ```ts
|
|
2403
2457
|
* import { Chunk } from "effect"
|
|
2404
2458
|
* import * as Order from "effect/Order"
|
|
@@ -2417,14 +2471,15 @@ export declare const size: <A>(self: Chunk<A>) => number;
|
|
|
2417
2471
|
* console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
|
|
2418
2472
|
* ```
|
|
2419
2473
|
*
|
|
2420
|
-
* @since 2.0.0
|
|
2421
2474
|
* @category sorting
|
|
2475
|
+
* @since 2.0.0
|
|
2422
2476
|
*/
|
|
2423
2477
|
export declare const sort: {
|
|
2424
2478
|
/**
|
|
2425
2479
|
* Sort the elements of a Chunk in increasing order, creating a new Chunk.
|
|
2426
2480
|
*
|
|
2427
|
-
*
|
|
2481
|
+
* **Example** (Sorting chunks)
|
|
2482
|
+
*
|
|
2428
2483
|
* ```ts
|
|
2429
2484
|
* import { Chunk } from "effect"
|
|
2430
2485
|
* import * as Order from "effect/Order"
|
|
@@ -2443,14 +2498,15 @@ export declare const sort: {
|
|
|
2443
2498
|
* console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
|
|
2444
2499
|
* ```
|
|
2445
2500
|
*
|
|
2446
|
-
* @since 2.0.0
|
|
2447
2501
|
* @category sorting
|
|
2502
|
+
* @since 2.0.0
|
|
2448
2503
|
*/
|
|
2449
2504
|
<B>(O: Order.Order<B>): <A extends B>(self: Chunk<A>) => Chunk<A>;
|
|
2450
2505
|
/**
|
|
2451
2506
|
* Sort the elements of a Chunk in increasing order, creating a new Chunk.
|
|
2452
2507
|
*
|
|
2453
|
-
*
|
|
2508
|
+
* **Example** (Sorting chunks)
|
|
2509
|
+
*
|
|
2454
2510
|
* ```ts
|
|
2455
2511
|
* import { Chunk } from "effect"
|
|
2456
2512
|
* import * as Order from "effect/Order"
|
|
@@ -2469,15 +2525,16 @@ export declare const sort: {
|
|
|
2469
2525
|
* console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
|
|
2470
2526
|
* ```
|
|
2471
2527
|
*
|
|
2472
|
-
* @since 2.0.0
|
|
2473
2528
|
* @category sorting
|
|
2529
|
+
* @since 2.0.0
|
|
2474
2530
|
*/
|
|
2475
2531
|
<A extends B, B>(self: Chunk<A>, O: Order.Order<B>): Chunk<A>;
|
|
2476
2532
|
};
|
|
2477
2533
|
/**
|
|
2478
2534
|
* Sorts the elements of a Chunk based on a projection function.
|
|
2479
2535
|
*
|
|
2480
|
-
*
|
|
2536
|
+
* **Example** (Sorting chunks by a derived value)
|
|
2537
|
+
*
|
|
2481
2538
|
* ```ts
|
|
2482
2539
|
* import { Chunk } from "effect"
|
|
2483
2540
|
* import * as Order from "effect/Order"
|
|
@@ -2504,14 +2561,15 @@ export declare const sort: {
|
|
|
2504
2561
|
* console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
|
|
2505
2562
|
* ```
|
|
2506
2563
|
*
|
|
2507
|
-
* @since 2.0.0
|
|
2508
2564
|
* @category sorting
|
|
2565
|
+
* @since 2.0.0
|
|
2509
2566
|
*/
|
|
2510
2567
|
export declare const sortWith: {
|
|
2511
2568
|
/**
|
|
2512
2569
|
* Sorts the elements of a Chunk based on a projection function.
|
|
2513
2570
|
*
|
|
2514
|
-
*
|
|
2571
|
+
* **Example** (Sorting chunks by a derived value)
|
|
2572
|
+
*
|
|
2515
2573
|
* ```ts
|
|
2516
2574
|
* import { Chunk } from "effect"
|
|
2517
2575
|
* import * as Order from "effect/Order"
|
|
@@ -2538,14 +2596,15 @@ export declare const sortWith: {
|
|
|
2538
2596
|
* console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
|
|
2539
2597
|
* ```
|
|
2540
2598
|
*
|
|
2541
|
-
* @since 2.0.0
|
|
2542
2599
|
* @category sorting
|
|
2600
|
+
* @since 2.0.0
|
|
2543
2601
|
*/
|
|
2544
2602
|
<A, B>(f: (a: A) => B, order: Order.Order<B>): (self: Chunk<A>) => Chunk<A>;
|
|
2545
2603
|
/**
|
|
2546
2604
|
* Sorts the elements of a Chunk based on a projection function.
|
|
2547
2605
|
*
|
|
2548
|
-
*
|
|
2606
|
+
* **Example** (Sorting chunks by a derived value)
|
|
2607
|
+
*
|
|
2549
2608
|
* ```ts
|
|
2550
2609
|
* import { Chunk } from "effect"
|
|
2551
2610
|
* import * as Order from "effect/Order"
|
|
@@ -2572,15 +2631,16 @@ export declare const sortWith: {
|
|
|
2572
2631
|
* console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
|
|
2573
2632
|
* ```
|
|
2574
2633
|
*
|
|
2575
|
-
* @since 2.0.0
|
|
2576
2634
|
* @category sorting
|
|
2635
|
+
* @since 2.0.0
|
|
2577
2636
|
*/
|
|
2578
2637
|
<A, B>(self: Chunk<A>, f: (a: A) => B, order: Order.Order<B>): Chunk<A>;
|
|
2579
2638
|
};
|
|
2580
2639
|
/**
|
|
2581
2640
|
* Returns two splits of this chunk at the specified index.
|
|
2582
2641
|
*
|
|
2583
|
-
*
|
|
2642
|
+
* **Example** (Splitting at an index)
|
|
2643
|
+
*
|
|
2584
2644
|
* ```ts
|
|
2585
2645
|
* import { Chunk } from "effect"
|
|
2586
2646
|
*
|
|
@@ -2600,14 +2660,15 @@ export declare const sortWith: {
|
|
|
2600
2660
|
* console.log(Chunk.toArray(empty2)) // []
|
|
2601
2661
|
* ```
|
|
2602
2662
|
*
|
|
2603
|
-
* @since 2.0.0
|
|
2604
2663
|
* @category splitting
|
|
2664
|
+
* @since 2.0.0
|
|
2605
2665
|
*/
|
|
2606
2666
|
export declare const splitAt: {
|
|
2607
2667
|
/**
|
|
2608
2668
|
* Returns two splits of this chunk at the specified index.
|
|
2609
2669
|
*
|
|
2610
|
-
*
|
|
2670
|
+
* **Example** (Splitting at an index)
|
|
2671
|
+
*
|
|
2611
2672
|
* ```ts
|
|
2612
2673
|
* import { Chunk } from "effect"
|
|
2613
2674
|
*
|
|
@@ -2627,14 +2688,15 @@ export declare const splitAt: {
|
|
|
2627
2688
|
* console.log(Chunk.toArray(empty2)) // []
|
|
2628
2689
|
* ```
|
|
2629
2690
|
*
|
|
2630
|
-
* @since 2.0.0
|
|
2631
2691
|
* @category splitting
|
|
2692
|
+
* @since 2.0.0
|
|
2632
2693
|
*/
|
|
2633
2694
|
(n: number): <A>(self: Chunk<A>) => [beforeIndex: Chunk<A>, fromIndex: Chunk<A>];
|
|
2634
2695
|
/**
|
|
2635
2696
|
* Returns two splits of this chunk at the specified index.
|
|
2636
2697
|
*
|
|
2637
|
-
*
|
|
2698
|
+
* **Example** (Splitting at an index)
|
|
2699
|
+
*
|
|
2638
2700
|
* ```ts
|
|
2639
2701
|
* import { Chunk } from "effect"
|
|
2640
2702
|
*
|
|
@@ -2654,16 +2716,21 @@ export declare const splitAt: {
|
|
|
2654
2716
|
* console.log(Chunk.toArray(empty2)) // []
|
|
2655
2717
|
* ```
|
|
2656
2718
|
*
|
|
2657
|
-
* @since 2.0.0
|
|
2658
2719
|
* @category splitting
|
|
2720
|
+
* @since 2.0.0
|
|
2659
2721
|
*/
|
|
2660
2722
|
<A>(self: Chunk<A>, n: number): [beforeIndex: Chunk<A>, fromIndex: Chunk<A>];
|
|
2661
2723
|
};
|
|
2662
2724
|
/**
|
|
2663
|
-
* Splits a `NonEmptyChunk`
|
|
2664
|
-
*
|
|
2725
|
+
* Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
|
|
2726
|
+
* remaining suffix.
|
|
2727
|
+
*
|
|
2728
|
+
* `n` is floored and normalized to at least `1`. If `n` is greater than or
|
|
2729
|
+
* equal to the chunk length, the first result is the original chunk and the
|
|
2730
|
+
* second result is empty.
|
|
2731
|
+
*
|
|
2732
|
+
* **Example** (Splitting non-empty chunks at an index)
|
|
2665
2733
|
*
|
|
2666
|
-
* @example
|
|
2667
2734
|
* ```ts
|
|
2668
2735
|
* import { Chunk } from "effect"
|
|
2669
2736
|
*
|
|
@@ -2686,10 +2753,15 @@ export declare const splitAt: {
|
|
|
2686
2753
|
*/
|
|
2687
2754
|
export declare const splitNonEmptyAt: {
|
|
2688
2755
|
/**
|
|
2689
|
-
* Splits a `NonEmptyChunk`
|
|
2690
|
-
*
|
|
2756
|
+
* Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
|
|
2757
|
+
* remaining suffix.
|
|
2758
|
+
*
|
|
2759
|
+
* `n` is floored and normalized to at least `1`. If `n` is greater than or
|
|
2760
|
+
* equal to the chunk length, the first result is the original chunk and the
|
|
2761
|
+
* second result is empty.
|
|
2762
|
+
*
|
|
2763
|
+
* **Example** (Splitting non-empty chunks at an index)
|
|
2691
2764
|
*
|
|
2692
|
-
* @example
|
|
2693
2765
|
* ```ts
|
|
2694
2766
|
* import { Chunk } from "effect"
|
|
2695
2767
|
*
|
|
@@ -2712,10 +2784,15 @@ export declare const splitNonEmptyAt: {
|
|
|
2712
2784
|
*/
|
|
2713
2785
|
(n: number): <A>(self: NonEmptyChunk<A>) => [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>];
|
|
2714
2786
|
/**
|
|
2715
|
-
* Splits a `NonEmptyChunk`
|
|
2716
|
-
*
|
|
2787
|
+
* Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
|
|
2788
|
+
* remaining suffix.
|
|
2789
|
+
*
|
|
2790
|
+
* `n` is floored and normalized to at least `1`. If `n` is greater than or
|
|
2791
|
+
* equal to the chunk length, the first result is the original chunk and the
|
|
2792
|
+
* second result is empty.
|
|
2793
|
+
*
|
|
2794
|
+
* **Example** (Splitting non-empty chunks at an index)
|
|
2717
2795
|
*
|
|
2718
|
-
* @example
|
|
2719
2796
|
* ```ts
|
|
2720
2797
|
* import { Chunk } from "effect"
|
|
2721
2798
|
*
|
|
@@ -2739,9 +2816,13 @@ export declare const splitNonEmptyAt: {
|
|
|
2739
2816
|
<A>(self: NonEmptyChunk<A>, n: number): [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>];
|
|
2740
2817
|
};
|
|
2741
2818
|
/**
|
|
2742
|
-
* Splits
|
|
2819
|
+
* Splits a chunk into up to `n` chunks, distributing elements in order.
|
|
2820
|
+
*
|
|
2821
|
+
* The chunk size is derived from the input length and `n`; the final chunk may
|
|
2822
|
+
* contain fewer elements than the others.
|
|
2823
|
+
*
|
|
2824
|
+
* **Example** (Splitting chunks into groups)
|
|
2743
2825
|
*
|
|
2744
|
-
* @example
|
|
2745
2826
|
* ```ts
|
|
2746
2827
|
* import { Chunk } from "effect"
|
|
2747
2828
|
*
|
|
@@ -2762,14 +2843,18 @@ export declare const splitNonEmptyAt: {
|
|
|
2762
2843
|
* // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
|
|
2763
2844
|
* ```
|
|
2764
2845
|
*
|
|
2765
|
-
* @since 2.0.0
|
|
2766
2846
|
* @category splitting
|
|
2847
|
+
* @since 2.0.0
|
|
2767
2848
|
*/
|
|
2768
2849
|
export declare const split: {
|
|
2769
2850
|
/**
|
|
2770
|
-
* Splits
|
|
2851
|
+
* Splits a chunk into up to `n` chunks, distributing elements in order.
|
|
2852
|
+
*
|
|
2853
|
+
* The chunk size is derived from the input length and `n`; the final chunk may
|
|
2854
|
+
* contain fewer elements than the others.
|
|
2855
|
+
*
|
|
2856
|
+
* **Example** (Splitting chunks into groups)
|
|
2771
2857
|
*
|
|
2772
|
-
* @example
|
|
2773
2858
|
* ```ts
|
|
2774
2859
|
* import { Chunk } from "effect"
|
|
2775
2860
|
*
|
|
@@ -2790,14 +2875,18 @@ export declare const split: {
|
|
|
2790
2875
|
* // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
|
|
2791
2876
|
* ```
|
|
2792
2877
|
*
|
|
2793
|
-
* @since 2.0.0
|
|
2794
2878
|
* @category splitting
|
|
2879
|
+
* @since 2.0.0
|
|
2795
2880
|
*/
|
|
2796
2881
|
(n: number): <A>(self: Chunk<A>) => Chunk<Chunk<A>>;
|
|
2797
2882
|
/**
|
|
2798
|
-
* Splits
|
|
2883
|
+
* Splits a chunk into up to `n` chunks, distributing elements in order.
|
|
2884
|
+
*
|
|
2885
|
+
* The chunk size is derived from the input length and `n`; the final chunk may
|
|
2886
|
+
* contain fewer elements than the others.
|
|
2887
|
+
*
|
|
2888
|
+
* **Example** (Splitting chunks into groups)
|
|
2799
2889
|
*
|
|
2800
|
-
* @example
|
|
2801
2890
|
* ```ts
|
|
2802
2891
|
* import { Chunk } from "effect"
|
|
2803
2892
|
*
|
|
@@ -2818,8 +2907,8 @@ export declare const split: {
|
|
|
2818
2907
|
* // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
|
|
2819
2908
|
* ```
|
|
2820
2909
|
*
|
|
2821
|
-
* @since 2.0.0
|
|
2822
2910
|
* @category splitting
|
|
2911
|
+
* @since 2.0.0
|
|
2823
2912
|
*/
|
|
2824
2913
|
<A>(self: Chunk<A>, n: number): Chunk<Chunk<A>>;
|
|
2825
2914
|
};
|
|
@@ -2827,7 +2916,8 @@ export declare const split: {
|
|
|
2827
2916
|
* Splits this chunk on the first element that matches this predicate.
|
|
2828
2917
|
* Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
|
|
2829
2918
|
*
|
|
2830
|
-
*
|
|
2919
|
+
* **Example** (Splitting at a matching element)
|
|
2920
|
+
*
|
|
2831
2921
|
* ```ts
|
|
2832
2922
|
* import { Chunk } from "effect"
|
|
2833
2923
|
*
|
|
@@ -2855,7 +2945,8 @@ export declare const splitWhere: {
|
|
|
2855
2945
|
* Splits this chunk on the first element that matches this predicate.
|
|
2856
2946
|
* Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
|
|
2857
2947
|
*
|
|
2858
|
-
*
|
|
2948
|
+
* **Example** (Splitting at a matching element)
|
|
2949
|
+
*
|
|
2859
2950
|
* ```ts
|
|
2860
2951
|
* import { Chunk } from "effect"
|
|
2861
2952
|
*
|
|
@@ -2883,7 +2974,8 @@ export declare const splitWhere: {
|
|
|
2883
2974
|
* Splits this chunk on the first element that matches this predicate.
|
|
2884
2975
|
* Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
|
|
2885
2976
|
*
|
|
2886
|
-
*
|
|
2977
|
+
* **Example** (Splitting at a matching element)
|
|
2978
|
+
*
|
|
2887
2979
|
* ```ts
|
|
2888
2980
|
* import { Chunk } from "effect"
|
|
2889
2981
|
*
|
|
@@ -2911,7 +3003,8 @@ export declare const splitWhere: {
|
|
|
2911
3003
|
/**
|
|
2912
3004
|
* Returns every elements after the first.
|
|
2913
3005
|
*
|
|
2914
|
-
*
|
|
3006
|
+
* **Example** (Getting the tail safely)
|
|
3007
|
+
*
|
|
2915
3008
|
* ```ts
|
|
2916
3009
|
* import { Chunk } from "effect"
|
|
2917
3010
|
*
|
|
@@ -2925,14 +3018,15 @@ export declare const splitWhere: {
|
|
|
2925
3018
|
* console.log(Chunk.tail(empty)) // Option.none()
|
|
2926
3019
|
* ```
|
|
2927
3020
|
*
|
|
2928
|
-
* @since 2.0.0
|
|
2929
3021
|
* @category elements
|
|
3022
|
+
* @since 2.0.0
|
|
2930
3023
|
*/
|
|
2931
3024
|
export declare const tail: <A>(self: Chunk<A>) => O.Option<Chunk<A>>;
|
|
2932
3025
|
/**
|
|
2933
3026
|
* Returns every elements after the first.
|
|
2934
3027
|
*
|
|
2935
|
-
*
|
|
3028
|
+
* **Example** (Getting the tail of a non-empty chunk)
|
|
3029
|
+
*
|
|
2936
3030
|
* ```ts
|
|
2937
3031
|
* import { Chunk } from "effect"
|
|
2938
3032
|
*
|
|
@@ -2948,14 +3042,15 @@ export declare const tail: <A>(self: Chunk<A>) => O.Option<Chunk<A>>;
|
|
|
2948
3042
|
* // Chunk.tailNonEmpty(Chunk.empty()) // TypeScript error
|
|
2949
3043
|
* ```
|
|
2950
3044
|
*
|
|
2951
|
-
* @since 2.0.0
|
|
2952
3045
|
* @category elements
|
|
3046
|
+
* @since 2.0.0
|
|
2953
3047
|
*/
|
|
2954
3048
|
export declare const tailNonEmpty: <A>(self: NonEmptyChunk<A>) => Chunk<A>;
|
|
2955
3049
|
/**
|
|
2956
3050
|
* Takes the last `n` elements.
|
|
2957
3051
|
*
|
|
2958
|
-
*
|
|
3052
|
+
* **Example** (Taking elements from the end)
|
|
3053
|
+
*
|
|
2959
3054
|
* ```ts
|
|
2960
3055
|
* import { Chunk } from "effect"
|
|
2961
3056
|
*
|
|
@@ -2972,14 +3067,15 @@ export declare const tailNonEmpty: <A>(self: NonEmptyChunk<A>) => Chunk<A>;
|
|
|
2972
3067
|
* console.log(Chunk.toArray(none)) // []
|
|
2973
3068
|
* ```
|
|
2974
3069
|
*
|
|
2975
|
-
* @since 2.0.0
|
|
2976
3070
|
* @category elements
|
|
3071
|
+
* @since 2.0.0
|
|
2977
3072
|
*/
|
|
2978
3073
|
export declare const takeRight: {
|
|
2979
3074
|
/**
|
|
2980
3075
|
* Takes the last `n` elements.
|
|
2981
3076
|
*
|
|
2982
|
-
*
|
|
3077
|
+
* **Example** (Taking elements from the end)
|
|
3078
|
+
*
|
|
2983
3079
|
* ```ts
|
|
2984
3080
|
* import { Chunk } from "effect"
|
|
2985
3081
|
*
|
|
@@ -2996,14 +3092,15 @@ export declare const takeRight: {
|
|
|
2996
3092
|
* console.log(Chunk.toArray(none)) // []
|
|
2997
3093
|
* ```
|
|
2998
3094
|
*
|
|
2999
|
-
* @since 2.0.0
|
|
3000
3095
|
* @category elements
|
|
3096
|
+
* @since 2.0.0
|
|
3001
3097
|
*/
|
|
3002
3098
|
(n: number): <A>(self: Chunk<A>) => Chunk<A>;
|
|
3003
3099
|
/**
|
|
3004
3100
|
* Takes the last `n` elements.
|
|
3005
3101
|
*
|
|
3006
|
-
*
|
|
3102
|
+
* **Example** (Taking elements from the end)
|
|
3103
|
+
*
|
|
3007
3104
|
* ```ts
|
|
3008
3105
|
* import { Chunk } from "effect"
|
|
3009
3106
|
*
|
|
@@ -3020,15 +3117,16 @@ export declare const takeRight: {
|
|
|
3020
3117
|
* console.log(Chunk.toArray(none)) // []
|
|
3021
3118
|
* ```
|
|
3022
3119
|
*
|
|
3023
|
-
* @since 2.0.0
|
|
3024
3120
|
* @category elements
|
|
3121
|
+
* @since 2.0.0
|
|
3025
3122
|
*/
|
|
3026
3123
|
<A>(self: Chunk<A>, n: number): Chunk<A>;
|
|
3027
3124
|
};
|
|
3028
3125
|
/**
|
|
3029
3126
|
* Takes all elements so long as the predicate returns true.
|
|
3030
3127
|
*
|
|
3031
|
-
*
|
|
3128
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3129
|
+
*
|
|
3032
3130
|
* ```ts
|
|
3033
3131
|
* import { Chunk } from "effect"
|
|
3034
3132
|
*
|
|
@@ -3046,14 +3144,15 @@ export declare const takeRight: {
|
|
|
3046
3144
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3047
3145
|
* ```
|
|
3048
3146
|
*
|
|
3049
|
-
* @since 2.0.0
|
|
3050
3147
|
* @category elements
|
|
3148
|
+
* @since 2.0.0
|
|
3051
3149
|
*/
|
|
3052
3150
|
export declare const takeWhile: {
|
|
3053
3151
|
/**
|
|
3054
3152
|
* Takes all elements so long as the predicate returns true.
|
|
3055
3153
|
*
|
|
3056
|
-
*
|
|
3154
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3155
|
+
*
|
|
3057
3156
|
* ```ts
|
|
3058
3157
|
* import { Chunk } from "effect"
|
|
3059
3158
|
*
|
|
@@ -3071,14 +3170,15 @@ export declare const takeWhile: {
|
|
|
3071
3170
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3072
3171
|
* ```
|
|
3073
3172
|
*
|
|
3074
|
-
* @since 2.0.0
|
|
3075
3173
|
* @category elements
|
|
3174
|
+
* @since 2.0.0
|
|
3076
3175
|
*/
|
|
3077
3176
|
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Chunk<B>;
|
|
3078
3177
|
/**
|
|
3079
3178
|
* Takes all elements so long as the predicate returns true.
|
|
3080
3179
|
*
|
|
3081
|
-
*
|
|
3180
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3181
|
+
*
|
|
3082
3182
|
* ```ts
|
|
3083
3183
|
* import { Chunk } from "effect"
|
|
3084
3184
|
*
|
|
@@ -3096,14 +3196,15 @@ export declare const takeWhile: {
|
|
|
3096
3196
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3097
3197
|
* ```
|
|
3098
3198
|
*
|
|
3099
|
-
* @since 2.0.0
|
|
3100
3199
|
* @category elements
|
|
3200
|
+
* @since 2.0.0
|
|
3101
3201
|
*/
|
|
3102
3202
|
<A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Chunk<A>;
|
|
3103
3203
|
/**
|
|
3104
3204
|
* Takes all elements so long as the predicate returns true.
|
|
3105
3205
|
*
|
|
3106
|
-
*
|
|
3206
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3207
|
+
*
|
|
3107
3208
|
* ```ts
|
|
3108
3209
|
* import { Chunk } from "effect"
|
|
3109
3210
|
*
|
|
@@ -3121,14 +3222,15 @@ export declare const takeWhile: {
|
|
|
3121
3222
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3122
3223
|
* ```
|
|
3123
3224
|
*
|
|
3124
|
-
* @since 2.0.0
|
|
3125
3225
|
* @category elements
|
|
3226
|
+
* @since 2.0.0
|
|
3126
3227
|
*/
|
|
3127
3228
|
<A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Chunk<B>;
|
|
3128
3229
|
/**
|
|
3129
3230
|
* Takes all elements so long as the predicate returns true.
|
|
3130
3231
|
*
|
|
3131
|
-
*
|
|
3232
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3233
|
+
*
|
|
3132
3234
|
* ```ts
|
|
3133
3235
|
* import { Chunk } from "effect"
|
|
3134
3236
|
*
|
|
@@ -3146,15 +3248,16 @@ export declare const takeWhile: {
|
|
|
3146
3248
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3147
3249
|
* ```
|
|
3148
3250
|
*
|
|
3149
|
-
* @since 2.0.0
|
|
3150
3251
|
* @category elements
|
|
3252
|
+
* @since 2.0.0
|
|
3151
3253
|
*/
|
|
3152
3254
|
<A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A>;
|
|
3153
3255
|
};
|
|
3154
3256
|
/**
|
|
3155
3257
|
* Creates a Chunks of unique values, in order, from all given Chunks.
|
|
3156
3258
|
*
|
|
3157
|
-
*
|
|
3259
|
+
* **Example** (Unioning chunks)
|
|
3260
|
+
*
|
|
3158
3261
|
* ```ts
|
|
3159
3262
|
* import { Chunk } from "effect"
|
|
3160
3263
|
*
|
|
@@ -3170,14 +3273,15 @@ export declare const takeWhile: {
|
|
|
3170
3273
|
* console.log(Chunk.toArray(unified)) // [1, 2, 3]
|
|
3171
3274
|
* ```
|
|
3172
3275
|
*
|
|
3173
|
-
* @since 2.0.0
|
|
3174
3276
|
* @category elements
|
|
3277
|
+
* @since 2.0.0
|
|
3175
3278
|
*/
|
|
3176
3279
|
export declare const union: {
|
|
3177
3280
|
/**
|
|
3178
3281
|
* Creates a Chunks of unique values, in order, from all given Chunks.
|
|
3179
3282
|
*
|
|
3180
|
-
*
|
|
3283
|
+
* **Example** (Unioning chunks)
|
|
3284
|
+
*
|
|
3181
3285
|
* ```ts
|
|
3182
3286
|
* import { Chunk } from "effect"
|
|
3183
3287
|
*
|
|
@@ -3193,14 +3297,15 @@ export declare const union: {
|
|
|
3193
3297
|
* console.log(Chunk.toArray(unified)) // [1, 2, 3]
|
|
3194
3298
|
* ```
|
|
3195
3299
|
*
|
|
3196
|
-
* @since 2.0.0
|
|
3197
3300
|
* @category elements
|
|
3301
|
+
* @since 2.0.0
|
|
3198
3302
|
*/
|
|
3199
3303
|
<A>(that: Chunk<A>): <B>(self: Chunk<B>) => Chunk<A | B>;
|
|
3200
3304
|
/**
|
|
3201
3305
|
* Creates a Chunks of unique values, in order, from all given Chunks.
|
|
3202
3306
|
*
|
|
3203
|
-
*
|
|
3307
|
+
* **Example** (Unioning chunks)
|
|
3308
|
+
*
|
|
3204
3309
|
* ```ts
|
|
3205
3310
|
* import { Chunk } from "effect"
|
|
3206
3311
|
*
|
|
@@ -3216,15 +3321,17 @@ export declare const union: {
|
|
|
3216
3321
|
* console.log(Chunk.toArray(unified)) // [1, 2, 3]
|
|
3217
3322
|
* ```
|
|
3218
3323
|
*
|
|
3219
|
-
* @since 2.0.0
|
|
3220
3324
|
* @category elements
|
|
3325
|
+
* @since 2.0.0
|
|
3221
3326
|
*/
|
|
3222
3327
|
<A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<A | B>;
|
|
3223
3328
|
};
|
|
3224
3329
|
/**
|
|
3225
|
-
*
|
|
3330
|
+
* Removes duplicate elements from a `Chunk`, preserving the first occurrence
|
|
3331
|
+
* of each value.
|
|
3332
|
+
*
|
|
3333
|
+
* **Example** (Removing duplicate values)
|
|
3226
3334
|
*
|
|
3227
|
-
* @example
|
|
3228
3335
|
* ```ts
|
|
3229
3336
|
* import { Chunk } from "effect"
|
|
3230
3337
|
*
|
|
@@ -3243,14 +3350,15 @@ export declare const union: {
|
|
|
3243
3350
|
* console.log(Chunk.toArray(uniqueDeduped)) // [1, 2, 3]
|
|
3244
3351
|
* ```
|
|
3245
3352
|
*
|
|
3246
|
-
* @since 2.0.0
|
|
3247
3353
|
* @category elements
|
|
3354
|
+
* @since 2.0.0
|
|
3248
3355
|
*/
|
|
3249
3356
|
export declare const dedupe: <A>(self: Chunk<A>) => Chunk<A>;
|
|
3250
3357
|
/**
|
|
3251
3358
|
* Deduplicates adjacent elements that are identical.
|
|
3252
3359
|
*
|
|
3253
|
-
*
|
|
3360
|
+
* **Example** (Removing adjacent duplicates)
|
|
3361
|
+
*
|
|
3254
3362
|
* ```ts
|
|
3255
3363
|
* import { Chunk } from "effect"
|
|
3256
3364
|
*
|
|
@@ -3264,8 +3372,8 @@ export declare const dedupe: <A>(self: Chunk<A>) => Chunk<A>;
|
|
|
3264
3372
|
* console.log(Chunk.toArray(mixedResult)) // ["a", "b", "a"]
|
|
3265
3373
|
* ```
|
|
3266
3374
|
*
|
|
3267
|
-
* @since 2.0.0
|
|
3268
3375
|
* @category filtering
|
|
3376
|
+
* @since 2.0.0
|
|
3269
3377
|
*/
|
|
3270
3378
|
export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
|
|
3271
3379
|
/**
|
|
@@ -3273,7 +3381,8 @@ export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
|
|
|
3273
3381
|
*
|
|
3274
3382
|
* Note: The function is reverse of `zip`.
|
|
3275
3383
|
*
|
|
3276
|
-
*
|
|
3384
|
+
* **Example** (Unzipping pairs)
|
|
3385
|
+
*
|
|
3277
3386
|
* ```ts
|
|
3278
3387
|
* import { Chunk } from "effect"
|
|
3279
3388
|
*
|
|
@@ -3293,14 +3402,15 @@ export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
|
|
|
3293
3402
|
* console.log(Chunk.toArray(emptyStrs)) // []
|
|
3294
3403
|
* ```
|
|
3295
3404
|
*
|
|
3296
|
-
* @since 2.0.0
|
|
3297
3405
|
* @category elements
|
|
3406
|
+
* @since 2.0.0
|
|
3298
3407
|
*/
|
|
3299
3408
|
export declare const unzip: <A, B>(self: Chunk<readonly [A, B]>) => [Chunk<A>, Chunk<B>];
|
|
3300
3409
|
/**
|
|
3301
3410
|
* Zips this chunk pointwise with the specified chunk using the specified combiner.
|
|
3302
3411
|
*
|
|
3303
|
-
*
|
|
3412
|
+
* **Example** (Zipping chunks with a function)
|
|
3413
|
+
*
|
|
3304
3414
|
* ```ts
|
|
3305
3415
|
* import { Chunk } from "effect"
|
|
3306
3416
|
*
|
|
@@ -3316,14 +3426,15 @@ export declare const unzip: <A, B>(self: Chunk<readonly [A, B]>) => [Chunk<A>, C
|
|
|
3316
3426
|
* console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
|
|
3317
3427
|
* ```
|
|
3318
3428
|
*
|
|
3319
|
-
* @since 2.0.0
|
|
3320
3429
|
* @category zipping
|
|
3430
|
+
* @since 2.0.0
|
|
3321
3431
|
*/
|
|
3322
3432
|
export declare const zipWith: {
|
|
3323
3433
|
/**
|
|
3324
3434
|
* Zips this chunk pointwise with the specified chunk using the specified combiner.
|
|
3325
3435
|
*
|
|
3326
|
-
*
|
|
3436
|
+
* **Example** (Zipping chunks with a function)
|
|
3437
|
+
*
|
|
3327
3438
|
* ```ts
|
|
3328
3439
|
* import { Chunk } from "effect"
|
|
3329
3440
|
*
|
|
@@ -3339,14 +3450,15 @@ export declare const zipWith: {
|
|
|
3339
3450
|
* console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
|
|
3340
3451
|
* ```
|
|
3341
3452
|
*
|
|
3342
|
-
* @since 2.0.0
|
|
3343
3453
|
* @category zipping
|
|
3454
|
+
* @since 2.0.0
|
|
3344
3455
|
*/
|
|
3345
3456
|
<A, B, C>(that: Chunk<B>, f: (a: A, b: B) => C): (self: Chunk<A>) => Chunk<C>;
|
|
3346
3457
|
/**
|
|
3347
3458
|
* Zips this chunk pointwise with the specified chunk using the specified combiner.
|
|
3348
3459
|
*
|
|
3349
|
-
*
|
|
3460
|
+
* **Example** (Zipping chunks with a function)
|
|
3461
|
+
*
|
|
3350
3462
|
* ```ts
|
|
3351
3463
|
* import { Chunk } from "effect"
|
|
3352
3464
|
*
|
|
@@ -3362,15 +3474,16 @@ export declare const zipWith: {
|
|
|
3362
3474
|
* console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
|
|
3363
3475
|
* ```
|
|
3364
3476
|
*
|
|
3365
|
-
* @since 2.0.0
|
|
3366
3477
|
* @category zipping
|
|
3478
|
+
* @since 2.0.0
|
|
3367
3479
|
*/
|
|
3368
3480
|
<A, B, C>(self: Chunk<A>, that: Chunk<B>, f: (a: A, b: B) => C): Chunk<C>;
|
|
3369
3481
|
};
|
|
3370
3482
|
/**
|
|
3371
3483
|
* Zips this chunk pointwise with the specified chunk.
|
|
3372
3484
|
*
|
|
3373
|
-
*
|
|
3485
|
+
* **Example** (Zipping chunks)
|
|
3486
|
+
*
|
|
3374
3487
|
* ```ts
|
|
3375
3488
|
* import { Chunk } from "effect"
|
|
3376
3489
|
*
|
|
@@ -3386,14 +3499,15 @@ export declare const zipWith: {
|
|
|
3386
3499
|
* console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
|
|
3387
3500
|
* ```
|
|
3388
3501
|
*
|
|
3389
|
-
* @since 2.0.0
|
|
3390
3502
|
* @category zipping
|
|
3503
|
+
* @since 2.0.0
|
|
3391
3504
|
*/
|
|
3392
3505
|
export declare const zip: {
|
|
3393
3506
|
/**
|
|
3394
3507
|
* Zips this chunk pointwise with the specified chunk.
|
|
3395
3508
|
*
|
|
3396
|
-
*
|
|
3509
|
+
* **Example** (Zipping chunks)
|
|
3510
|
+
*
|
|
3397
3511
|
* ```ts
|
|
3398
3512
|
* import { Chunk } from "effect"
|
|
3399
3513
|
*
|
|
@@ -3409,14 +3523,15 @@ export declare const zip: {
|
|
|
3409
3523
|
* console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
|
|
3410
3524
|
* ```
|
|
3411
3525
|
*
|
|
3412
|
-
* @since 2.0.0
|
|
3413
3526
|
* @category zipping
|
|
3527
|
+
* @since 2.0.0
|
|
3414
3528
|
*/
|
|
3415
3529
|
<B>(that: Chunk<B>): <A>(self: Chunk<A>) => Chunk<[A, B]>;
|
|
3416
3530
|
/**
|
|
3417
3531
|
* Zips this chunk pointwise with the specified chunk.
|
|
3418
3532
|
*
|
|
3419
|
-
*
|
|
3533
|
+
* **Example** (Zipping chunks)
|
|
3534
|
+
*
|
|
3420
3535
|
* ```ts
|
|
3421
3536
|
* import { Chunk } from "effect"
|
|
3422
3537
|
*
|
|
@@ -3432,15 +3547,16 @@ export declare const zip: {
|
|
|
3432
3547
|
* console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
|
|
3433
3548
|
* ```
|
|
3434
3549
|
*
|
|
3435
|
-
* @since 2.0.0
|
|
3436
3550
|
* @category zipping
|
|
3551
|
+
* @since 2.0.0
|
|
3437
3552
|
*/
|
|
3438
3553
|
<A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<[A, B]>;
|
|
3439
3554
|
};
|
|
3440
3555
|
/**
|
|
3441
3556
|
* Delete the element at the specified index, creating a new `Chunk`.
|
|
3442
3557
|
*
|
|
3443
|
-
*
|
|
3558
|
+
* **Example** (Removing an element)
|
|
3559
|
+
*
|
|
3444
3560
|
* ```ts
|
|
3445
3561
|
* import { Chunk } from "effect"
|
|
3446
3562
|
*
|
|
@@ -3464,7 +3580,8 @@ export declare const remove: {
|
|
|
3464
3580
|
/**
|
|
3465
3581
|
* Delete the element at the specified index, creating a new `Chunk`.
|
|
3466
3582
|
*
|
|
3467
|
-
*
|
|
3583
|
+
* **Example** (Removing an element)
|
|
3584
|
+
*
|
|
3468
3585
|
* ```ts
|
|
3469
3586
|
* import { Chunk } from "effect"
|
|
3470
3587
|
*
|
|
@@ -3488,7 +3605,8 @@ export declare const remove: {
|
|
|
3488
3605
|
/**
|
|
3489
3606
|
* Delete the element at the specified index, creating a new `Chunk`.
|
|
3490
3607
|
*
|
|
3491
|
-
*
|
|
3608
|
+
* **Example** (Removing an element)
|
|
3609
|
+
*
|
|
3492
3610
|
* ```ts
|
|
3493
3611
|
* import { Chunk } from "effect"
|
|
3494
3612
|
*
|
|
@@ -3514,7 +3632,8 @@ export declare const remove: {
|
|
|
3514
3632
|
* Applies a function to the element at the specified index, creating a new `Chunk`,
|
|
3515
3633
|
* or returns `None` if the index is out of bounds.
|
|
3516
3634
|
*
|
|
3517
|
-
*
|
|
3635
|
+
* **Example** (Modifying an element)
|
|
3636
|
+
*
|
|
3518
3637
|
* ```ts
|
|
3519
3638
|
* import { Chunk } from "effect"
|
|
3520
3639
|
*
|
|
@@ -3539,7 +3658,8 @@ export declare const modify: {
|
|
|
3539
3658
|
* Applies a function to the element at the specified index, creating a new `Chunk`,
|
|
3540
3659
|
* or returns `None` if the index is out of bounds.
|
|
3541
3660
|
*
|
|
3542
|
-
*
|
|
3661
|
+
* **Example** (Modifying an element)
|
|
3662
|
+
*
|
|
3543
3663
|
* ```ts
|
|
3544
3664
|
* import { Chunk } from "effect"
|
|
3545
3665
|
*
|
|
@@ -3564,7 +3684,8 @@ export declare const modify: {
|
|
|
3564
3684
|
* Applies a function to the element at the specified index, creating a new `Chunk`,
|
|
3565
3685
|
* or returns `None` if the index is out of bounds.
|
|
3566
3686
|
*
|
|
3567
|
-
*
|
|
3687
|
+
* **Example** (Modifying an element)
|
|
3688
|
+
*
|
|
3568
3689
|
* ```ts
|
|
3569
3690
|
* import { Chunk } from "effect"
|
|
3570
3691
|
*
|
|
@@ -3590,7 +3711,8 @@ export declare const modify: {
|
|
|
3590
3711
|
* Change the element at the specified index, creating a new `Chunk`,
|
|
3591
3712
|
* or returns `None` if the index is out of bounds.
|
|
3592
3713
|
*
|
|
3593
|
-
*
|
|
3714
|
+
* **Example** (Replacing an element)
|
|
3715
|
+
*
|
|
3594
3716
|
* ```ts
|
|
3595
3717
|
* import { Chunk } from "effect"
|
|
3596
3718
|
*
|
|
@@ -3615,7 +3737,8 @@ export declare const replace: {
|
|
|
3615
3737
|
* Change the element at the specified index, creating a new `Chunk`,
|
|
3616
3738
|
* or returns `None` if the index is out of bounds.
|
|
3617
3739
|
*
|
|
3618
|
-
*
|
|
3740
|
+
* **Example** (Replacing an element)
|
|
3741
|
+
*
|
|
3619
3742
|
* ```ts
|
|
3620
3743
|
* import { Chunk } from "effect"
|
|
3621
3744
|
*
|
|
@@ -3640,7 +3763,8 @@ export declare const replace: {
|
|
|
3640
3763
|
* Change the element at the specified index, creating a new `Chunk`,
|
|
3641
3764
|
* or returns `None` if the index is out of bounds.
|
|
3642
3765
|
*
|
|
3643
|
-
*
|
|
3766
|
+
* **Example** (Replacing an element)
|
|
3767
|
+
*
|
|
3644
3768
|
* ```ts
|
|
3645
3769
|
* import { Chunk } from "effect"
|
|
3646
3770
|
*
|
|
@@ -3667,13 +3791,13 @@ export declare const replace: {
|
|
|
3667
3791
|
*
|
|
3668
3792
|
* **Note**. `n` is normalized to an integer >= 1.
|
|
3669
3793
|
*
|
|
3670
|
-
*
|
|
3794
|
+
* **Example** (Generating chunks from indices)
|
|
3795
|
+
*
|
|
3671
3796
|
* ```ts
|
|
3672
3797
|
* import { Chunk } from "effect"
|
|
3673
3798
|
*
|
|
3674
3799
|
* const chunk = Chunk.makeBy(5, (i) => i * 2)
|
|
3675
|
-
* console.log(chunk)
|
|
3676
|
-
* // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
|
|
3800
|
+
* console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
|
|
3677
3801
|
* ```
|
|
3678
3802
|
*
|
|
3679
3803
|
* @category constructors
|
|
@@ -3685,13 +3809,13 @@ export declare const makeBy: {
|
|
|
3685
3809
|
*
|
|
3686
3810
|
* **Note**. `n` is normalized to an integer >= 1.
|
|
3687
3811
|
*
|
|
3688
|
-
*
|
|
3812
|
+
* **Example** (Generating chunks from indices)
|
|
3813
|
+
*
|
|
3689
3814
|
* ```ts
|
|
3690
3815
|
* import { Chunk } from "effect"
|
|
3691
3816
|
*
|
|
3692
3817
|
* const chunk = Chunk.makeBy(5, (i) => i * 2)
|
|
3693
|
-
* console.log(chunk)
|
|
3694
|
-
* // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
|
|
3818
|
+
* console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
|
|
3695
3819
|
* ```
|
|
3696
3820
|
*
|
|
3697
3821
|
* @category constructors
|
|
@@ -3703,13 +3827,13 @@ export declare const makeBy: {
|
|
|
3703
3827
|
*
|
|
3704
3828
|
* **Note**. `n` is normalized to an integer >= 1.
|
|
3705
3829
|
*
|
|
3706
|
-
*
|
|
3830
|
+
* **Example** (Generating chunks from indices)
|
|
3831
|
+
*
|
|
3707
3832
|
* ```ts
|
|
3708
3833
|
* import { Chunk } from "effect"
|
|
3709
3834
|
*
|
|
3710
3835
|
* const chunk = Chunk.makeBy(5, (i) => i * 2)
|
|
3711
|
-
* console.log(chunk)
|
|
3712
|
-
* // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
|
|
3836
|
+
* console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
|
|
3713
3837
|
* ```
|
|
3714
3838
|
*
|
|
3715
3839
|
* @category constructors
|
|
@@ -3718,15 +3842,19 @@ export declare const makeBy: {
|
|
|
3718
3842
|
<A>(n: number, f: (i: number) => A): NonEmptyChunk<A>;
|
|
3719
3843
|
};
|
|
3720
3844
|
/**
|
|
3721
|
-
*
|
|
3845
|
+
* Creates a non-empty `Chunk` of consecutive integers from `start` through
|
|
3846
|
+
* `end`, inclusive.
|
|
3847
|
+
*
|
|
3848
|
+
* If `start` is greater than `end`, returns a single-element chunk containing
|
|
3849
|
+
* `start`.
|
|
3850
|
+
*
|
|
3851
|
+
* **Example** (Creating a range)
|
|
3722
3852
|
*
|
|
3723
|
-
* @example
|
|
3724
3853
|
* ```ts
|
|
3725
3854
|
* import { Chunk } from "effect"
|
|
3726
3855
|
*
|
|
3727
3856
|
* const chunk = Chunk.range(1, 5)
|
|
3728
|
-
* console.log(chunk)
|
|
3729
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
|
|
3857
|
+
* console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4, 5]
|
|
3730
3858
|
* ```
|
|
3731
3859
|
*
|
|
3732
3860
|
* @category constructors
|
|
@@ -3736,7 +3864,8 @@ export declare const range: (start: number, end: number) => NonEmptyChunk<number
|
|
|
3736
3864
|
/**
|
|
3737
3865
|
* Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
|
|
3738
3866
|
*
|
|
3739
|
-
*
|
|
3867
|
+
* **Example** (Checking membership)
|
|
3868
|
+
*
|
|
3740
3869
|
* ```ts
|
|
3741
3870
|
* import { Chunk } from "effect"
|
|
3742
3871
|
*
|
|
@@ -3761,7 +3890,8 @@ export declare const contains: {
|
|
|
3761
3890
|
/**
|
|
3762
3891
|
* Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
|
|
3763
3892
|
*
|
|
3764
|
-
*
|
|
3893
|
+
* **Example** (Checking membership)
|
|
3894
|
+
*
|
|
3765
3895
|
* ```ts
|
|
3766
3896
|
* import { Chunk } from "effect"
|
|
3767
3897
|
*
|
|
@@ -3786,7 +3916,8 @@ export declare const contains: {
|
|
|
3786
3916
|
/**
|
|
3787
3917
|
* Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
|
|
3788
3918
|
*
|
|
3789
|
-
*
|
|
3919
|
+
* **Example** (Checking membership)
|
|
3920
|
+
*
|
|
3790
3921
|
* ```ts
|
|
3791
3922
|
* import { Chunk } from "effect"
|
|
3792
3923
|
*
|
|
@@ -3812,7 +3943,8 @@ export declare const contains: {
|
|
|
3812
3943
|
/**
|
|
3813
3944
|
* Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function.
|
|
3814
3945
|
*
|
|
3815
|
-
*
|
|
3946
|
+
* **Example** (Checking membership with custom equivalence)
|
|
3947
|
+
*
|
|
3816
3948
|
* ```ts
|
|
3817
3949
|
* import { Chunk } from "effect"
|
|
3818
3950
|
*
|
|
@@ -3845,7 +3977,8 @@ export declare const containsWith: <A>(isEquivalent: (self: A, that: A) => boole
|
|
|
3845
3977
|
* Returns the first element that satisfies the specified
|
|
3846
3978
|
* predicate, or `None` if no such element exists.
|
|
3847
3979
|
*
|
|
3848
|
-
*
|
|
3980
|
+
* **Example** (Finding the first matching element)
|
|
3981
|
+
*
|
|
3849
3982
|
* ```ts
|
|
3850
3983
|
* import { Chunk, Option } from "effect"
|
|
3851
3984
|
*
|
|
@@ -3875,7 +4008,8 @@ export declare const findFirst: {
|
|
|
3875
4008
|
* Returns the first element that satisfies the specified
|
|
3876
4009
|
* predicate, or `None` if no such element exists.
|
|
3877
4010
|
*
|
|
3878
|
-
*
|
|
4011
|
+
* **Example** (Finding the first matching element)
|
|
4012
|
+
*
|
|
3879
4013
|
* ```ts
|
|
3880
4014
|
* import { Chunk, Option } from "effect"
|
|
3881
4015
|
*
|
|
@@ -3905,7 +4039,8 @@ export declare const findFirst: {
|
|
|
3905
4039
|
* Returns the first element that satisfies the specified
|
|
3906
4040
|
* predicate, or `None` if no such element exists.
|
|
3907
4041
|
*
|
|
3908
|
-
*
|
|
4042
|
+
* **Example** (Finding the first matching element)
|
|
4043
|
+
*
|
|
3909
4044
|
* ```ts
|
|
3910
4045
|
* import { Chunk, Option } from "effect"
|
|
3911
4046
|
*
|
|
@@ -3935,7 +4070,8 @@ export declare const findFirst: {
|
|
|
3935
4070
|
* Returns the first element that satisfies the specified
|
|
3936
4071
|
* predicate, or `None` if no such element exists.
|
|
3937
4072
|
*
|
|
3938
|
-
*
|
|
4073
|
+
* **Example** (Finding the first matching element)
|
|
4074
|
+
*
|
|
3939
4075
|
* ```ts
|
|
3940
4076
|
* import { Chunk, Option } from "effect"
|
|
3941
4077
|
*
|
|
@@ -3965,7 +4101,8 @@ export declare const findFirst: {
|
|
|
3965
4101
|
* Returns the first element that satisfies the specified
|
|
3966
4102
|
* predicate, or `None` if no such element exists.
|
|
3967
4103
|
*
|
|
3968
|
-
*
|
|
4104
|
+
* **Example** (Finding the first matching element)
|
|
4105
|
+
*
|
|
3969
4106
|
* ```ts
|
|
3970
4107
|
* import { Chunk, Option } from "effect"
|
|
3971
4108
|
*
|
|
@@ -3995,7 +4132,8 @@ export declare const findFirst: {
|
|
|
3995
4132
|
/**
|
|
3996
4133
|
* Return the first index for which a predicate holds.
|
|
3997
4134
|
*
|
|
3998
|
-
*
|
|
4135
|
+
* **Example** (Finding the first matching index)
|
|
4136
|
+
*
|
|
3999
4137
|
* ```ts
|
|
4000
4138
|
* import { Chunk } from "effect"
|
|
4001
4139
|
*
|
|
@@ -4019,7 +4157,8 @@ export declare const findFirstIndex: {
|
|
|
4019
4157
|
/**
|
|
4020
4158
|
* Return the first index for which a predicate holds.
|
|
4021
4159
|
*
|
|
4022
|
-
*
|
|
4160
|
+
* **Example** (Finding the first matching index)
|
|
4161
|
+
*
|
|
4023
4162
|
* ```ts
|
|
4024
4163
|
* import { Chunk } from "effect"
|
|
4025
4164
|
*
|
|
@@ -4043,7 +4182,8 @@ export declare const findFirstIndex: {
|
|
|
4043
4182
|
/**
|
|
4044
4183
|
* Return the first index for which a predicate holds.
|
|
4045
4184
|
*
|
|
4046
|
-
*
|
|
4185
|
+
* **Example** (Finding the first matching index)
|
|
4186
|
+
*
|
|
4047
4187
|
* ```ts
|
|
4048
4188
|
* import { Chunk } from "effect"
|
|
4049
4189
|
*
|
|
@@ -4068,7 +4208,8 @@ export declare const findFirstIndex: {
|
|
|
4068
4208
|
/**
|
|
4069
4209
|
* Find the last element for which a predicate holds.
|
|
4070
4210
|
*
|
|
4071
|
-
*
|
|
4211
|
+
* **Example** (Finding the last matching element)
|
|
4212
|
+
*
|
|
4072
4213
|
* ```ts
|
|
4073
4214
|
* import { Chunk } from "effect"
|
|
4074
4215
|
* import * as Option from "effect/Option"
|
|
@@ -4094,7 +4235,8 @@ export declare const findLast: {
|
|
|
4094
4235
|
/**
|
|
4095
4236
|
* Find the last element for which a predicate holds.
|
|
4096
4237
|
*
|
|
4097
|
-
*
|
|
4238
|
+
* **Example** (Finding the last matching element)
|
|
4239
|
+
*
|
|
4098
4240
|
* ```ts
|
|
4099
4241
|
* import { Chunk } from "effect"
|
|
4100
4242
|
* import * as Option from "effect/Option"
|
|
@@ -4120,7 +4262,8 @@ export declare const findLast: {
|
|
|
4120
4262
|
/**
|
|
4121
4263
|
* Find the last element for which a predicate holds.
|
|
4122
4264
|
*
|
|
4123
|
-
*
|
|
4265
|
+
* **Example** (Finding the last matching element)
|
|
4266
|
+
*
|
|
4124
4267
|
* ```ts
|
|
4125
4268
|
* import { Chunk } from "effect"
|
|
4126
4269
|
* import * as Option from "effect/Option"
|
|
@@ -4146,7 +4289,8 @@ export declare const findLast: {
|
|
|
4146
4289
|
/**
|
|
4147
4290
|
* Find the last element for which a predicate holds.
|
|
4148
4291
|
*
|
|
4149
|
-
*
|
|
4292
|
+
* **Example** (Finding the last matching element)
|
|
4293
|
+
*
|
|
4150
4294
|
* ```ts
|
|
4151
4295
|
* import { Chunk } from "effect"
|
|
4152
4296
|
* import * as Option from "effect/Option"
|
|
@@ -4172,7 +4316,8 @@ export declare const findLast: {
|
|
|
4172
4316
|
/**
|
|
4173
4317
|
* Find the last element for which a predicate holds.
|
|
4174
4318
|
*
|
|
4175
|
-
*
|
|
4319
|
+
* **Example** (Finding the last matching element)
|
|
4320
|
+
*
|
|
4176
4321
|
* ```ts
|
|
4177
4322
|
* import { Chunk } from "effect"
|
|
4178
4323
|
* import * as Option from "effect/Option"
|
|
@@ -4199,7 +4344,8 @@ export declare const findLast: {
|
|
|
4199
4344
|
/**
|
|
4200
4345
|
* Return the last index for which a predicate holds.
|
|
4201
4346
|
*
|
|
4202
|
-
*
|
|
4347
|
+
* **Example** (Finding the last matching index)
|
|
4348
|
+
*
|
|
4203
4349
|
* ```ts
|
|
4204
4350
|
* import { Chunk } from "effect"
|
|
4205
4351
|
*
|
|
@@ -4223,7 +4369,8 @@ export declare const findLastIndex: {
|
|
|
4223
4369
|
/**
|
|
4224
4370
|
* Return the last index for which a predicate holds.
|
|
4225
4371
|
*
|
|
4226
|
-
*
|
|
4372
|
+
* **Example** (Finding the last matching index)
|
|
4373
|
+
*
|
|
4227
4374
|
* ```ts
|
|
4228
4375
|
* import { Chunk } from "effect"
|
|
4229
4376
|
*
|
|
@@ -4247,7 +4394,8 @@ export declare const findLastIndex: {
|
|
|
4247
4394
|
/**
|
|
4248
4395
|
* Return the last index for which a predicate holds.
|
|
4249
4396
|
*
|
|
4250
|
-
*
|
|
4397
|
+
* **Example** (Finding the last matching index)
|
|
4398
|
+
*
|
|
4251
4399
|
* ```ts
|
|
4252
4400
|
* import { Chunk } from "effect"
|
|
4253
4401
|
*
|
|
@@ -4272,7 +4420,8 @@ export declare const findLastIndex: {
|
|
|
4272
4420
|
/**
|
|
4273
4421
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4274
4422
|
*
|
|
4275
|
-
*
|
|
4423
|
+
* **Example** (Checking every element)
|
|
4424
|
+
*
|
|
4276
4425
|
* ```ts
|
|
4277
4426
|
* import { Chunk } from "effect"
|
|
4278
4427
|
*
|
|
@@ -4299,7 +4448,8 @@ export declare const every: {
|
|
|
4299
4448
|
/**
|
|
4300
4449
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4301
4450
|
*
|
|
4302
|
-
*
|
|
4451
|
+
* **Example** (Checking every element)
|
|
4452
|
+
*
|
|
4303
4453
|
* ```ts
|
|
4304
4454
|
* import { Chunk } from "effect"
|
|
4305
4455
|
*
|
|
@@ -4326,7 +4476,8 @@ export declare const every: {
|
|
|
4326
4476
|
/**
|
|
4327
4477
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4328
4478
|
*
|
|
4329
|
-
*
|
|
4479
|
+
* **Example** (Checking every element)
|
|
4480
|
+
*
|
|
4330
4481
|
* ```ts
|
|
4331
4482
|
* import { Chunk } from "effect"
|
|
4332
4483
|
*
|
|
@@ -4353,7 +4504,8 @@ export declare const every: {
|
|
|
4353
4504
|
/**
|
|
4354
4505
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4355
4506
|
*
|
|
4356
|
-
*
|
|
4507
|
+
* **Example** (Checking every element)
|
|
4508
|
+
*
|
|
4357
4509
|
* ```ts
|
|
4358
4510
|
* import { Chunk } from "effect"
|
|
4359
4511
|
*
|
|
@@ -4380,7 +4532,8 @@ export declare const every: {
|
|
|
4380
4532
|
/**
|
|
4381
4533
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4382
4534
|
*
|
|
4383
|
-
*
|
|
4535
|
+
* **Example** (Checking every element)
|
|
4536
|
+
*
|
|
4384
4537
|
* ```ts
|
|
4385
4538
|
* import { Chunk } from "effect"
|
|
4386
4539
|
*
|
|
@@ -4408,7 +4561,8 @@ export declare const every: {
|
|
|
4408
4561
|
/**
|
|
4409
4562
|
* Check if a predicate holds true for some `Chunk` element.
|
|
4410
4563
|
*
|
|
4411
|
-
*
|
|
4564
|
+
* **Example** (Checking for some matching element)
|
|
4565
|
+
*
|
|
4412
4566
|
* ```ts
|
|
4413
4567
|
* import { Chunk } from "effect"
|
|
4414
4568
|
*
|
|
@@ -4432,7 +4586,8 @@ export declare const some: {
|
|
|
4432
4586
|
/**
|
|
4433
4587
|
* Check if a predicate holds true for some `Chunk` element.
|
|
4434
4588
|
*
|
|
4435
|
-
*
|
|
4589
|
+
* **Example** (Checking for some matching element)
|
|
4590
|
+
*
|
|
4436
4591
|
* ```ts
|
|
4437
4592
|
* import { Chunk } from "effect"
|
|
4438
4593
|
*
|
|
@@ -4456,7 +4611,8 @@ export declare const some: {
|
|
|
4456
4611
|
/**
|
|
4457
4612
|
* Check if a predicate holds true for some `Chunk` element.
|
|
4458
4613
|
*
|
|
4459
|
-
*
|
|
4614
|
+
* **Example** (Checking for some matching element)
|
|
4615
|
+
*
|
|
4460
4616
|
* ```ts
|
|
4461
4617
|
* import { Chunk } from "effect"
|
|
4462
4618
|
*
|
|
@@ -4481,7 +4637,8 @@ export declare const some: {
|
|
|
4481
4637
|
/**
|
|
4482
4638
|
* Joins the elements together with "sep" in the middle.
|
|
4483
4639
|
*
|
|
4484
|
-
*
|
|
4640
|
+
* **Example** (Joining chunks into a string)
|
|
4641
|
+
*
|
|
4485
4642
|
* ```ts
|
|
4486
4643
|
* import { Chunk } from "effect"
|
|
4487
4644
|
*
|
|
@@ -4509,7 +4666,8 @@ export declare const join: {
|
|
|
4509
4666
|
/**
|
|
4510
4667
|
* Joins the elements together with "sep" in the middle.
|
|
4511
4668
|
*
|
|
4512
|
-
*
|
|
4669
|
+
* **Example** (Joining chunks into a string)
|
|
4670
|
+
*
|
|
4513
4671
|
* ```ts
|
|
4514
4672
|
* import { Chunk } from "effect"
|
|
4515
4673
|
*
|
|
@@ -4537,7 +4695,8 @@ export declare const join: {
|
|
|
4537
4695
|
/**
|
|
4538
4696
|
* Joins the elements together with "sep" in the middle.
|
|
4539
4697
|
*
|
|
4540
|
-
*
|
|
4698
|
+
* **Example** (Joining chunks into a string)
|
|
4699
|
+
*
|
|
4541
4700
|
* ```ts
|
|
4542
4701
|
* import { Chunk } from "effect"
|
|
4543
4702
|
*
|
|
@@ -4566,7 +4725,8 @@ export declare const join: {
|
|
|
4566
4725
|
/**
|
|
4567
4726
|
* Reduces the elements of a chunk from left to right.
|
|
4568
4727
|
*
|
|
4569
|
-
*
|
|
4728
|
+
* **Example** (Reducing from the left)
|
|
4729
|
+
*
|
|
4570
4730
|
* ```ts
|
|
4571
4731
|
* import { Chunk } from "effect"
|
|
4572
4732
|
*
|
|
@@ -4591,7 +4751,8 @@ export declare const reduce: {
|
|
|
4591
4751
|
/**
|
|
4592
4752
|
* Reduces the elements of a chunk from left to right.
|
|
4593
4753
|
*
|
|
4594
|
-
*
|
|
4754
|
+
* **Example** (Reducing from the left)
|
|
4755
|
+
*
|
|
4595
4756
|
* ```ts
|
|
4596
4757
|
* import { Chunk } from "effect"
|
|
4597
4758
|
*
|
|
@@ -4616,7 +4777,8 @@ export declare const reduce: {
|
|
|
4616
4777
|
/**
|
|
4617
4778
|
* Reduces the elements of a chunk from left to right.
|
|
4618
4779
|
*
|
|
4619
|
-
*
|
|
4780
|
+
* **Example** (Reducing from the left)
|
|
4781
|
+
*
|
|
4620
4782
|
* ```ts
|
|
4621
4783
|
* import { Chunk } from "effect"
|
|
4622
4784
|
*
|
|
@@ -4642,7 +4804,8 @@ export declare const reduce: {
|
|
|
4642
4804
|
/**
|
|
4643
4805
|
* Reduces the elements of a chunk from right to left.
|
|
4644
4806
|
*
|
|
4645
|
-
*
|
|
4807
|
+
* **Example** (Reducing from the right)
|
|
4808
|
+
*
|
|
4646
4809
|
* ```ts
|
|
4647
4810
|
* import { Chunk } from "effect"
|
|
4648
4811
|
*
|
|
@@ -4671,7 +4834,8 @@ export declare const reduceRight: {
|
|
|
4671
4834
|
/**
|
|
4672
4835
|
* Reduces the elements of a chunk from right to left.
|
|
4673
4836
|
*
|
|
4674
|
-
*
|
|
4837
|
+
* **Example** (Reducing from the right)
|
|
4838
|
+
*
|
|
4675
4839
|
* ```ts
|
|
4676
4840
|
* import { Chunk } from "effect"
|
|
4677
4841
|
*
|
|
@@ -4700,7 +4864,8 @@ export declare const reduceRight: {
|
|
|
4700
4864
|
/**
|
|
4701
4865
|
* Reduces the elements of a chunk from right to left.
|
|
4702
4866
|
*
|
|
4703
|
-
*
|
|
4867
|
+
* **Example** (Reducing from the right)
|
|
4868
|
+
*
|
|
4704
4869
|
* ```ts
|
|
4705
4870
|
* import { Chunk } from "effect"
|
|
4706
4871
|
*
|
|
@@ -4731,7 +4896,8 @@ export declare const reduceRight: {
|
|
|
4731
4896
|
* Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function.
|
|
4732
4897
|
* The order and references of result values are determined by the first `Chunk`.
|
|
4733
4898
|
*
|
|
4734
|
-
*
|
|
4899
|
+
* **Example** (Computing difference with custom equivalence)
|
|
4900
|
+
*
|
|
4735
4901
|
* ```ts
|
|
4736
4902
|
* import { Chunk } from "effect"
|
|
4737
4903
|
*
|
|
@@ -4766,7 +4932,8 @@ export declare const differenceWith: <A>(isEquivalent: (self: A, that: A) => boo
|
|
|
4766
4932
|
* Creates a `Chunk` of values not included in the other given `Chunk`.
|
|
4767
4933
|
* The order and references of result values are determined by the first `Chunk`.
|
|
4768
4934
|
*
|
|
4769
|
-
*
|
|
4935
|
+
* **Example** (Computing chunk difference)
|
|
4936
|
+
*
|
|
4770
4937
|
* ```ts
|
|
4771
4938
|
* import { Chunk } from "effect"
|
|
4772
4939
|
*
|
|
@@ -4795,7 +4962,8 @@ export declare const difference: {
|
|
|
4795
4962
|
* Creates a `Chunk` of values not included in the other given `Chunk`.
|
|
4796
4963
|
* The order and references of result values are determined by the first `Chunk`.
|
|
4797
4964
|
*
|
|
4798
|
-
*
|
|
4965
|
+
* **Example** (Computing chunk difference)
|
|
4966
|
+
*
|
|
4799
4967
|
* ```ts
|
|
4800
4968
|
* import { Chunk } from "effect"
|
|
4801
4969
|
*
|
|
@@ -4824,7 +4992,8 @@ export declare const difference: {
|
|
|
4824
4992
|
* Creates a `Chunk` of values not included in the other given `Chunk`.
|
|
4825
4993
|
* The order and references of result values are determined by the first `Chunk`.
|
|
4826
4994
|
*
|
|
4827
|
-
*
|
|
4995
|
+
* **Example** (Computing chunk difference)
|
|
4996
|
+
*
|
|
4828
4997
|
* ```ts
|
|
4829
4998
|
* import { Chunk } from "effect"
|
|
4830
4999
|
*
|