effect 4.0.0-beta.66 → 4.0.0-beta.68
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 +151 -106
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +50 -40
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +620 -553
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +298 -254
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +342 -274
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +168 -126
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +189 -156
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +85 -68
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +30 -5
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +19 -2
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +239 -135
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +135 -59
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +84 -73
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +51 -44
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +1568 -632
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +685 -315
- 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 +574 -428
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +250 -191
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +16 -9
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +9 -5
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +11 -5
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +10 -4
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +80 -68
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +53 -49
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +33 -32
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +19 -18
- package/dist/ConfigProvider.js.map +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 +400 -189
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +143 -77
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +67 -48
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +94 -36
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +208 -0
- package/dist/Crypto.d.ts.map +1 -0
- package/dist/Crypto.js +157 -0
- package/dist/Crypto.js.map +1 -0
- package/dist/Data.d.ts +9 -3
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +893 -464
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +387 -228
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +367 -175
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +146 -72
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +44 -2
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Differ.js +36 -0
- package/dist/Duration.d.ts +333 -186
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +178 -107
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2181 -2275
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +935 -850
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +38 -3
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +3 -3
- 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/Equal.d.ts +4 -3
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +4 -3
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +18 -24
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +16 -21
- 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 +106 -12
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +23 -6
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +6 -5
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +71 -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 +118 -57
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +121 -39
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +287 -159
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +175 -73
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +93 -52
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +97 -34
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +102 -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/Formatter.d.ts +4 -2
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +3 -69
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +218 -151
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +94 -78
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +714 -415
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +325 -182
- 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 +35 -24
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +27 -17
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +540 -388
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +262 -156
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +53 -34
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +83 -16
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +239 -153
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +110 -56
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +26 -13
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +22 -10
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +336 -222
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +146 -100
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +12 -9
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +9 -6
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +13 -11
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +13 -11
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +16 -0
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +10 -0
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +97 -26
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +39 -20
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +472 -410
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +290 -226
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +99 -26
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +58 -14
- 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 +159 -104
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +215 -189
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +78 -19
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +24 -17
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +135 -161
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +86 -78
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +330 -291
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +219 -214
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +146 -87
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +67 -43
- 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 +92 -38
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +110 -68
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +135 -85
- 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 +78 -60
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +15 -2
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +8 -2
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +38 -48
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +34 -25
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +261 -205
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +119 -91
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +6 -7
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +5 -6
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +133 -156
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +64 -64
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +6 -6
- package/dist/Order.js +6 -6
- package/dist/Ordering.d.ts +56 -45
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +10 -8
- 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 +49 -4
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +77 -18
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +63 -14
- 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 -23
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +12 -17
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +11 -3
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +9 -2
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +385 -309
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +260 -207
- 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 +303 -184
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +231 -134
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +65 -57
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +41 -66
- 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 +68 -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 +282 -137
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +124 -62
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +7 -5
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +5 -3
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +63 -34
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +31 -15
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +3 -1
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +2 -0
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +85 -66
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +57 -45
- 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 +12 -6
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +12 -6
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +159 -34
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +68 -12
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +262 -118
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +78 -42
- 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 +135 -151
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +56 -68
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +40 -20
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +34 -17
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +556 -590
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +265 -253
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +44 -7
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +34 -5
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +1293 -602
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +501 -361
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +122 -92
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +102 -77
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +49 -36
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +42 -29
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +19 -24
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +16 -14
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +231 -63
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +266 -75
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +89 -77
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +47 -37
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +97 -46
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +89 -38
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +8 -1
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +24 -1
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +107 -65
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +61 -32
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +141 -49
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +82 -21
- 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 +61 -37
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +18 -21
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +461 -206
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +241 -90
- 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 +2117 -1541
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +951 -682
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +174 -97
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +128 -69
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +20 -18
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +10 -8
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +309 -204
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +126 -77
- 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 +233 -59
- 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 +280 -245
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +116 -102
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +34 -32
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +16 -14
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +200 -155
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +83 -61
- 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 -223
- 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 +181 -111
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +87 -49
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +94 -63
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +55 -37
- 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 +277 -242
- 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 -115
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +76 -77
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +74 -50
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +34 -23
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +31 -34
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.d.ts +62 -25
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +36 -25
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +72 -117
- 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 +5 -2
- 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 +1973 -418
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1973 -418
- 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 +9 -6
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +9 -6
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts +39 -35
- 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 +44 -36
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +30 -15
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +2 -0
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +9 -7
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.d.ts +34 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +34 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +205 -147
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +164 -109
- 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 +64 -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 +342 -119
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +266 -98
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +56 -20
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +64 -16
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +10 -12
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +9 -7
- 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 +200 -176
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +77 -68
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +173 -160
- 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 +43 -33
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +15 -11
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +14 -9
- 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 +167 -96
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +107 -53
- 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 +121 -29
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +121 -29
- 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 +48 -19
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +32 -9
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +196 -115
- 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 +39 -14
- 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 +110 -32
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +196 -135
- 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 +183 -59
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +105 -23
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.d.ts +182 -0
- package/dist/unstable/cli/index.d.ts.map +1 -1
- package/dist/unstable/cli/index.js +205 -6
- package/dist/unstable/cli/index.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/cli/internal/parser.js +0 -1
- package/dist/unstable/cli/internal/parser.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 +74 -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 +42 -14
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +30 -14
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +18 -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 +126 -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 +76 -13
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +73 -12
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +53 -5
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +49 -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 +90 -19
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +49 -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/index.d.ts +790 -0
- package/dist/unstable/cluster/index.d.ts.map +1 -1
- package/dist/unstable/cluster/index.js +790 -0
- package/dist/unstable/cluster/index.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/devtools/index.d.ts +58 -0
- package/dist/unstable/devtools/index.d.ts.map +1 -1
- package/dist/unstable/devtools/index.js +58 -0
- package/dist/unstable/devtools/index.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/encoding/index.d.ts +49 -0
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +49 -0
- package/dist/unstable/encoding/index.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 +150 -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/eventlog/index.d.ts +240 -0
- package/dist/unstable/eventlog/index.d.ts.map +1 -1
- package/dist/unstable/eventlog/index.js +240 -0
- package/dist/unstable/eventlog/index.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 +204 -96
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +85 -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 +48 -7
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +45 -6
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +38 -6
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +27 -2
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +38 -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 +209 -62
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +136 -41
- 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 +93 -10
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +85 -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 +391 -67
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +205 -33
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +24 -8
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +24 -8
- 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 +179 -28
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +131 -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 -1
- 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 +70 -56
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +35 -21
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +237 -51
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +120 -25
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.d.ts +452 -0
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +452 -0
- package/dist/unstable/http/index.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 +54 -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 +57 -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 +113 -22
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -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 +86 -38
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +59 -35
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +73 -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 +4 -3
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +23 -3
- 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/httpapi/index.d.ts +310 -25
- package/dist/unstable/httpapi/index.d.ts.map +1 -1
- package/dist/unstable/httpapi/index.js +310 -25
- package/dist/unstable/httpapi/index.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 +15 -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 +17 -5
- 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 +19 -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 +36 -16
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +9 -7
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/observability/index.d.ts +160 -3
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +160 -3
- 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 +98 -16
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +91 -14
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +101 -21
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +85 -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/persistence/index.d.ts +147 -0
- package/dist/unstable/persistence/index.d.ts.map +1 -1
- package/dist/unstable/persistence/index.js +147 -0
- package/dist/unstable/persistence/index.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 +25 -18
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +23 -12
- 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 +198 -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 +544 -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 +94 -13
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +60 -7
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/reactivity/index.d.ts +167 -0
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +167 -0
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +254 -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 +80 -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 +39 -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 +10 -0
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +10 -0
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/rpc/index.d.ts +272 -0
- package/dist/unstable/rpc/index.d.ts.map +1 -1
- package/dist/unstable/rpc/index.js +272 -0
- package/dist/unstable/rpc/index.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +192 -59
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +122 -38
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +101 -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/schema/index.d.ts +37 -0
- package/dist/unstable/schema/index.d.ts.map +1 -1
- package/dist/unstable/schema/index.js +37 -0
- package/dist/unstable/schema/index.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +168 -34
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +124 -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/socket/index.d.ts +44 -0
- package/dist/unstable/socket/index.d.ts.map +1 -1
- package/dist/unstable/socket/index.js +44 -0
- package/dist/unstable/socket/index.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts +40 -9
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +45 -5
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +38 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +40 -1
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +34 -3
- 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 +117 -0
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +131 -0
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +25 -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 +4 -0
- package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
- package/dist/unstable/sql/SqlStream.js +24 -0
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +151 -24
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +91 -6
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +179 -1
- package/dist/unstable/sql/index.d.ts.map +1 -1
- package/dist/unstable/sql/index.js +179 -1
- package/dist/unstable/sql/index.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +72 -20
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +57 -14
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +61 -8
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +44 -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 +81 -1
- package/dist/unstable/workers/index.d.ts.map +1 -1
- package/dist/unstable/workers/index.js +81 -1
- package/dist/unstable/workers/index.js.map +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 +128 -31
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +77 -13
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +33 -8
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +26 -6
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +102 -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 +40 -12
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +8 -12
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts +37 -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/dist/unstable/workflow/index.d.ts +160 -0
- package/dist/unstable/workflow/index.d.ts.map +1 -1
- package/dist/unstable/workflow/index.js +160 -0
- package/dist/unstable/workflow/index.js.map +1 -1
- package/package.json +11 -11
- package/src/Array.ts +151 -106
- package/src/BigDecimal.ts +620 -553
- package/src/BigInt.ts +342 -274
- package/src/Boolean.ts +189 -156
- package/src/Brand.ts +30 -5
- package/src/Cache.ts +334 -167
- package/src/Cause.ts +84 -73
- package/src/Channel.ts +1639 -667
- package/src/ChannelSchema.ts +137 -12
- package/src/Chunk.ts +575 -429
- package/src/Clock.ts +16 -9
- package/src/Combiner.ts +11 -5
- package/src/Config.ts +80 -68
- package/src/ConfigProvider.ts +33 -32
- package/src/Console.ts +88 -58
- package/src/Context.ts +401 -190
- package/src/Cron.ts +109 -48
- package/src/Crypto.ts +327 -0
- package/src/Data.ts +9 -3
- package/src/DateTime.ts +893 -464
- package/src/Deferred.ts +367 -175
- package/src/Differ.ts +44 -2
- package/src/Duration.ts +333 -186
- package/src/Effect.ts +2201 -2289
- package/src/Effectable.ts +38 -3
- package/src/Encoding.ts +78 -28
- package/src/Equal.ts +4 -3
- package/src/Equivalence.ts +18 -24
- package/src/ErrorReporter.ts +66 -82
- package/src/ExecutionPlan.ts +106 -12
- package/src/Exit.ts +6 -5
- package/src/Fiber.ts +71 -40
- package/src/FiberHandle.ts +157 -57
- package/src/FiberMap.ts +328 -163
- package/src/FiberSet.ts +130 -52
- package/src/FileSystem.ts +104 -74
- package/src/Filter.ts +166 -88
- package/src/Formatter.ts +4 -70
- package/src/Function.ts +218 -151
- package/src/Graph.ts +714 -415
- package/src/HKT.ts +29 -13
- package/src/Hash.ts +35 -24
- package/src/HashMap.ts +540 -388
- package/src/HashRing.ts +111 -34
- package/src/HashSet.ts +239 -153
- package/src/Inspectable.ts +30 -17
- package/src/Iterable.ts +336 -222
- package/src/JsonPatch.ts +13 -10
- package/src/JsonPointer.ts +13 -11
- package/src/JsonSchema.ts +16 -0
- package/src/Latch.ts +97 -26
- package/src/Layer.ts +547 -445
- package/src/LayerMap.ts +99 -26
- package/src/LogLevel.ts +92 -131
- package/src/Logger.ts +365 -297
- package/src/ManagedRuntime.ts +78 -19
- package/src/Match.ts +135 -161
- package/src/Metric.ts +362 -313
- package/src/MutableHashMap.ts +202 -127
- package/src/MutableHashSet.ts +120 -52
- package/src/MutableList.ts +157 -100
- package/src/MutableRef.ts +129 -90
- package/src/Newtype.ts +15 -2
- package/src/NonEmptyIterable.ts +38 -48
- package/src/Number.ts +261 -205
- package/src/Optic.ts +6 -7
- package/src/Option.ts +133 -156
- package/src/Order.ts +6 -6
- package/src/Ordering.ts +56 -45
- package/src/PartitionedSemaphore.ts +225 -40
- package/src/Path.ts +77 -13
- package/src/Pipeable.ts +82 -24
- package/src/PlatformError.ts +74 -6
- package/src/Pool.ts +94 -31
- package/src/Predicate.ts +17 -24
- package/src/PrimaryKey.ts +11 -3
- package/src/PubSub.ts +385 -309
- package/src/Pull.ts +94 -25
- package/src/Queue.ts +303 -184
- package/src/Random.ts +69 -93
- package/src/RcMap.ts +151 -141
- package/src/RcRef.ts +68 -32
- package/src/Record.ts +282 -137
- package/src/Redactable.ts +7 -5
- package/src/Redacted.ts +63 -34
- package/src/Reducer.ts +3 -1
- package/src/Ref.ts +173 -134
- package/src/References.ts +73 -31
- package/src/RegExp.ts +12 -6
- package/src/Request.ts +159 -34
- package/src/RequestResolver.ts +278 -121
- package/src/Resource.ts +45 -7
- package/src/Result.ts +137 -153
- package/src/Runtime.ts +42 -21
- package/src/Schedule.ts +585 -613
- package/src/Scheduler.ts +44 -7
- package/src/Schema.ts +1309 -615
- package/src/SchemaAST.ts +123 -93
- package/src/SchemaGetter.ts +52 -37
- package/src/SchemaIssue.ts +19 -24
- package/src/SchemaParser.ts +306 -85
- package/src/SchemaRepresentation.ts +89 -77
- package/src/SchemaTransformation.ts +97 -46
- package/src/SchemaUtils.ts +24 -1
- package/src/Scope.ts +107 -65
- package/src/ScopedCache.ts +195 -59
- package/src/ScopedRef.ts +28 -8
- package/src/Semaphore.ts +61 -37
- package/src/Sink.ts +461 -206
- package/src/Stdio.ts +43 -6
- package/src/Stream.ts +2361 -1613
- package/src/String.ts +174 -97
- package/src/Struct.ts +20 -18
- package/src/SubscriptionRef.ts +309 -204
- 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 +233 -59
- package/src/Trie.ts +280 -245
- package/src/Tuple.ts +34 -32
- package/src/TxChunk.ts +200 -155
- package/src/TxDeferred.ts +43 -29
- package/src/TxHashMap.ts +370 -231
- package/src/TxHashSet.ts +253 -159
- package/src/TxPriorityQueue.ts +97 -65
- package/src/TxPubSub.ts +77 -49
- package/src/TxQueue.ts +277 -242
- package/src/TxReentrantLock.ts +70 -47
- package/src/TxRef.ts +69 -40
- package/src/TxSemaphore.ts +101 -115
- package/src/TxSubscriptionRef.ts +74 -50
- package/src/Types.ts +31 -34
- package/src/UndefinedOr.ts +62 -25
- package/src/Unify.ts +72 -117
- package/src/Utils.ts +5 -2
- package/src/index.ts +1976 -420
- package/src/internal/schema/schema.ts +1 -1
- package/src/testing/FastCheck.ts +9 -6
- package/src/testing/TestClock.ts +63 -35
- package/src/testing/TestConsole.ts +54 -36
- package/src/testing/TestSchema.ts +10 -8
- package/src/testing/index.ts +34 -0
- package/src/unstable/ai/AiError.ts +195 -137
- package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
- package/src/unstable/ai/Chat.ts +68 -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 +342 -119
- package/src/unstable/ai/McpServer.ts +79 -20
- package/src/unstable/ai/Model.ts +10 -12
- package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
- package/src/unstable/ai/Prompt.ts +216 -192
- package/src/unstable/ai/Response.ts +179 -167
- package/src/unstable/ai/ResponseIdTracker.ts +43 -4
- package/src/unstable/ai/Telemetry.ts +43 -33
- package/src/unstable/ai/Tokenizer.ts +14 -9
- package/src/unstable/ai/Tool.ts +168 -97
- package/src/unstable/ai/Toolkit.ts +51 -46
- package/src/unstable/ai/index.ts +121 -29
- package/src/unstable/cli/Argument.ts +226 -134
- package/src/unstable/cli/CliError.ts +96 -26
- package/src/unstable/cli/CliOutput.ts +48 -19
- package/src/unstable/cli/Command.ts +196 -115
- 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 +39 -14
- package/src/unstable/cli/Param.ts +395 -260
- package/src/unstable/cli/Primitive.ts +79 -42
- package/src/unstable/cli/Prompt.ts +207 -59
- package/src/unstable/cli/index.ts +205 -6
- 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/cli/internal/parser.ts +0 -1
- 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 +106 -16
- package/src/unstable/cluster/EntityAddress.ts +30 -2
- package/src/unstable/cluster/EntityId.ts +18 -3
- package/src/unstable/cluster/EntityProxy.ts +42 -14
- package/src/unstable/cluster/EntityProxyServer.ts +45 -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 +126 -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 +76 -13
- package/src/unstable/cluster/ShardId.ts +53 -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 +90 -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/index.ts +790 -0
- 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/devtools/index.ts +58 -0
- 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/encoding/index.ts +49 -0
- 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 +150 -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/eventlog/index.ts +240 -0
- 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 +204 -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 +48 -7
- package/src/unstable/http/HttpMethod.ts +38 -6
- package/src/unstable/http/HttpMiddleware.ts +60 -11
- package/src/unstable/http/HttpPlatform.ts +34 -3
- package/src/unstable/http/HttpRouter.ts +232 -69
- package/src/unstable/http/HttpServer.ts +151 -22
- package/src/unstable/http/HttpServerError.ts +93 -10
- package/src/unstable/http/HttpServerRequest.ts +125 -21
- package/src/unstable/http/HttpServerRespondable.ts +49 -6
- package/src/unstable/http/HttpServerResponse.ts +391 -67
- package/src/unstable/http/HttpStaticServer.ts +24 -8
- package/src/unstable/http/HttpTraceContext.ts +53 -6
- package/src/unstable/http/Multipart.ts +179 -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 -1
- package/src/unstable/http/Url.ts +70 -56
- package/src/unstable/http/UrlParams.ts +237 -51
- package/src/unstable/http/index.ts +452 -0
- package/src/unstable/httpapi/HttpApi.ts +49 -14
- package/src/unstable/httpapi/HttpApiBuilder.ts +81 -16
- package/src/unstable/httpapi/HttpApiClient.ts +78 -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 +113 -22
- package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
- package/src/unstable/httpapi/HttpApiSchema.ts +86 -38
- package/src/unstable/httpapi/HttpApiSecurity.ts +73 -17
- package/src/unstable/httpapi/HttpApiSwagger.ts +23 -3
- package/src/unstable/httpapi/HttpApiTest.ts +26 -1
- package/src/unstable/httpapi/OpenApi.ts +115 -15
- package/src/unstable/httpapi/index.ts +310 -25
- package/src/unstable/observability/Otlp.ts +33 -3
- package/src/unstable/observability/OtlpExporter.ts +32 -1
- package/src/unstable/observability/OtlpLogger.ts +32 -2
- package/src/unstable/observability/OtlpMetrics.ts +39 -5
- package/src/unstable/observability/OtlpResource.ts +68 -12
- package/src/unstable/observability/OtlpSerialization.ts +28 -3
- package/src/unstable/observability/OtlpTracer.ts +41 -2
- package/src/unstable/observability/PrometheusMetrics.ts +36 -16
- package/src/unstable/observability/index.ts +160 -3
- 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 +98 -16
- package/src/unstable/persistence/RateLimiter.ts +101 -21
- package/src/unstable/persistence/Redis.ts +42 -5
- package/src/unstable/persistence/index.ts +147 -0
- package/src/unstable/process/ChildProcess.ts +90 -66
- package/src/unstable/process/ChildProcessSpawner.ts +23 -12
- package/src/unstable/process/index.ts +2 -1
- package/src/unstable/reactivity/AsyncResult.ts +204 -61
- package/src/unstable/reactivity/Atom.ts +598 -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 +94 -13
- package/src/unstable/reactivity/index.ts +167 -0
- package/src/unstable/rpc/Rpc.ts +254 -56
- package/src/unstable/rpc/RpcClient.ts +106 -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 +39 -6
- package/src/unstable/rpc/Utils.ts +33 -0
- package/src/unstable/rpc/index.ts +272 -0
- package/src/unstable/schema/Model.ts +245 -61
- package/src/unstable/schema/VariantSchema.ts +101 -24
- package/src/unstable/schema/index.ts +37 -0
- package/src/unstable/socket/Socket.ts +168 -34
- package/src/unstable/socket/SocketServer.ts +58 -10
- package/src/unstable/socket/index.ts +44 -0
- package/src/unstable/sql/Migrator.ts +61 -9
- package/src/unstable/sql/SqlClient.ts +59 -2
- package/src/unstable/sql/SqlConnection.ts +34 -3
- package/src/unstable/sql/SqlError.ts +135 -0
- package/src/unstable/sql/SqlModel.ts +25 -5
- package/src/unstable/sql/SqlResolver.ts +56 -13
- package/src/unstable/sql/SqlSchema.ts +29 -8
- package/src/unstable/sql/SqlStream.ts +24 -0
- package/src/unstable/sql/Statement.ts +168 -24
- package/src/unstable/sql/index.ts +179 -1
- package/src/unstable/workers/Transferable.ts +72 -20
- package/src/unstable/workers/Worker.ts +61 -8
- package/src/unstable/workers/WorkerError.ts +50 -9
- package/src/unstable/workers/WorkerRunner.ts +32 -3
- package/src/unstable/workers/index.ts +81 -1
- package/src/unstable/workflow/Activity.ts +61 -10
- package/src/unstable/workflow/DurableClock.ts +26 -3
- package/src/unstable/workflow/DurableDeferred.ts +148 -31
- package/src/unstable/workflow/DurableQueue.ts +33 -8
- package/src/unstable/workflow/Workflow.ts +123 -31
- package/src/unstable/workflow/WorkflowEngine.ts +40 -5
- package/src/unstable/workflow/WorkflowProxy.ts +40 -12
- package/src/unstable/workflow/WorkflowProxyServer.ts +41 -6
- package/src/unstable/workflow/index.ts +160 -0
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,13 +133,13 @@ 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
|
-
* import type {
|
|
135
|
-
* import type { Kind } from "effect/HKT"
|
|
139
|
+
* import type { Chunk, HKT } from "effect"
|
|
136
140
|
*
|
|
137
141
|
* // Create a Chunk type using the type lambda
|
|
138
|
-
* type NumberChunk = Kind<ChunkTypeLambda, never, never, never, number>
|
|
142
|
+
* type NumberChunk = HKT.Kind<Chunk.ChunkTypeLambda, never, never, never, number>
|
|
139
143
|
* // Equivalent to: Chunk<number>
|
|
140
144
|
* ```
|
|
141
145
|
*
|
|
@@ -169,12 +173,13 @@ interface ISlice<A> {
|
|
|
169
173
|
readonly length: number;
|
|
170
174
|
}
|
|
171
175
|
/**
|
|
172
|
-
*
|
|
176
|
+
* Creates an `Equivalence` for chunks that compares chunk lengths and then
|
|
177
|
+
* compares corresponding elements with the provided element equivalence.
|
|
178
|
+
*
|
|
179
|
+
* **Example** (Comparing chunks for equivalence)
|
|
173
180
|
*
|
|
174
|
-
* @example
|
|
175
181
|
* ```ts
|
|
176
|
-
* import { Chunk } from "effect"
|
|
177
|
-
* import * as Equivalence from "effect/Equivalence"
|
|
182
|
+
* import { Chunk, Equivalence } from "effect"
|
|
178
183
|
*
|
|
179
184
|
* const chunk1 = Chunk.make(1, 2, 3)
|
|
180
185
|
* const chunk2 = Chunk.make(1, 2, 3)
|
|
@@ -186,13 +191,14 @@ interface ISlice<A> {
|
|
|
186
191
|
* ```
|
|
187
192
|
*
|
|
188
193
|
* @category equivalence
|
|
189
|
-
* @since
|
|
194
|
+
* @since 4.0.0
|
|
190
195
|
*/
|
|
191
196
|
export declare const makeEquivalence: <A>(isEquivalent: Equivalence.Equivalence<A>) => Equivalence.Equivalence<Chunk<A>>;
|
|
192
197
|
/**
|
|
193
198
|
* Checks if `u` is a `Chunk<unknown>`
|
|
194
199
|
*
|
|
195
|
-
*
|
|
200
|
+
* **Example** (Checking for chunks)
|
|
201
|
+
*
|
|
196
202
|
* ```ts
|
|
197
203
|
* import { Chunk } from "effect"
|
|
198
204
|
*
|
|
@@ -211,7 +217,8 @@ export declare const isChunk: {
|
|
|
211
217
|
/**
|
|
212
218
|
* Checks if `u` is a `Chunk<unknown>`
|
|
213
219
|
*
|
|
214
|
-
*
|
|
220
|
+
* **Example** (Checking for chunks)
|
|
221
|
+
*
|
|
215
222
|
* ```ts
|
|
216
223
|
* import { Chunk } from "effect"
|
|
217
224
|
*
|
|
@@ -230,7 +237,8 @@ export declare const isChunk: {
|
|
|
230
237
|
/**
|
|
231
238
|
* Checks if `u` is a `Chunk<unknown>`
|
|
232
239
|
*
|
|
233
|
-
*
|
|
240
|
+
* **Example** (Checking for chunks)
|
|
241
|
+
*
|
|
234
242
|
* ```ts
|
|
235
243
|
* import { Chunk } from "effect"
|
|
236
244
|
*
|
|
@@ -250,7 +258,8 @@ export declare const isChunk: {
|
|
|
250
258
|
/**
|
|
251
259
|
* Creates an empty `Chunk`.
|
|
252
260
|
*
|
|
253
|
-
*
|
|
261
|
+
* **Example** (Creating an empty chunk)
|
|
262
|
+
*
|
|
254
263
|
* ```ts
|
|
255
264
|
* import { Chunk } from "effect"
|
|
256
265
|
*
|
|
@@ -265,13 +274,13 @@ export declare const empty: <A = never>() => Chunk<A>;
|
|
|
265
274
|
/**
|
|
266
275
|
* Builds a `NonEmptyChunk` from an non-empty collection of elements.
|
|
267
276
|
*
|
|
268
|
-
*
|
|
277
|
+
* **Example** (Creating a non-empty chunk)
|
|
278
|
+
*
|
|
269
279
|
* ```ts
|
|
270
280
|
* import { Chunk } from "effect"
|
|
271
281
|
*
|
|
272
282
|
* const chunk = Chunk.make(1, 2, 3, 4)
|
|
273
|
-
* console.log(chunk)
|
|
274
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3, 4 ] }
|
|
283
|
+
* console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4]
|
|
275
284
|
* ```
|
|
276
285
|
*
|
|
277
286
|
* @category constructors
|
|
@@ -281,13 +290,13 @@ export declare const make: <As extends readonly [any, ...Array<any>]>(...as: As)
|
|
|
281
290
|
/**
|
|
282
291
|
* Builds a `NonEmptyChunk` from a single element.
|
|
283
292
|
*
|
|
284
|
-
*
|
|
293
|
+
* **Example** (Creating a single-element chunk)
|
|
294
|
+
*
|
|
285
295
|
* ```ts
|
|
286
296
|
* import { Chunk } from "effect"
|
|
287
297
|
*
|
|
288
298
|
* const chunk = Chunk.of("hello")
|
|
289
|
-
* console.log(chunk)
|
|
290
|
-
* // { _id: 'Chunk', values: [ "hello" ] }
|
|
299
|
+
* console.log(Chunk.toArray(chunk)) // ["hello"]
|
|
291
300
|
* ```
|
|
292
301
|
*
|
|
293
302
|
* @category constructors
|
|
@@ -297,13 +306,13 @@ export declare const of: <A>(a: A) => NonEmptyChunk<A>;
|
|
|
297
306
|
/**
|
|
298
307
|
* Creates a new `Chunk` from an iterable collection of values.
|
|
299
308
|
*
|
|
300
|
-
*
|
|
309
|
+
* **Example** (Creating chunks from iterables)
|
|
310
|
+
*
|
|
301
311
|
* ```ts
|
|
302
312
|
* import { Chunk } from "effect"
|
|
303
313
|
*
|
|
304
314
|
* const chunk = Chunk.fromIterable([1, 2, 3])
|
|
305
|
-
* console.log(chunk)
|
|
306
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
315
|
+
* console.log(Chunk.toArray(chunk)) // [1, 2, 3]
|
|
307
316
|
* ```
|
|
308
317
|
*
|
|
309
318
|
* @category constructors
|
|
@@ -315,7 +324,8 @@ export declare const fromIterable: <A>(self: Iterable<A>) => Chunk<A>;
|
|
|
315
324
|
* (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the
|
|
316
325
|
* non-empty property is preserved.
|
|
317
326
|
*
|
|
318
|
-
*
|
|
327
|
+
* **Example** (Converting chunks to mutable arrays)
|
|
328
|
+
*
|
|
319
329
|
* ```ts
|
|
320
330
|
* import { Chunk } from "effect"
|
|
321
331
|
*
|
|
@@ -329,7 +339,7 @@ export declare const fromIterable: <A>(self: Iterable<A>) => Chunk<A>;
|
|
|
329
339
|
* console.log(Chunk.toArray(emptyChunk)) // []
|
|
330
340
|
* ```
|
|
331
341
|
*
|
|
332
|
-
* @category
|
|
342
|
+
* @category converting
|
|
333
343
|
* @since 2.0.0
|
|
334
344
|
*/
|
|
335
345
|
export declare const toArray: <S extends Chunk<any>>(self: S) => S extends NonEmptyChunk<any> ? RA.NonEmptyArray<Chunk.Infer<S>> : Array<Chunk.Infer<S>>;
|
|
@@ -338,7 +348,8 @@ export declare const toArray: <S extends Chunk<any>>(self: S) => S extends NonEm
|
|
|
338
348
|
* non-empty (`NonEmptyChunk`), the function will return a
|
|
339
349
|
* `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved.
|
|
340
350
|
*
|
|
341
|
-
*
|
|
351
|
+
* **Example** (Converting chunks to readonly arrays)
|
|
352
|
+
*
|
|
342
353
|
* ```ts
|
|
343
354
|
* import { Chunk } from "effect"
|
|
344
355
|
*
|
|
@@ -354,7 +365,7 @@ export declare const toArray: <S extends Chunk<any>>(self: S) => S extends NonEm
|
|
|
354
365
|
* console.log(Chunk.toReadonlyArray(emptyChunk)) // []
|
|
355
366
|
* ```
|
|
356
367
|
*
|
|
357
|
-
* @category
|
|
368
|
+
* @category converting
|
|
358
369
|
* @since 2.0.0
|
|
359
370
|
*/
|
|
360
371
|
export declare const toReadonlyArray: <S extends Chunk<any>>(self: S) => S extends NonEmptyChunk<any> ? RA.NonEmptyReadonlyArray<Chunk.Infer<S>> : ReadonlyArray<Chunk.Infer<S>>;
|
|
@@ -362,7 +373,7 @@ export declare const toReadonlyArray: <S extends Chunk<any>>(self: S) => S exten
|
|
|
362
373
|
* Reverses the order of elements in a `Chunk`.
|
|
363
374
|
* Importantly, if the input chunk is a `NonEmptyChunk`, the reversed chunk will also be a `NonEmptyChunk`.
|
|
364
375
|
*
|
|
365
|
-
*
|
|
376
|
+
* **Example** (Reversing chunks)
|
|
366
377
|
*
|
|
367
378
|
* ```ts
|
|
368
379
|
* import { Chunk } from "effect"
|
|
@@ -370,18 +381,18 @@ export declare const toReadonlyArray: <S extends Chunk<any>>(self: S) => S exten
|
|
|
370
381
|
* const chunk = Chunk.make(1, 2, 3)
|
|
371
382
|
* const result = Chunk.reverse(chunk)
|
|
372
383
|
*
|
|
373
|
-
* console.log(result)
|
|
374
|
-
* // { _id: 'Chunk', values: [ 3, 2, 1 ] }
|
|
384
|
+
* console.log(Chunk.toArray(result)) // [3, 2, 1]
|
|
375
385
|
* ```
|
|
376
386
|
*
|
|
377
|
-
* @since 2.0.0
|
|
378
387
|
* @category elements
|
|
388
|
+
* @since 2.0.0
|
|
379
389
|
*/
|
|
380
390
|
export declare const reverse: <S extends Chunk<any>>(self: S) => Chunk.With<S, Chunk.Infer<S>>;
|
|
381
391
|
/**
|
|
382
392
|
* This function provides a safe way to read a value at a particular index from a `Chunk`.
|
|
383
393
|
*
|
|
384
|
-
*
|
|
394
|
+
* **Example** (Accessing elements safely)
|
|
395
|
+
*
|
|
385
396
|
* ```ts
|
|
386
397
|
* import { Chunk } from "effect"
|
|
387
398
|
*
|
|
@@ -403,7 +414,8 @@ export declare const get: {
|
|
|
403
414
|
/**
|
|
404
415
|
* This function provides a safe way to read a value at a particular index from a `Chunk`.
|
|
405
416
|
*
|
|
406
|
-
*
|
|
417
|
+
* **Example** (Accessing elements safely)
|
|
418
|
+
*
|
|
407
419
|
* ```ts
|
|
408
420
|
* import { Chunk } from "effect"
|
|
409
421
|
*
|
|
@@ -425,7 +437,8 @@ export declare const get: {
|
|
|
425
437
|
/**
|
|
426
438
|
* This function provides a safe way to read a value at a particular index from a `Chunk`.
|
|
427
439
|
*
|
|
428
|
-
*
|
|
440
|
+
* **Example** (Accessing elements safely)
|
|
441
|
+
*
|
|
429
442
|
* ```ts
|
|
430
443
|
* import { Chunk } from "effect"
|
|
431
444
|
*
|
|
@@ -448,7 +461,8 @@ export declare const get: {
|
|
|
448
461
|
/**
|
|
449
462
|
* Wraps an array into a chunk without copying, unsafe on mutable arrays
|
|
450
463
|
*
|
|
451
|
-
*
|
|
464
|
+
* **Example** (Creating chunks without copying arrays)
|
|
465
|
+
*
|
|
452
466
|
* ```ts
|
|
453
467
|
* import { Chunk } from "effect"
|
|
454
468
|
*
|
|
@@ -461,17 +475,17 @@ export declare const get: {
|
|
|
461
475
|
* console.log(Chunk.toArray(chunk)) // [999, 2, 3, 4, 5]
|
|
462
476
|
* ```
|
|
463
477
|
*
|
|
464
|
-
* @since 2.0.0
|
|
465
478
|
* @category unsafe
|
|
479
|
+
* @since 4.0.0
|
|
466
480
|
*/
|
|
467
481
|
export declare const fromArrayUnsafe: <A>(self: ReadonlyArray<A>) => Chunk<A>;
|
|
468
482
|
/**
|
|
469
483
|
* Wraps an array into a chunk without copying, unsafe on mutable arrays
|
|
470
484
|
*
|
|
471
|
-
*
|
|
485
|
+
* **Example** (Creating non-empty chunks without copying arrays)
|
|
486
|
+
*
|
|
472
487
|
* ```ts
|
|
473
|
-
* import { Chunk } from "effect"
|
|
474
|
-
* import * as Array from "effect/Array"
|
|
488
|
+
* import { Array, Chunk } from "effect"
|
|
475
489
|
*
|
|
476
490
|
* const nonEmptyArray = Array.make(1, 2, 3, 4, 5)
|
|
477
491
|
* const chunk = Chunk.fromNonEmptyArrayUnsafe(nonEmptyArray)
|
|
@@ -481,87 +495,79 @@ export declare const fromArrayUnsafe: <A>(self: ReadonlyArray<A>) => Chunk<A>;
|
|
|
481
495
|
* console.log(Chunk.isNonEmpty(chunk)) // true
|
|
482
496
|
* ```
|
|
483
497
|
*
|
|
484
|
-
* @since 2.0.0
|
|
485
498
|
* @category unsafe
|
|
499
|
+
* @since 4.0.0
|
|
486
500
|
*/
|
|
487
501
|
export declare const fromNonEmptyArrayUnsafe: <A>(self: NonEmptyReadonlyArray<A>) => NonEmptyChunk<A>;
|
|
488
502
|
/**
|
|
489
503
|
* Gets an element unsafely, will throw on out of bounds
|
|
490
504
|
*
|
|
491
|
-
*
|
|
505
|
+
* **Example** (Accessing elements unsafely)
|
|
506
|
+
*
|
|
492
507
|
* ```ts
|
|
493
|
-
* import { Chunk } from "effect"
|
|
508
|
+
* import { Chunk, Option } from "effect"
|
|
494
509
|
*
|
|
495
510
|
* const chunk = Chunk.make("a", "b", "c", "d")
|
|
496
511
|
*
|
|
497
512
|
* console.log(Chunk.getUnsafe(chunk, 1)) // "b"
|
|
498
513
|
* console.log(Chunk.getUnsafe(chunk, 3)) // "d"
|
|
499
514
|
*
|
|
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
|
-
* }
|
|
515
|
+
* // Use Chunk.get when the index may be out of bounds
|
|
516
|
+
* console.log(Option.isNone(Chunk.get(chunk, 10))) // true
|
|
506
517
|
* ```
|
|
507
518
|
*
|
|
508
|
-
* @since 2.0.0
|
|
509
519
|
* @category unsafe
|
|
520
|
+
* @since 4.0.0
|
|
510
521
|
*/
|
|
511
522
|
export declare const getUnsafe: {
|
|
512
523
|
/**
|
|
513
524
|
* Gets an element unsafely, will throw on out of bounds
|
|
514
525
|
*
|
|
515
|
-
*
|
|
526
|
+
* **Example** (Accessing elements unsafely)
|
|
527
|
+
*
|
|
516
528
|
* ```ts
|
|
517
|
-
* import { Chunk } from "effect"
|
|
529
|
+
* import { Chunk, Option } from "effect"
|
|
518
530
|
*
|
|
519
531
|
* const chunk = Chunk.make("a", "b", "c", "d")
|
|
520
532
|
*
|
|
521
533
|
* console.log(Chunk.getUnsafe(chunk, 1)) // "b"
|
|
522
534
|
* console.log(Chunk.getUnsafe(chunk, 3)) // "d"
|
|
523
535
|
*
|
|
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
|
-
* }
|
|
536
|
+
* // Use Chunk.get when the index may be out of bounds
|
|
537
|
+
* console.log(Option.isNone(Chunk.get(chunk, 10))) // true
|
|
530
538
|
* ```
|
|
531
539
|
*
|
|
532
|
-
* @since 2.0.0
|
|
533
540
|
* @category unsafe
|
|
541
|
+
* @since 4.0.0
|
|
534
542
|
*/
|
|
535
543
|
(index: number): <A>(self: Chunk<A>) => A;
|
|
536
544
|
/**
|
|
537
545
|
* Gets an element unsafely, will throw on out of bounds
|
|
538
546
|
*
|
|
539
|
-
*
|
|
547
|
+
* **Example** (Accessing elements unsafely)
|
|
548
|
+
*
|
|
540
549
|
* ```ts
|
|
541
|
-
* import { Chunk } from "effect"
|
|
550
|
+
* import { Chunk, Option } from "effect"
|
|
542
551
|
*
|
|
543
552
|
* const chunk = Chunk.make("a", "b", "c", "d")
|
|
544
553
|
*
|
|
545
554
|
* console.log(Chunk.getUnsafe(chunk, 1)) // "b"
|
|
546
555
|
* console.log(Chunk.getUnsafe(chunk, 3)) // "d"
|
|
547
556
|
*
|
|
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
|
-
* }
|
|
557
|
+
* // Use Chunk.get when the index may be out of bounds
|
|
558
|
+
* console.log(Option.isNone(Chunk.get(chunk, 10))) // true
|
|
554
559
|
* ```
|
|
555
560
|
*
|
|
556
|
-
* @since 2.0.0
|
|
557
561
|
* @category unsafe
|
|
562
|
+
* @since 4.0.0
|
|
558
563
|
*/
|
|
559
564
|
<A>(self: Chunk<A>, index: number): A;
|
|
560
565
|
};
|
|
561
566
|
/**
|
|
562
567
|
* Appends the specified element to the end of the `Chunk`.
|
|
563
568
|
*
|
|
564
|
-
*
|
|
569
|
+
* **Example** (Appending an element)
|
|
570
|
+
*
|
|
565
571
|
* ```ts
|
|
566
572
|
* import { Chunk } from "effect"
|
|
567
573
|
*
|
|
@@ -582,7 +588,8 @@ export declare const append: {
|
|
|
582
588
|
/**
|
|
583
589
|
* Appends the specified element to the end of the `Chunk`.
|
|
584
590
|
*
|
|
585
|
-
*
|
|
591
|
+
* **Example** (Appending an element)
|
|
592
|
+
*
|
|
586
593
|
* ```ts
|
|
587
594
|
* import { Chunk } from "effect"
|
|
588
595
|
*
|
|
@@ -603,7 +610,8 @@ export declare const append: {
|
|
|
603
610
|
/**
|
|
604
611
|
* Appends the specified element to the end of the `Chunk`.
|
|
605
612
|
*
|
|
606
|
-
*
|
|
613
|
+
* **Example** (Appending an element)
|
|
614
|
+
*
|
|
607
615
|
* ```ts
|
|
608
616
|
* import { Chunk } from "effect"
|
|
609
617
|
*
|
|
@@ -625,7 +633,8 @@ export declare const append: {
|
|
|
625
633
|
/**
|
|
626
634
|
* Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
|
|
627
635
|
*
|
|
628
|
-
*
|
|
636
|
+
* **Example** (Prepending an element)
|
|
637
|
+
*
|
|
629
638
|
* ```ts
|
|
630
639
|
* import { Chunk } from "effect"
|
|
631
640
|
*
|
|
@@ -646,7 +655,8 @@ export declare const prepend: {
|
|
|
646
655
|
/**
|
|
647
656
|
* Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
|
|
648
657
|
*
|
|
649
|
-
*
|
|
658
|
+
* **Example** (Prepending an element)
|
|
659
|
+
*
|
|
650
660
|
* ```ts
|
|
651
661
|
* import { Chunk } from "effect"
|
|
652
662
|
*
|
|
@@ -667,7 +677,8 @@ export declare const prepend: {
|
|
|
667
677
|
/**
|
|
668
678
|
* Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
|
|
669
679
|
*
|
|
670
|
-
*
|
|
680
|
+
* **Example** (Prepending an element)
|
|
681
|
+
*
|
|
671
682
|
* ```ts
|
|
672
683
|
* import { Chunk } from "effect"
|
|
673
684
|
*
|
|
@@ -689,14 +700,14 @@ export declare const prepend: {
|
|
|
689
700
|
/**
|
|
690
701
|
* Takes the first up to `n` elements from the chunk.
|
|
691
702
|
*
|
|
692
|
-
*
|
|
703
|
+
* **Example** (Taking elements from the start)
|
|
704
|
+
*
|
|
693
705
|
* ```ts
|
|
694
706
|
* import { Chunk } from "effect"
|
|
695
707
|
*
|
|
696
708
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
697
709
|
* const result = Chunk.take(chunk, 3)
|
|
698
|
-
* console.log(result)
|
|
699
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
710
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
700
711
|
* ```
|
|
701
712
|
*
|
|
702
713
|
* @category elements
|
|
@@ -706,14 +717,14 @@ export declare const take: {
|
|
|
706
717
|
/**
|
|
707
718
|
* Takes the first up to `n` elements from the chunk.
|
|
708
719
|
*
|
|
709
|
-
*
|
|
720
|
+
* **Example** (Taking elements from the start)
|
|
721
|
+
*
|
|
710
722
|
* ```ts
|
|
711
723
|
* import { Chunk } from "effect"
|
|
712
724
|
*
|
|
713
725
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
714
726
|
* const result = Chunk.take(chunk, 3)
|
|
715
|
-
* console.log(result)
|
|
716
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
727
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
717
728
|
* ```
|
|
718
729
|
*
|
|
719
730
|
* @category elements
|
|
@@ -723,14 +734,14 @@ export declare const take: {
|
|
|
723
734
|
/**
|
|
724
735
|
* Takes the first up to `n` elements from the chunk.
|
|
725
736
|
*
|
|
726
|
-
*
|
|
737
|
+
* **Example** (Taking elements from the start)
|
|
738
|
+
*
|
|
727
739
|
* ```ts
|
|
728
740
|
* import { Chunk } from "effect"
|
|
729
741
|
*
|
|
730
742
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
731
743
|
* const result = Chunk.take(chunk, 3)
|
|
732
|
-
* console.log(result)
|
|
733
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
744
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
734
745
|
* ```
|
|
735
746
|
*
|
|
736
747
|
* @category elements
|
|
@@ -741,14 +752,14 @@ export declare const take: {
|
|
|
741
752
|
/**
|
|
742
753
|
* Drops the first up to `n` elements from the chunk.
|
|
743
754
|
*
|
|
744
|
-
*
|
|
755
|
+
* **Example** (Dropping elements from the start)
|
|
756
|
+
*
|
|
745
757
|
* ```ts
|
|
746
758
|
* import { Chunk } from "effect"
|
|
747
759
|
*
|
|
748
760
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
749
761
|
* const result = Chunk.drop(chunk, 2)
|
|
750
|
-
* console.log(result)
|
|
751
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
762
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
752
763
|
* ```
|
|
753
764
|
*
|
|
754
765
|
* @category elements
|
|
@@ -758,14 +769,14 @@ export declare const drop: {
|
|
|
758
769
|
/**
|
|
759
770
|
* Drops the first up to `n` elements from the chunk.
|
|
760
771
|
*
|
|
761
|
-
*
|
|
772
|
+
* **Example** (Dropping elements from the start)
|
|
773
|
+
*
|
|
762
774
|
* ```ts
|
|
763
775
|
* import { Chunk } from "effect"
|
|
764
776
|
*
|
|
765
777
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
766
778
|
* const result = Chunk.drop(chunk, 2)
|
|
767
|
-
* console.log(result)
|
|
768
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
779
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
769
780
|
* ```
|
|
770
781
|
*
|
|
771
782
|
* @category elements
|
|
@@ -775,14 +786,14 @@ export declare const drop: {
|
|
|
775
786
|
/**
|
|
776
787
|
* Drops the first up to `n` elements from the chunk.
|
|
777
788
|
*
|
|
778
|
-
*
|
|
789
|
+
* **Example** (Dropping elements from the start)
|
|
790
|
+
*
|
|
779
791
|
* ```ts
|
|
780
792
|
* import { Chunk } from "effect"
|
|
781
793
|
*
|
|
782
794
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
783
795
|
* const result = Chunk.drop(chunk, 2)
|
|
784
|
-
* console.log(result)
|
|
785
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
796
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
786
797
|
* ```
|
|
787
798
|
*
|
|
788
799
|
* @category elements
|
|
@@ -793,14 +804,14 @@ export declare const drop: {
|
|
|
793
804
|
/**
|
|
794
805
|
* Drops the last `n` elements.
|
|
795
806
|
*
|
|
796
|
-
*
|
|
807
|
+
* **Example** (Dropping elements from the end)
|
|
808
|
+
*
|
|
797
809
|
* ```ts
|
|
798
810
|
* import { Chunk } from "effect"
|
|
799
811
|
*
|
|
800
812
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
801
813
|
* const result = Chunk.dropRight(chunk, 2)
|
|
802
|
-
* console.log(result)
|
|
803
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
814
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
804
815
|
* ```
|
|
805
816
|
*
|
|
806
817
|
* @category elements
|
|
@@ -810,14 +821,14 @@ export declare const dropRight: {
|
|
|
810
821
|
/**
|
|
811
822
|
* Drops the last `n` elements.
|
|
812
823
|
*
|
|
813
|
-
*
|
|
824
|
+
* **Example** (Dropping elements from the end)
|
|
825
|
+
*
|
|
814
826
|
* ```ts
|
|
815
827
|
* import { Chunk } from "effect"
|
|
816
828
|
*
|
|
817
829
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
818
830
|
* const result = Chunk.dropRight(chunk, 2)
|
|
819
|
-
* console.log(result)
|
|
820
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
831
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
821
832
|
* ```
|
|
822
833
|
*
|
|
823
834
|
* @category elements
|
|
@@ -827,14 +838,14 @@ export declare const dropRight: {
|
|
|
827
838
|
/**
|
|
828
839
|
* Drops the last `n` elements.
|
|
829
840
|
*
|
|
830
|
-
*
|
|
841
|
+
* **Example** (Dropping elements from the end)
|
|
842
|
+
*
|
|
831
843
|
* ```ts
|
|
832
844
|
* import { Chunk } from "effect"
|
|
833
845
|
*
|
|
834
846
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
835
847
|
* const result = Chunk.dropRight(chunk, 2)
|
|
836
|
-
* console.log(result)
|
|
837
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3 ] }
|
|
848
|
+
* console.log(Chunk.toArray(result)) // [1, 2, 3]
|
|
838
849
|
* ```
|
|
839
850
|
*
|
|
840
851
|
* @category elements
|
|
@@ -845,14 +856,14 @@ export declare const dropRight: {
|
|
|
845
856
|
/**
|
|
846
857
|
* Drops all elements so long as the predicate returns true.
|
|
847
858
|
*
|
|
848
|
-
*
|
|
859
|
+
* **Example** (Dropping elements while a predicate matches)
|
|
860
|
+
*
|
|
849
861
|
* ```ts
|
|
850
862
|
* import { Chunk } from "effect"
|
|
851
863
|
*
|
|
852
864
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
853
865
|
* const result = Chunk.dropWhile(chunk, (n) => n < 3)
|
|
854
|
-
* console.log(result)
|
|
855
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
866
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
856
867
|
* ```
|
|
857
868
|
*
|
|
858
869
|
* @category elements
|
|
@@ -862,14 +873,14 @@ export declare const dropWhile: {
|
|
|
862
873
|
/**
|
|
863
874
|
* Drops all elements so long as the predicate returns true.
|
|
864
875
|
*
|
|
865
|
-
*
|
|
876
|
+
* **Example** (Dropping elements while a predicate matches)
|
|
877
|
+
*
|
|
866
878
|
* ```ts
|
|
867
879
|
* import { Chunk } from "effect"
|
|
868
880
|
*
|
|
869
881
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
870
882
|
* const result = Chunk.dropWhile(chunk, (n) => n < 3)
|
|
871
|
-
* console.log(result)
|
|
872
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
883
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
873
884
|
* ```
|
|
874
885
|
*
|
|
875
886
|
* @category elements
|
|
@@ -879,14 +890,14 @@ export declare const dropWhile: {
|
|
|
879
890
|
/**
|
|
880
891
|
* Drops all elements so long as the predicate returns true.
|
|
881
892
|
*
|
|
882
|
-
*
|
|
893
|
+
* **Example** (Dropping elements while a predicate matches)
|
|
894
|
+
*
|
|
883
895
|
* ```ts
|
|
884
896
|
* import { Chunk } from "effect"
|
|
885
897
|
*
|
|
886
898
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
887
899
|
* const result = Chunk.dropWhile(chunk, (n) => n < 3)
|
|
888
|
-
* console.log(result)
|
|
889
|
-
* // { _id: 'Chunk', values: [ 3, 4, 5 ] }
|
|
900
|
+
* console.log(Chunk.toArray(result)) // [3, 4, 5]
|
|
890
901
|
* ```
|
|
891
902
|
*
|
|
892
903
|
* @category elements
|
|
@@ -898,7 +909,7 @@ export declare const dropWhile: {
|
|
|
898
909
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
899
910
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
900
911
|
*
|
|
901
|
-
*
|
|
912
|
+
* **Example** (Prepending all elements)
|
|
902
913
|
*
|
|
903
914
|
* ```ts
|
|
904
915
|
* import { Chunk } from "effect"
|
|
@@ -920,7 +931,7 @@ export declare const prependAll: {
|
|
|
920
931
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
921
932
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
922
933
|
*
|
|
923
|
-
*
|
|
934
|
+
* **Example** (Prepending all elements)
|
|
924
935
|
*
|
|
925
936
|
* ```ts
|
|
926
937
|
* import { Chunk } from "effect"
|
|
@@ -942,7 +953,7 @@ export declare const prependAll: {
|
|
|
942
953
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
943
954
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
944
955
|
*
|
|
945
|
-
*
|
|
956
|
+
* **Example** (Prepending all elements)
|
|
946
957
|
*
|
|
947
958
|
* ```ts
|
|
948
959
|
* import { Chunk } from "effect"
|
|
@@ -964,7 +975,7 @@ export declare const prependAll: {
|
|
|
964
975
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
965
976
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
966
977
|
*
|
|
967
|
-
*
|
|
978
|
+
* **Example** (Prepending all elements)
|
|
968
979
|
*
|
|
969
980
|
* ```ts
|
|
970
981
|
* import { Chunk } from "effect"
|
|
@@ -986,7 +997,7 @@ export declare const prependAll: {
|
|
|
986
997
|
* Prepends the specified prefix chunk to the beginning of the specified chunk.
|
|
987
998
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
988
999
|
*
|
|
989
|
-
*
|
|
1000
|
+
* **Example** (Prepending all elements)
|
|
990
1001
|
*
|
|
991
1002
|
* ```ts
|
|
992
1003
|
* import { Chunk } from "effect"
|
|
@@ -1009,7 +1020,7 @@ export declare const prependAll: {
|
|
|
1009
1020
|
* Concatenates two chunks, combining their elements.
|
|
1010
1021
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1011
1022
|
*
|
|
1012
|
-
*
|
|
1023
|
+
* **Example** (Appending all elements)
|
|
1013
1024
|
*
|
|
1014
1025
|
* ```ts
|
|
1015
1026
|
* import { Chunk } from "effect"
|
|
@@ -1031,7 +1042,7 @@ export declare const appendAll: {
|
|
|
1031
1042
|
* Concatenates two chunks, combining their elements.
|
|
1032
1043
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1033
1044
|
*
|
|
1034
|
-
*
|
|
1045
|
+
* **Example** (Appending all elements)
|
|
1035
1046
|
*
|
|
1036
1047
|
* ```ts
|
|
1037
1048
|
* import { Chunk } from "effect"
|
|
@@ -1053,7 +1064,7 @@ export declare const appendAll: {
|
|
|
1053
1064
|
* Concatenates two chunks, combining their elements.
|
|
1054
1065
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1055
1066
|
*
|
|
1056
|
-
*
|
|
1067
|
+
* **Example** (Appending all elements)
|
|
1057
1068
|
*
|
|
1058
1069
|
* ```ts
|
|
1059
1070
|
* import { Chunk } from "effect"
|
|
@@ -1075,7 +1086,7 @@ export declare const appendAll: {
|
|
|
1075
1086
|
* Concatenates two chunks, combining their elements.
|
|
1076
1087
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1077
1088
|
*
|
|
1078
|
-
*
|
|
1089
|
+
* **Example** (Appending all elements)
|
|
1079
1090
|
*
|
|
1080
1091
|
* ```ts
|
|
1081
1092
|
* import { Chunk } from "effect"
|
|
@@ -1097,7 +1108,7 @@ export declare const appendAll: {
|
|
|
1097
1108
|
* Concatenates two chunks, combining their elements.
|
|
1098
1109
|
* If either chunk is non-empty, the result is also a non-empty chunk.
|
|
1099
1110
|
*
|
|
1100
|
-
*
|
|
1111
|
+
* **Example** (Appending all elements)
|
|
1101
1112
|
*
|
|
1102
1113
|
* ```ts
|
|
1103
1114
|
* import { Chunk } from "effect"
|
|
@@ -1119,10 +1130,10 @@ export declare const appendAll: {
|
|
|
1119
1130
|
/**
|
|
1120
1131
|
* Returns a filtered and mapped subset of the elements.
|
|
1121
1132
|
*
|
|
1122
|
-
*
|
|
1133
|
+
* **Example** (Filtering and mapping values)
|
|
1134
|
+
*
|
|
1123
1135
|
* ```ts
|
|
1124
|
-
* import { Chunk } from "effect"
|
|
1125
|
-
* import * as Result from "effect/Result"
|
|
1136
|
+
* import { Chunk, Result } from "effect"
|
|
1126
1137
|
*
|
|
1127
1138
|
* const chunk = Chunk.make("1", "2", "hello", "3", "world")
|
|
1128
1139
|
* const numbers = Chunk.filterMap(chunk, (str) => {
|
|
@@ -1139,17 +1150,17 @@ export declare const appendAll: {
|
|
|
1139
1150
|
* console.log(Chunk.toArray(evenIndexNumbers)) // [1]
|
|
1140
1151
|
* ```
|
|
1141
1152
|
*
|
|
1142
|
-
* @since 2.0.0
|
|
1143
1153
|
* @category filtering
|
|
1154
|
+
* @since 2.0.0
|
|
1144
1155
|
*/
|
|
1145
1156
|
export declare const filterMap: {
|
|
1146
1157
|
/**
|
|
1147
1158
|
* Returns a filtered and mapped subset of the elements.
|
|
1148
1159
|
*
|
|
1149
|
-
*
|
|
1160
|
+
* **Example** (Filtering and mapping values)
|
|
1161
|
+
*
|
|
1150
1162
|
* ```ts
|
|
1151
|
-
* import { Chunk } from "effect"
|
|
1152
|
-
* import * as Result from "effect/Result"
|
|
1163
|
+
* import { Chunk, Result } from "effect"
|
|
1153
1164
|
*
|
|
1154
1165
|
* const chunk = Chunk.make("1", "2", "hello", "3", "world")
|
|
1155
1166
|
* const numbers = Chunk.filterMap(chunk, (str) => {
|
|
@@ -1166,17 +1177,17 @@ export declare const filterMap: {
|
|
|
1166
1177
|
* console.log(Chunk.toArray(evenIndexNumbers)) // [1]
|
|
1167
1178
|
* ```
|
|
1168
1179
|
*
|
|
1169
|
-
* @since 2.0.0
|
|
1170
1180
|
* @category filtering
|
|
1181
|
+
* @since 2.0.0
|
|
1171
1182
|
*/
|
|
1172
1183
|
<A, B, X>(f: (input: A, i: number) => Result<B, X>): (self: Chunk<A>) => Chunk<B>;
|
|
1173
1184
|
/**
|
|
1174
1185
|
* Returns a filtered and mapped subset of the elements.
|
|
1175
1186
|
*
|
|
1176
|
-
*
|
|
1187
|
+
* **Example** (Filtering and mapping values)
|
|
1188
|
+
*
|
|
1177
1189
|
* ```ts
|
|
1178
|
-
* import { Chunk } from "effect"
|
|
1179
|
-
* import * as Result from "effect/Result"
|
|
1190
|
+
* import { Chunk, Result } from "effect"
|
|
1180
1191
|
*
|
|
1181
1192
|
* const chunk = Chunk.make("1", "2", "hello", "3", "world")
|
|
1182
1193
|
* const numbers = Chunk.filterMap(chunk, (str) => {
|
|
@@ -1193,15 +1204,16 @@ export declare const filterMap: {
|
|
|
1193
1204
|
* console.log(Chunk.toArray(evenIndexNumbers)) // [1]
|
|
1194
1205
|
* ```
|
|
1195
1206
|
*
|
|
1196
|
-
* @since 2.0.0
|
|
1197
1207
|
* @category filtering
|
|
1208
|
+
* @since 2.0.0
|
|
1198
1209
|
*/
|
|
1199
1210
|
<A, B, X>(self: Chunk<A>, f: (input: A, i: number) => Result<B, X>): Chunk<B>;
|
|
1200
1211
|
};
|
|
1201
1212
|
/**
|
|
1202
1213
|
* Returns a filtered subset of the elements.
|
|
1203
1214
|
*
|
|
1204
|
-
*
|
|
1215
|
+
* **Example** (Filtering values)
|
|
1216
|
+
*
|
|
1205
1217
|
* ```ts
|
|
1206
1218
|
* import { Chunk } from "effect"
|
|
1207
1219
|
*
|
|
@@ -1215,14 +1227,15 @@ export declare const filterMap: {
|
|
|
1215
1227
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1216
1228
|
* ```
|
|
1217
1229
|
*
|
|
1218
|
-
* @since 2.0.0
|
|
1219
1230
|
* @category filtering
|
|
1231
|
+
* @since 2.0.0
|
|
1220
1232
|
*/
|
|
1221
1233
|
export declare const filter: {
|
|
1222
1234
|
/**
|
|
1223
1235
|
* Returns a filtered subset of the elements.
|
|
1224
1236
|
*
|
|
1225
|
-
*
|
|
1237
|
+
* **Example** (Filtering values)
|
|
1238
|
+
*
|
|
1226
1239
|
* ```ts
|
|
1227
1240
|
* import { Chunk } from "effect"
|
|
1228
1241
|
*
|
|
@@ -1236,14 +1249,15 @@ export declare const filter: {
|
|
|
1236
1249
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1237
1250
|
* ```
|
|
1238
1251
|
*
|
|
1239
|
-
* @since 2.0.0
|
|
1240
1252
|
* @category filtering
|
|
1253
|
+
* @since 2.0.0
|
|
1241
1254
|
*/
|
|
1242
1255
|
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Chunk<B>;
|
|
1243
1256
|
/**
|
|
1244
1257
|
* Returns a filtered subset of the elements.
|
|
1245
1258
|
*
|
|
1246
|
-
*
|
|
1259
|
+
* **Example** (Filtering values)
|
|
1260
|
+
*
|
|
1247
1261
|
* ```ts
|
|
1248
1262
|
* import { Chunk } from "effect"
|
|
1249
1263
|
*
|
|
@@ -1257,14 +1271,15 @@ export declare const filter: {
|
|
|
1257
1271
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1258
1272
|
* ```
|
|
1259
1273
|
*
|
|
1260
|
-
* @since 2.0.0
|
|
1261
1274
|
* @category filtering
|
|
1275
|
+
* @since 2.0.0
|
|
1262
1276
|
*/
|
|
1263
1277
|
<A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Chunk<A>;
|
|
1264
1278
|
/**
|
|
1265
1279
|
* Returns a filtered subset of the elements.
|
|
1266
1280
|
*
|
|
1267
|
-
*
|
|
1281
|
+
* **Example** (Filtering values)
|
|
1282
|
+
*
|
|
1268
1283
|
* ```ts
|
|
1269
1284
|
* import { Chunk } from "effect"
|
|
1270
1285
|
*
|
|
@@ -1278,14 +1293,15 @@ export declare const filter: {
|
|
|
1278
1293
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1279
1294
|
* ```
|
|
1280
1295
|
*
|
|
1281
|
-
* @since 2.0.0
|
|
1282
1296
|
* @category filtering
|
|
1297
|
+
* @since 2.0.0
|
|
1283
1298
|
*/
|
|
1284
1299
|
<A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Chunk<B>;
|
|
1285
1300
|
/**
|
|
1286
1301
|
* Returns a filtered subset of the elements.
|
|
1287
1302
|
*
|
|
1288
|
-
*
|
|
1303
|
+
* **Example** (Filtering values)
|
|
1304
|
+
*
|
|
1289
1305
|
* ```ts
|
|
1290
1306
|
* import { Chunk } from "effect"
|
|
1291
1307
|
*
|
|
@@ -1299,18 +1315,18 @@ export declare const filter: {
|
|
|
1299
1315
|
* console.log(Chunk.toArray(numbers)) // [42, 100]
|
|
1300
1316
|
* ```
|
|
1301
1317
|
*
|
|
1302
|
-
* @since 2.0.0
|
|
1303
1318
|
* @category filtering
|
|
1319
|
+
* @since 2.0.0
|
|
1304
1320
|
*/
|
|
1305
1321
|
<A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A>;
|
|
1306
1322
|
};
|
|
1307
1323
|
/**
|
|
1308
1324
|
* Transforms all elements of the chunk for as long as the specified function succeeds.
|
|
1309
1325
|
*
|
|
1310
|
-
*
|
|
1326
|
+
* **Example** (Filtering and mapping while values match)
|
|
1327
|
+
*
|
|
1311
1328
|
* ```ts
|
|
1312
|
-
* import { Chunk } from "effect"
|
|
1313
|
-
* import * as Result from "effect/Result"
|
|
1329
|
+
* import { Chunk, Result } from "effect"
|
|
1314
1330
|
*
|
|
1315
1331
|
* const chunk = Chunk.make("1", "2", "hello", "3", "4")
|
|
1316
1332
|
* const result = Chunk.filterMapWhile(chunk, (s) => {
|
|
@@ -1328,17 +1344,17 @@ export declare const filter: {
|
|
|
1328
1344
|
* console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
|
|
1329
1345
|
* ```
|
|
1330
1346
|
*
|
|
1331
|
-
* @since 2.0.0
|
|
1332
1347
|
* @category filtering
|
|
1348
|
+
* @since 2.0.0
|
|
1333
1349
|
*/
|
|
1334
1350
|
export declare const filterMapWhile: {
|
|
1335
1351
|
/**
|
|
1336
1352
|
* Transforms all elements of the chunk for as long as the specified function succeeds.
|
|
1337
1353
|
*
|
|
1338
|
-
*
|
|
1354
|
+
* **Example** (Filtering and mapping while values match)
|
|
1355
|
+
*
|
|
1339
1356
|
* ```ts
|
|
1340
|
-
* import { Chunk } from "effect"
|
|
1341
|
-
* import * as Result from "effect/Result"
|
|
1357
|
+
* import { Chunk, Result } from "effect"
|
|
1342
1358
|
*
|
|
1343
1359
|
* const chunk = Chunk.make("1", "2", "hello", "3", "4")
|
|
1344
1360
|
* const result = Chunk.filterMapWhile(chunk, (s) => {
|
|
@@ -1356,17 +1372,17 @@ export declare const filterMapWhile: {
|
|
|
1356
1372
|
* console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
|
|
1357
1373
|
* ```
|
|
1358
1374
|
*
|
|
1359
|
-
* @since 2.0.0
|
|
1360
1375
|
* @category filtering
|
|
1376
|
+
* @since 2.0.0
|
|
1361
1377
|
*/
|
|
1362
1378
|
<A, B, X>(f: Filter.Filter<A, B, X>): (self: Chunk<A>) => Chunk<B>;
|
|
1363
1379
|
/**
|
|
1364
1380
|
* Transforms all elements of the chunk for as long as the specified function succeeds.
|
|
1365
1381
|
*
|
|
1366
|
-
*
|
|
1382
|
+
* **Example** (Filtering and mapping while values match)
|
|
1383
|
+
*
|
|
1367
1384
|
* ```ts
|
|
1368
|
-
* import { Chunk } from "effect"
|
|
1369
|
-
* import * as Result from "effect/Result"
|
|
1385
|
+
* import { Chunk, Result } from "effect"
|
|
1370
1386
|
*
|
|
1371
1387
|
* const chunk = Chunk.make("1", "2", "hello", "3", "4")
|
|
1372
1388
|
* const result = Chunk.filterMapWhile(chunk, (s) => {
|
|
@@ -1384,23 +1400,22 @@ export declare const filterMapWhile: {
|
|
|
1384
1400
|
* console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
|
|
1385
1401
|
* ```
|
|
1386
1402
|
*
|
|
1387
|
-
* @since 2.0.0
|
|
1388
1403
|
* @category filtering
|
|
1404
|
+
* @since 2.0.0
|
|
1389
1405
|
*/
|
|
1390
1406
|
<A, B, X>(self: Chunk<A>, f: Filter.Filter<A, B, X>): Chunk<B>;
|
|
1391
1407
|
};
|
|
1392
1408
|
/**
|
|
1393
1409
|
* Filter out optional values
|
|
1394
1410
|
*
|
|
1395
|
-
*
|
|
1411
|
+
* **Example** (Compacting optional values)
|
|
1412
|
+
*
|
|
1396
1413
|
* ```ts
|
|
1397
|
-
* import { Chunk } from "effect"
|
|
1398
|
-
* import * as Option from "effect/Option"
|
|
1414
|
+
* import { Chunk, Option } from "effect"
|
|
1399
1415
|
*
|
|
1400
1416
|
* const chunk = Chunk.make(Option.some(1), Option.none(), Option.some(3))
|
|
1401
1417
|
* const result = Chunk.compact(chunk)
|
|
1402
|
-
* console.log(result)
|
|
1403
|
-
* // { _id: 'Chunk', values: [ 1, 3 ] }
|
|
1418
|
+
* console.log(Chunk.toArray(result)) // [1, 3]
|
|
1404
1419
|
* ```
|
|
1405
1420
|
*
|
|
1406
1421
|
* @category filtering
|
|
@@ -1410,7 +1425,8 @@ export declare const compact: <A>(self: Chunk<Option<A>>) => Chunk<A>;
|
|
|
1410
1425
|
/**
|
|
1411
1426
|
* Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
|
|
1412
1427
|
*
|
|
1413
|
-
*
|
|
1428
|
+
* **Example** (Flat mapping chunks)
|
|
1429
|
+
*
|
|
1414
1430
|
* ```ts
|
|
1415
1431
|
* import { Chunk } from "effect"
|
|
1416
1432
|
*
|
|
@@ -1431,14 +1447,15 @@ export declare const compact: <A>(self: Chunk<Option<A>>) => Chunk<A>;
|
|
|
1431
1447
|
* console.log(Chunk.toArray(indexed)) // [1, 3, 5]
|
|
1432
1448
|
* ```
|
|
1433
1449
|
*
|
|
1434
|
-
* @since 2.0.0
|
|
1435
1450
|
* @category sequencing
|
|
1451
|
+
* @since 2.0.0
|
|
1436
1452
|
*/
|
|
1437
1453
|
export declare const flatMap: {
|
|
1438
1454
|
/**
|
|
1439
1455
|
* Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
|
|
1440
1456
|
*
|
|
1441
|
-
*
|
|
1457
|
+
* **Example** (Flat mapping chunks)
|
|
1458
|
+
*
|
|
1442
1459
|
* ```ts
|
|
1443
1460
|
* import { Chunk } from "effect"
|
|
1444
1461
|
*
|
|
@@ -1459,14 +1476,15 @@ export declare const flatMap: {
|
|
|
1459
1476
|
* console.log(Chunk.toArray(indexed)) // [1, 3, 5]
|
|
1460
1477
|
* ```
|
|
1461
1478
|
*
|
|
1462
|
-
* @since 2.0.0
|
|
1463
1479
|
* @category sequencing
|
|
1480
|
+
* @since 2.0.0
|
|
1464
1481
|
*/
|
|
1465
1482
|
<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
1483
|
/**
|
|
1467
1484
|
* Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
|
|
1468
1485
|
*
|
|
1469
|
-
*
|
|
1486
|
+
* **Example** (Flat mapping chunks)
|
|
1487
|
+
*
|
|
1470
1488
|
* ```ts
|
|
1471
1489
|
* import { Chunk } from "effect"
|
|
1472
1490
|
*
|
|
@@ -1487,14 +1505,15 @@ export declare const flatMap: {
|
|
|
1487
1505
|
* console.log(Chunk.toArray(indexed)) // [1, 3, 5]
|
|
1488
1506
|
* ```
|
|
1489
1507
|
*
|
|
1490
|
-
* @since 2.0.0
|
|
1491
1508
|
* @category sequencing
|
|
1509
|
+
* @since 2.0.0
|
|
1492
1510
|
*/
|
|
1493
1511
|
<A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => NonEmptyChunk<B>): NonEmptyChunk<B>;
|
|
1494
1512
|
/**
|
|
1495
1513
|
* Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
|
|
1496
1514
|
*
|
|
1497
|
-
*
|
|
1515
|
+
* **Example** (Flat mapping chunks)
|
|
1516
|
+
*
|
|
1498
1517
|
* ```ts
|
|
1499
1518
|
* import { Chunk } from "effect"
|
|
1500
1519
|
*
|
|
@@ -1515,8 +1534,8 @@ export declare const flatMap: {
|
|
|
1515
1534
|
* console.log(Chunk.toArray(indexed)) // [1, 3, 5]
|
|
1516
1535
|
* ```
|
|
1517
1536
|
*
|
|
1518
|
-
* @since 2.0.0
|
|
1519
1537
|
* @category sequencing
|
|
1538
|
+
* @since 2.0.0
|
|
1520
1539
|
*/
|
|
1521
1540
|
<A, B>(self: Chunk<A>, f: (a: A, i: number) => Chunk<B>): Chunk<B>;
|
|
1522
1541
|
};
|
|
@@ -1530,7 +1549,8 @@ export declare const flatMap: {
|
|
|
1530
1549
|
* instead, it is primarily used for side effects, such as logging or
|
|
1531
1550
|
* accumulating data in an external variable.
|
|
1532
1551
|
*
|
|
1533
|
-
*
|
|
1552
|
+
* **Example** (Iterating over chunk values)
|
|
1553
|
+
*
|
|
1534
1554
|
* ```ts
|
|
1535
1555
|
* import { Chunk } from "effect"
|
|
1536
1556
|
*
|
|
@@ -1553,8 +1573,8 @@ export declare const flatMap: {
|
|
|
1553
1573
|
* // Index 3: 4
|
|
1554
1574
|
* ```
|
|
1555
1575
|
*
|
|
1556
|
-
* @since 2.0.0
|
|
1557
1576
|
* @category combinators
|
|
1577
|
+
* @since 2.0.0
|
|
1558
1578
|
*/
|
|
1559
1579
|
export declare const forEach: {
|
|
1560
1580
|
/**
|
|
@@ -1567,7 +1587,8 @@ export declare const forEach: {
|
|
|
1567
1587
|
* instead, it is primarily used for side effects, such as logging or
|
|
1568
1588
|
* accumulating data in an external variable.
|
|
1569
1589
|
*
|
|
1570
|
-
*
|
|
1590
|
+
* **Example** (Iterating over chunk values)
|
|
1591
|
+
*
|
|
1571
1592
|
* ```ts
|
|
1572
1593
|
* import { Chunk } from "effect"
|
|
1573
1594
|
*
|
|
@@ -1590,8 +1611,8 @@ export declare const forEach: {
|
|
|
1590
1611
|
* // Index 3: 4
|
|
1591
1612
|
* ```
|
|
1592
1613
|
*
|
|
1593
|
-
* @since 2.0.0
|
|
1594
1614
|
* @category combinators
|
|
1615
|
+
* @since 2.0.0
|
|
1595
1616
|
*/
|
|
1596
1617
|
<A, B>(f: (a: A, index: number) => B): (self: Chunk<A>) => void;
|
|
1597
1618
|
/**
|
|
@@ -1604,7 +1625,8 @@ export declare const forEach: {
|
|
|
1604
1625
|
* instead, it is primarily used for side effects, such as logging or
|
|
1605
1626
|
* accumulating data in an external variable.
|
|
1606
1627
|
*
|
|
1607
|
-
*
|
|
1628
|
+
* **Example** (Iterating over chunk values)
|
|
1629
|
+
*
|
|
1608
1630
|
* ```ts
|
|
1609
1631
|
* import { Chunk } from "effect"
|
|
1610
1632
|
*
|
|
@@ -1627,15 +1649,16 @@ export declare const forEach: {
|
|
|
1627
1649
|
* // Index 3: 4
|
|
1628
1650
|
* ```
|
|
1629
1651
|
*
|
|
1630
|
-
* @since 2.0.0
|
|
1631
1652
|
* @category combinators
|
|
1653
|
+
* @since 2.0.0
|
|
1632
1654
|
*/
|
|
1633
1655
|
<A, B>(self: Chunk<A>, f: (a: A, index: number) => B): void;
|
|
1634
1656
|
};
|
|
1635
1657
|
/**
|
|
1636
1658
|
* Flattens a chunk of chunks into a single chunk by concatenating all chunks.
|
|
1637
1659
|
*
|
|
1638
|
-
*
|
|
1660
|
+
* **Example** (Flattening nested chunks)
|
|
1661
|
+
*
|
|
1639
1662
|
* ```ts
|
|
1640
1663
|
* import { Chunk } from "effect"
|
|
1641
1664
|
*
|
|
@@ -1656,14 +1679,15 @@ export declare const forEach: {
|
|
|
1656
1679
|
* console.log(Chunk.toArray(Chunk.flatten(withEmpty))) // [1, 2, 3, 4]
|
|
1657
1680
|
* ```
|
|
1658
1681
|
*
|
|
1659
|
-
* @since 2.0.0
|
|
1660
1682
|
* @category sequencing
|
|
1683
|
+
* @since 2.0.0
|
|
1661
1684
|
*/
|
|
1662
1685
|
export declare const flatten: <S extends Chunk<Chunk<any>>>(self: S) => Chunk.Flatten<S>;
|
|
1663
1686
|
/**
|
|
1664
1687
|
* Groups elements in chunks of up to `n` elements.
|
|
1665
1688
|
*
|
|
1666
|
-
*
|
|
1689
|
+
* **Example** (Splitting into fixed-size chunks)
|
|
1690
|
+
*
|
|
1667
1691
|
* ```ts
|
|
1668
1692
|
* import { Chunk } from "effect"
|
|
1669
1693
|
*
|
|
@@ -1680,14 +1704,15 @@ export declare const flatten: <S extends Chunk<Chunk<any>>>(self: S) => Chunk.Fl
|
|
|
1680
1704
|
* // [[1, 2], [3, 4], [5]]
|
|
1681
1705
|
* ```
|
|
1682
1706
|
*
|
|
1683
|
-
* @since 2.0.0
|
|
1684
1707
|
* @category elements
|
|
1708
|
+
* @since 2.0.0
|
|
1685
1709
|
*/
|
|
1686
1710
|
export declare const chunksOf: {
|
|
1687
1711
|
/**
|
|
1688
1712
|
* Groups elements in chunks of up to `n` elements.
|
|
1689
1713
|
*
|
|
1690
|
-
*
|
|
1714
|
+
* **Example** (Splitting into fixed-size chunks)
|
|
1715
|
+
*
|
|
1691
1716
|
* ```ts
|
|
1692
1717
|
* import { Chunk } from "effect"
|
|
1693
1718
|
*
|
|
@@ -1704,14 +1729,15 @@ export declare const chunksOf: {
|
|
|
1704
1729
|
* // [[1, 2], [3, 4], [5]]
|
|
1705
1730
|
* ```
|
|
1706
1731
|
*
|
|
1707
|
-
* @since 2.0.0
|
|
1708
1732
|
* @category elements
|
|
1733
|
+
* @since 2.0.0
|
|
1709
1734
|
*/
|
|
1710
1735
|
(n: number): <A>(self: Chunk<A>) => Chunk<Chunk<A>>;
|
|
1711
1736
|
/**
|
|
1712
1737
|
* Groups elements in chunks of up to `n` elements.
|
|
1713
1738
|
*
|
|
1714
|
-
*
|
|
1739
|
+
* **Example** (Splitting into fixed-size chunks)
|
|
1740
|
+
*
|
|
1715
1741
|
* ```ts
|
|
1716
1742
|
* import { Chunk } from "effect"
|
|
1717
1743
|
*
|
|
@@ -1728,8 +1754,8 @@ export declare const chunksOf: {
|
|
|
1728
1754
|
* // [[1, 2], [3, 4], [5]]
|
|
1729
1755
|
* ```
|
|
1730
1756
|
*
|
|
1731
|
-
* @since 2.0.0
|
|
1732
1757
|
* @category elements
|
|
1758
|
+
* @since 2.0.0
|
|
1733
1759
|
*/
|
|
1734
1760
|
<A>(self: Chunk<A>, n: number): Chunk<Chunk<A>>;
|
|
1735
1761
|
};
|
|
@@ -1738,7 +1764,8 @@ export declare const chunksOf: {
|
|
|
1738
1764
|
*
|
|
1739
1765
|
* The order and references of result values are determined by the Chunk.
|
|
1740
1766
|
*
|
|
1741
|
-
*
|
|
1767
|
+
* **Example** (Intersecting chunks)
|
|
1768
|
+
*
|
|
1742
1769
|
* ```ts
|
|
1743
1770
|
* import { Chunk } from "effect"
|
|
1744
1771
|
*
|
|
@@ -1758,8 +1785,8 @@ export declare const chunksOf: {
|
|
|
1758
1785
|
* console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
|
|
1759
1786
|
* ```
|
|
1760
1787
|
*
|
|
1761
|
-
* @since 2.0.0
|
|
1762
1788
|
* @category elements
|
|
1789
|
+
* @since 2.0.0
|
|
1763
1790
|
*/
|
|
1764
1791
|
export declare const intersection: {
|
|
1765
1792
|
/**
|
|
@@ -1767,7 +1794,8 @@ export declare const intersection: {
|
|
|
1767
1794
|
*
|
|
1768
1795
|
* The order and references of result values are determined by the Chunk.
|
|
1769
1796
|
*
|
|
1770
|
-
*
|
|
1797
|
+
* **Example** (Intersecting chunks)
|
|
1798
|
+
*
|
|
1771
1799
|
* ```ts
|
|
1772
1800
|
* import { Chunk } from "effect"
|
|
1773
1801
|
*
|
|
@@ -1787,8 +1815,8 @@ export declare const intersection: {
|
|
|
1787
1815
|
* console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
|
|
1788
1816
|
* ```
|
|
1789
1817
|
*
|
|
1790
|
-
* @since 2.0.0
|
|
1791
1818
|
* @category elements
|
|
1819
|
+
* @since 2.0.0
|
|
1792
1820
|
*/
|
|
1793
1821
|
<A>(that: Chunk<A>): <B>(self: Chunk<B>) => Chunk<A & B>;
|
|
1794
1822
|
/**
|
|
@@ -1796,7 +1824,8 @@ export declare const intersection: {
|
|
|
1796
1824
|
*
|
|
1797
1825
|
* The order and references of result values are determined by the Chunk.
|
|
1798
1826
|
*
|
|
1799
|
-
*
|
|
1827
|
+
* **Example** (Intersecting chunks)
|
|
1828
|
+
*
|
|
1800
1829
|
* ```ts
|
|
1801
1830
|
* import { Chunk } from "effect"
|
|
1802
1831
|
*
|
|
@@ -1816,15 +1845,16 @@ export declare const intersection: {
|
|
|
1816
1845
|
* console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
|
|
1817
1846
|
* ```
|
|
1818
1847
|
*
|
|
1819
|
-
* @since 2.0.0
|
|
1820
1848
|
* @category elements
|
|
1849
|
+
* @since 2.0.0
|
|
1821
1850
|
*/
|
|
1822
1851
|
<A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<A & B>;
|
|
1823
1852
|
};
|
|
1824
1853
|
/**
|
|
1825
1854
|
* Determines if the chunk is empty.
|
|
1826
1855
|
*
|
|
1827
|
-
*
|
|
1856
|
+
* **Example** (Checking for empty chunks)
|
|
1857
|
+
*
|
|
1828
1858
|
* ```ts
|
|
1829
1859
|
* import { Chunk } from "effect"
|
|
1830
1860
|
*
|
|
@@ -1839,7 +1869,8 @@ export declare const isEmpty: <A>(self: Chunk<A>) => boolean;
|
|
|
1839
1869
|
/**
|
|
1840
1870
|
* Determines if the chunk is not empty.
|
|
1841
1871
|
*
|
|
1842
|
-
*
|
|
1872
|
+
* **Example** (Checking for non-empty chunks)
|
|
1873
|
+
*
|
|
1843
1874
|
* ```ts
|
|
1844
1875
|
* import { Chunk } from "effect"
|
|
1845
1876
|
*
|
|
@@ -1854,7 +1885,8 @@ export declare const isNonEmpty: <A>(self: Chunk<A>) => self is NonEmptyChunk<A>
|
|
|
1854
1885
|
/**
|
|
1855
1886
|
* Returns the first element of this chunk if it exists.
|
|
1856
1887
|
*
|
|
1857
|
-
*
|
|
1888
|
+
* **Example** (Getting the first element)
|
|
1889
|
+
*
|
|
1858
1890
|
* ```ts
|
|
1859
1891
|
* import { Chunk } from "effect"
|
|
1860
1892
|
*
|
|
@@ -1871,9 +1903,10 @@ export declare const head: <A>(self: Chunk<A>) => Option<A>;
|
|
|
1871
1903
|
*
|
|
1872
1904
|
* It will throw an error if the chunk is empty.
|
|
1873
1905
|
*
|
|
1874
|
-
*
|
|
1906
|
+
* **Example** (Getting the first element unsafely)
|
|
1907
|
+
*
|
|
1875
1908
|
* ```ts
|
|
1876
|
-
* import { Chunk } from "effect"
|
|
1909
|
+
* import { Chunk, Option } from "effect"
|
|
1877
1910
|
*
|
|
1878
1911
|
* const chunk = Chunk.make(1, 2, 3, 4)
|
|
1879
1912
|
* console.log(Chunk.headUnsafe(chunk)) // 1
|
|
@@ -1881,22 +1914,19 @@ export declare const head: <A>(self: Chunk<A>) => Option<A>;
|
|
|
1881
1914
|
* const singleElement = Chunk.make("hello")
|
|
1882
1915
|
* console.log(Chunk.headUnsafe(singleElement)) // "hello"
|
|
1883
1916
|
*
|
|
1884
|
-
* //
|
|
1885
|
-
*
|
|
1886
|
-
* Chunk.headUnsafe(Chunk.empty())
|
|
1887
|
-
* } catch (error) {
|
|
1888
|
-
* console.log((error as Error).message) // "Index out of bounds"
|
|
1889
|
-
* }
|
|
1917
|
+
* // Use Chunk.head when the chunk may be empty
|
|
1918
|
+
* console.log(Option.isNone(Chunk.head(Chunk.empty()))) // true
|
|
1890
1919
|
* ```
|
|
1891
1920
|
*
|
|
1892
|
-
* @since 2.0.0
|
|
1893
1921
|
* @category unsafe
|
|
1922
|
+
* @since 4.0.0
|
|
1894
1923
|
*/
|
|
1895
1924
|
export declare const headUnsafe: <A>(self: Chunk<A>) => A;
|
|
1896
1925
|
/**
|
|
1897
1926
|
* Returns the first element of this non empty chunk.
|
|
1898
1927
|
*
|
|
1899
|
-
*
|
|
1928
|
+
* **Example** (Getting the first element of a non-empty chunk)
|
|
1929
|
+
*
|
|
1900
1930
|
* ```ts
|
|
1901
1931
|
* import { Chunk } from "effect"
|
|
1902
1932
|
*
|
|
@@ -1910,14 +1940,15 @@ export declare const headUnsafe: <A>(self: Chunk<A>) => A;
|
|
|
1910
1940
|
* // Chunk.headNonEmpty(Chunk.empty()) // TypeScript error
|
|
1911
1941
|
* ```
|
|
1912
1942
|
*
|
|
1913
|
-
* @since 2.0.0
|
|
1914
1943
|
* @category elements
|
|
1944
|
+
* @since 2.0.0
|
|
1915
1945
|
*/
|
|
1916
1946
|
export declare const headNonEmpty: <A>(self: NonEmptyChunk<A>) => A;
|
|
1917
1947
|
/**
|
|
1918
1948
|
* Returns the last element of this chunk if it exists.
|
|
1919
1949
|
*
|
|
1920
|
-
*
|
|
1950
|
+
* **Example** (Getting the last element)
|
|
1951
|
+
*
|
|
1921
1952
|
* ```ts
|
|
1922
1953
|
* import { Chunk } from "effect"
|
|
1923
1954
|
*
|
|
@@ -1934,9 +1965,10 @@ export declare const last: <A>(self: Chunk<A>) => Option<A>;
|
|
|
1934
1965
|
*
|
|
1935
1966
|
* It will throw an error if the chunk is empty.
|
|
1936
1967
|
*
|
|
1937
|
-
*
|
|
1968
|
+
* **Example** (Getting the last element unsafely)
|
|
1969
|
+
*
|
|
1938
1970
|
* ```ts
|
|
1939
|
-
* import { Chunk } from "effect"
|
|
1971
|
+
* import { Chunk, Option } from "effect"
|
|
1940
1972
|
*
|
|
1941
1973
|
* const chunk = Chunk.make(1, 2, 3, 4)
|
|
1942
1974
|
* console.log(Chunk.lastUnsafe(chunk)) // 4
|
|
@@ -1944,22 +1976,19 @@ export declare const last: <A>(self: Chunk<A>) => Option<A>;
|
|
|
1944
1976
|
* const singleElement = Chunk.make("hello")
|
|
1945
1977
|
* console.log(Chunk.lastUnsafe(singleElement)) // "hello"
|
|
1946
1978
|
*
|
|
1947
|
-
* //
|
|
1948
|
-
*
|
|
1949
|
-
* Chunk.lastUnsafe(Chunk.empty())
|
|
1950
|
-
* } catch (error) {
|
|
1951
|
-
* console.log((error as Error).message) // "Index out of bounds"
|
|
1952
|
-
* }
|
|
1979
|
+
* // Use Chunk.last when the chunk may be empty
|
|
1980
|
+
* console.log(Option.isNone(Chunk.last(Chunk.empty()))) // true
|
|
1953
1981
|
* ```
|
|
1954
1982
|
*
|
|
1955
|
-
* @since 2.0.0
|
|
1956
1983
|
* @category unsafe
|
|
1984
|
+
* @since 4.0.0
|
|
1957
1985
|
*/
|
|
1958
1986
|
export declare const lastUnsafe: <A>(self: Chunk<A>) => A;
|
|
1959
1987
|
/**
|
|
1960
1988
|
* Returns the last element of this non empty chunk.
|
|
1961
1989
|
*
|
|
1962
|
-
*
|
|
1990
|
+
* **Example** (Getting the last element of a non-empty chunk)
|
|
1991
|
+
*
|
|
1963
1992
|
* ```ts
|
|
1964
1993
|
* import { Chunk } from "effect"
|
|
1965
1994
|
*
|
|
@@ -1973,14 +2002,15 @@ export declare const lastUnsafe: <A>(self: Chunk<A>) => A;
|
|
|
1973
2002
|
* // Chunk.lastNonEmpty(Chunk.empty()) // TypeScript error
|
|
1974
2003
|
* ```
|
|
1975
2004
|
*
|
|
1976
|
-
* @since 3.4.0
|
|
1977
2005
|
* @category elements
|
|
2006
|
+
* @since 3.4.0
|
|
1978
2007
|
*/
|
|
1979
2008
|
export declare const lastNonEmpty: <A>(self: NonEmptyChunk<A>) => A;
|
|
1980
2009
|
/**
|
|
1981
2010
|
* A namespace containing utility types for Chunk operations.
|
|
1982
2011
|
*
|
|
1983
|
-
*
|
|
2012
|
+
* **Example** (Working with Chunk utility types)
|
|
2013
|
+
*
|
|
1984
2014
|
* ```ts
|
|
1985
2015
|
* import type { Chunk } from "effect"
|
|
1986
2016
|
*
|
|
@@ -1993,14 +2023,14 @@ export declare const lastNonEmpty: <A>(self: NonEmptyChunk<A>) => A;
|
|
|
1993
2023
|
* type WithString = Chunk.Chunk.With<typeof nonEmptyChunk, string> // Chunk.NonEmptyChunk<string>
|
|
1994
2024
|
* ```
|
|
1995
2025
|
*
|
|
1996
|
-
* @category types
|
|
1997
2026
|
* @since 2.0.0
|
|
1998
2027
|
*/
|
|
1999
2028
|
export declare namespace Chunk {
|
|
2000
2029
|
/**
|
|
2001
2030
|
* Infers the element type of a Chunk.
|
|
2002
2031
|
*
|
|
2003
|
-
*
|
|
2032
|
+
* **Example** (Inferring element types)
|
|
2033
|
+
*
|
|
2004
2034
|
* ```ts
|
|
2005
2035
|
* import type { Chunk } from "effect"
|
|
2006
2036
|
*
|
|
@@ -2018,7 +2048,8 @@ export declare namespace Chunk {
|
|
|
2018
2048
|
/**
|
|
2019
2049
|
* Constructs a Chunk type preserving non-emptiness.
|
|
2020
2050
|
*
|
|
2021
|
-
*
|
|
2051
|
+
* **Example** (Preserving non-emptiness)
|
|
2052
|
+
*
|
|
2022
2053
|
* ```ts
|
|
2023
2054
|
* import type { Chunk } from "effect"
|
|
2024
2055
|
*
|
|
@@ -2036,7 +2067,8 @@ export declare namespace Chunk {
|
|
|
2036
2067
|
/**
|
|
2037
2068
|
* Creates a non-empty Chunk if either input is non-empty.
|
|
2038
2069
|
*
|
|
2039
|
-
*
|
|
2070
|
+
* **Example** (Preserving non-emptiness from either input)
|
|
2071
|
+
*
|
|
2040
2072
|
* ```ts
|
|
2041
2073
|
* import type { Chunk } from "effect"
|
|
2042
2074
|
*
|
|
@@ -2067,7 +2099,8 @@ export declare namespace Chunk {
|
|
|
2067
2099
|
/**
|
|
2068
2100
|
* Creates a non-empty Chunk only if both inputs are non-empty.
|
|
2069
2101
|
*
|
|
2070
|
-
*
|
|
2102
|
+
* **Example** (Requiring non-emptiness from both inputs)
|
|
2103
|
+
*
|
|
2071
2104
|
* ```ts
|
|
2072
2105
|
* import type { Chunk } from "effect"
|
|
2073
2106
|
*
|
|
@@ -2098,7 +2131,8 @@ export declare namespace Chunk {
|
|
|
2098
2131
|
/**
|
|
2099
2132
|
* Flattens a nested Chunk type.
|
|
2100
2133
|
*
|
|
2101
|
-
*
|
|
2134
|
+
* **Example** (Flattening nested chunk types)
|
|
2135
|
+
*
|
|
2102
2136
|
* ```ts
|
|
2103
2137
|
* import type { Chunk } from "effect"
|
|
2104
2138
|
*
|
|
@@ -2118,83 +2152,80 @@ export declare namespace Chunk {
|
|
|
2118
2152
|
* Transforms the elements of a chunk using the specified mapping function.
|
|
2119
2153
|
* If the input chunk is non-empty, the resulting chunk will also be non-empty.
|
|
2120
2154
|
*
|
|
2121
|
-
*
|
|
2155
|
+
* **Example** (Mapping values)
|
|
2122
2156
|
*
|
|
2123
2157
|
* ```ts
|
|
2124
2158
|
* import { Chunk } from "effect"
|
|
2125
2159
|
*
|
|
2126
2160
|
* const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
|
|
2127
2161
|
*
|
|
2128
|
-
* console.log(result)
|
|
2129
|
-
* // { _id: 'Chunk', values: [ 2, 3 ] }
|
|
2162
|
+
* console.log(Chunk.toArray(result)) // [2, 3]
|
|
2130
2163
|
* ```
|
|
2131
2164
|
*
|
|
2132
|
-
* @since 2.0.0
|
|
2133
2165
|
* @category mapping
|
|
2166
|
+
* @since 2.0.0
|
|
2134
2167
|
*/
|
|
2135
2168
|
export declare const map: {
|
|
2136
2169
|
/**
|
|
2137
2170
|
* Transforms the elements of a chunk using the specified mapping function.
|
|
2138
2171
|
* If the input chunk is non-empty, the resulting chunk will also be non-empty.
|
|
2139
2172
|
*
|
|
2140
|
-
*
|
|
2173
|
+
* **Example** (Mapping values)
|
|
2141
2174
|
*
|
|
2142
2175
|
* ```ts
|
|
2143
2176
|
* import { Chunk } from "effect"
|
|
2144
2177
|
*
|
|
2145
2178
|
* const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
|
|
2146
2179
|
*
|
|
2147
|
-
* console.log(result)
|
|
2148
|
-
* // { _id: 'Chunk', values: [ 2, 3 ] }
|
|
2180
|
+
* console.log(Chunk.toArray(result)) // [2, 3]
|
|
2149
2181
|
* ```
|
|
2150
2182
|
*
|
|
2151
|
-
* @since 2.0.0
|
|
2152
2183
|
* @category mapping
|
|
2184
|
+
* @since 2.0.0
|
|
2153
2185
|
*/
|
|
2154
2186
|
<S extends Chunk<any>, B>(f: (a: Chunk.Infer<S>, i: number) => B): (self: S) => Chunk.With<S, B>;
|
|
2155
2187
|
/**
|
|
2156
2188
|
* Transforms the elements of a chunk using the specified mapping function.
|
|
2157
2189
|
* If the input chunk is non-empty, the resulting chunk will also be non-empty.
|
|
2158
2190
|
*
|
|
2159
|
-
*
|
|
2191
|
+
* **Example** (Mapping values)
|
|
2160
2192
|
*
|
|
2161
2193
|
* ```ts
|
|
2162
2194
|
* import { Chunk } from "effect"
|
|
2163
2195
|
*
|
|
2164
2196
|
* const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
|
|
2165
2197
|
*
|
|
2166
|
-
* console.log(result)
|
|
2167
|
-
* // { _id: 'Chunk', values: [ 2, 3 ] }
|
|
2198
|
+
* console.log(Chunk.toArray(result)) // [2, 3]
|
|
2168
2199
|
* ```
|
|
2169
2200
|
*
|
|
2170
|
-
* @since 2.0.0
|
|
2171
2201
|
* @category mapping
|
|
2202
|
+
* @since 2.0.0
|
|
2172
2203
|
*/
|
|
2173
2204
|
<A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => B): NonEmptyChunk<B>;
|
|
2174
2205
|
/**
|
|
2175
2206
|
* Transforms the elements of a chunk using the specified mapping function.
|
|
2176
2207
|
* If the input chunk is non-empty, the resulting chunk will also be non-empty.
|
|
2177
2208
|
*
|
|
2178
|
-
*
|
|
2209
|
+
* **Example** (Mapping values)
|
|
2179
2210
|
*
|
|
2180
2211
|
* ```ts
|
|
2181
2212
|
* import { Chunk } from "effect"
|
|
2182
2213
|
*
|
|
2183
2214
|
* const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
|
|
2184
2215
|
*
|
|
2185
|
-
* console.log(result)
|
|
2186
|
-
* // { _id: 'Chunk', values: [ 2, 3 ] }
|
|
2216
|
+
* console.log(Chunk.toArray(result)) // [2, 3]
|
|
2187
2217
|
* ```
|
|
2188
2218
|
*
|
|
2189
|
-
* @since 2.0.0
|
|
2190
2219
|
* @category mapping
|
|
2220
|
+
* @since 2.0.0
|
|
2191
2221
|
*/
|
|
2192
2222
|
<A, B>(self: Chunk<A>, f: (a: A, i: number) => B): Chunk<B>;
|
|
2193
2223
|
};
|
|
2194
2224
|
/**
|
|
2195
2225
|
* Statefully maps over the chunk, producing new elements of type `B`.
|
|
2196
2226
|
*
|
|
2197
|
-
*
|
|
2227
|
+
* **Example** (Mapping with accumulated state)
|
|
2228
|
+
*
|
|
2198
2229
|
* ```ts
|
|
2199
2230
|
* import { Chunk } from "effect"
|
|
2200
2231
|
*
|
|
@@ -2217,14 +2248,15 @@ export declare const map: {
|
|
|
2217
2248
|
* console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
|
|
2218
2249
|
* ```
|
|
2219
2250
|
*
|
|
2220
|
-
* @since 2.0.0
|
|
2221
2251
|
* @category folding
|
|
2252
|
+
* @since 2.0.0
|
|
2222
2253
|
*/
|
|
2223
2254
|
export declare const mapAccum: {
|
|
2224
2255
|
/**
|
|
2225
2256
|
* Statefully maps over the chunk, producing new elements of type `B`.
|
|
2226
2257
|
*
|
|
2227
|
-
*
|
|
2258
|
+
* **Example** (Mapping with accumulated state)
|
|
2259
|
+
*
|
|
2228
2260
|
* ```ts
|
|
2229
2261
|
* import { Chunk } from "effect"
|
|
2230
2262
|
*
|
|
@@ -2247,14 +2279,15 @@ export declare const mapAccum: {
|
|
|
2247
2279
|
* console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
|
|
2248
2280
|
* ```
|
|
2249
2281
|
*
|
|
2250
|
-
* @since 2.0.0
|
|
2251
2282
|
* @category folding
|
|
2283
|
+
* @since 2.0.0
|
|
2252
2284
|
*/
|
|
2253
2285
|
<S, A, B>(s: S, f: (s: S, a: A) => readonly [S, B]): (self: Chunk<A>) => [S, Chunk<B>];
|
|
2254
2286
|
/**
|
|
2255
2287
|
* Statefully maps over the chunk, producing new elements of type `B`.
|
|
2256
2288
|
*
|
|
2257
|
-
*
|
|
2289
|
+
* **Example** (Mapping with accumulated state)
|
|
2290
|
+
*
|
|
2258
2291
|
* ```ts
|
|
2259
2292
|
* import { Chunk } from "effect"
|
|
2260
2293
|
*
|
|
@@ -2277,8 +2310,8 @@ export declare const mapAccum: {
|
|
|
2277
2310
|
* console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
|
|
2278
2311
|
* ```
|
|
2279
2312
|
*
|
|
2280
|
-
* @since 2.0.0
|
|
2281
2313
|
* @category folding
|
|
2314
|
+
* @since 2.0.0
|
|
2282
2315
|
*/
|
|
2283
2316
|
<S, A, B>(self: Chunk<A>, s: S, f: (s: S, a: A) => readonly [S, B]): [S, Chunk<B>];
|
|
2284
2317
|
};
|
|
@@ -2288,7 +2321,8 @@ export declare const mapAccum: {
|
|
|
2288
2321
|
* - Returns `[excluded, satisfying]`.
|
|
2289
2322
|
* - The filter receives `(element, index)`.
|
|
2290
2323
|
*
|
|
2291
|
-
*
|
|
2324
|
+
* **Example** (Partitioning with a Result)
|
|
2325
|
+
*
|
|
2292
2326
|
* ```ts
|
|
2293
2327
|
* import { Chunk, Result } from "effect"
|
|
2294
2328
|
*
|
|
@@ -2310,7 +2344,8 @@ export declare const partition: {
|
|
|
2310
2344
|
* - Returns `[excluded, satisfying]`.
|
|
2311
2345
|
* - The filter receives `(element, index)`.
|
|
2312
2346
|
*
|
|
2313
|
-
*
|
|
2347
|
+
* **Example** (Partitioning with a Result)
|
|
2348
|
+
*
|
|
2314
2349
|
* ```ts
|
|
2315
2350
|
* import { Chunk, Result } from "effect"
|
|
2316
2351
|
*
|
|
@@ -2332,7 +2367,8 @@ export declare const partition: {
|
|
|
2332
2367
|
* - Returns `[excluded, satisfying]`.
|
|
2333
2368
|
* - The filter receives `(element, index)`.
|
|
2334
2369
|
*
|
|
2335
|
-
*
|
|
2370
|
+
* **Example** (Partitioning with a Result)
|
|
2371
|
+
*
|
|
2336
2372
|
* ```ts
|
|
2337
2373
|
* import { Chunk, Result } from "effect"
|
|
2338
2374
|
*
|
|
@@ -2350,12 +2386,16 @@ export declare const partition: {
|
|
|
2350
2386
|
<A, Pass, Fail>(self: Chunk<A>, f: (input: A, i: number) => Result<Pass, Fail>): [excluded: Chunk<Fail>, satisfying: Chunk<Pass>];
|
|
2351
2387
|
};
|
|
2352
2388
|
/**
|
|
2353
|
-
*
|
|
2389
|
+
* Separates a chunk of `Result` values into a chunk of failures and a chunk of
|
|
2390
|
+
* successes.
|
|
2391
|
+
*
|
|
2392
|
+
* The returned tuple is `[failures, successes]`, preserving the original order
|
|
2393
|
+
* within each side.
|
|
2394
|
+
*
|
|
2395
|
+
* **Example** (Separating failures and successes)
|
|
2354
2396
|
*
|
|
2355
|
-
* @example
|
|
2356
2397
|
* ```ts
|
|
2357
|
-
* import { Chunk } from "effect"
|
|
2358
|
-
* import * as Result from "effect/Result"
|
|
2398
|
+
* import { Chunk, Result } from "effect"
|
|
2359
2399
|
*
|
|
2360
2400
|
* const chunk = Chunk.make(
|
|
2361
2401
|
* Result.succeed(1),
|
|
@@ -2383,7 +2423,8 @@ export declare const separate: <A, B>(self: Chunk<Result<B, A>>) => [Chunk<A>, C
|
|
|
2383
2423
|
/**
|
|
2384
2424
|
* Retrieves the size of the chunk.
|
|
2385
2425
|
*
|
|
2386
|
-
*
|
|
2426
|
+
* **Example** (Getting chunk size)
|
|
2427
|
+
*
|
|
2387
2428
|
* ```ts
|
|
2388
2429
|
* import { Chunk } from "effect"
|
|
2389
2430
|
*
|
|
@@ -2398,10 +2439,10 @@ export declare const size: <A>(self: Chunk<A>) => number;
|
|
|
2398
2439
|
/**
|
|
2399
2440
|
* Sort the elements of a Chunk in increasing order, creating a new Chunk.
|
|
2400
2441
|
*
|
|
2401
|
-
*
|
|
2442
|
+
* **Example** (Sorting chunks)
|
|
2443
|
+
*
|
|
2402
2444
|
* ```ts
|
|
2403
|
-
* import { Chunk } from "effect"
|
|
2404
|
-
* import * as Order from "effect/Order"
|
|
2445
|
+
* import { Chunk, Order } from "effect"
|
|
2405
2446
|
*
|
|
2406
2447
|
* const numbers = Chunk.make(3, 1, 4, 1, 5, 9, 2, 6)
|
|
2407
2448
|
* const sorted = Chunk.sort(numbers, Order.Number)
|
|
@@ -2417,17 +2458,17 @@ export declare const size: <A>(self: Chunk<A>) => number;
|
|
|
2417
2458
|
* console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
|
|
2418
2459
|
* ```
|
|
2419
2460
|
*
|
|
2420
|
-
* @since 2.0.0
|
|
2421
2461
|
* @category sorting
|
|
2462
|
+
* @since 2.0.0
|
|
2422
2463
|
*/
|
|
2423
2464
|
export declare const sort: {
|
|
2424
2465
|
/**
|
|
2425
2466
|
* Sort the elements of a Chunk in increasing order, creating a new Chunk.
|
|
2426
2467
|
*
|
|
2427
|
-
*
|
|
2468
|
+
* **Example** (Sorting chunks)
|
|
2469
|
+
*
|
|
2428
2470
|
* ```ts
|
|
2429
|
-
* import { Chunk } from "effect"
|
|
2430
|
-
* import * as Order from "effect/Order"
|
|
2471
|
+
* import { Chunk, Order } from "effect"
|
|
2431
2472
|
*
|
|
2432
2473
|
* const numbers = Chunk.make(3, 1, 4, 1, 5, 9, 2, 6)
|
|
2433
2474
|
* const sorted = Chunk.sort(numbers, Order.Number)
|
|
@@ -2443,17 +2484,17 @@ export declare const sort: {
|
|
|
2443
2484
|
* console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
|
|
2444
2485
|
* ```
|
|
2445
2486
|
*
|
|
2446
|
-
* @since 2.0.0
|
|
2447
2487
|
* @category sorting
|
|
2488
|
+
* @since 2.0.0
|
|
2448
2489
|
*/
|
|
2449
2490
|
<B>(O: Order.Order<B>): <A extends B>(self: Chunk<A>) => Chunk<A>;
|
|
2450
2491
|
/**
|
|
2451
2492
|
* Sort the elements of a Chunk in increasing order, creating a new Chunk.
|
|
2452
2493
|
*
|
|
2453
|
-
*
|
|
2494
|
+
* **Example** (Sorting chunks)
|
|
2495
|
+
*
|
|
2454
2496
|
* ```ts
|
|
2455
|
-
* import { Chunk } from "effect"
|
|
2456
|
-
* import * as Order from "effect/Order"
|
|
2497
|
+
* import { Chunk, Order } from "effect"
|
|
2457
2498
|
*
|
|
2458
2499
|
* const numbers = Chunk.make(3, 1, 4, 1, 5, 9, 2, 6)
|
|
2459
2500
|
* const sorted = Chunk.sort(numbers, Order.Number)
|
|
@@ -2469,18 +2510,18 @@ export declare const sort: {
|
|
|
2469
2510
|
* console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
|
|
2470
2511
|
* ```
|
|
2471
2512
|
*
|
|
2472
|
-
* @since 2.0.0
|
|
2473
2513
|
* @category sorting
|
|
2514
|
+
* @since 2.0.0
|
|
2474
2515
|
*/
|
|
2475
2516
|
<A extends B, B>(self: Chunk<A>, O: Order.Order<B>): Chunk<A>;
|
|
2476
2517
|
};
|
|
2477
2518
|
/**
|
|
2478
2519
|
* Sorts the elements of a Chunk based on a projection function.
|
|
2479
2520
|
*
|
|
2480
|
-
*
|
|
2521
|
+
* **Example** (Sorting chunks by a derived value)
|
|
2522
|
+
*
|
|
2481
2523
|
* ```ts
|
|
2482
|
-
* import { Chunk } from "effect"
|
|
2483
|
-
* import * as Order from "effect/Order"
|
|
2524
|
+
* import { Chunk, Order } from "effect"
|
|
2484
2525
|
*
|
|
2485
2526
|
* const people = Chunk.make(
|
|
2486
2527
|
* { name: "Alice", age: 30 },
|
|
@@ -2504,17 +2545,17 @@ export declare const sort: {
|
|
|
2504
2545
|
* console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
|
|
2505
2546
|
* ```
|
|
2506
2547
|
*
|
|
2507
|
-
* @since 2.0.0
|
|
2508
2548
|
* @category sorting
|
|
2549
|
+
* @since 2.0.0
|
|
2509
2550
|
*/
|
|
2510
2551
|
export declare const sortWith: {
|
|
2511
2552
|
/**
|
|
2512
2553
|
* Sorts the elements of a Chunk based on a projection function.
|
|
2513
2554
|
*
|
|
2514
|
-
*
|
|
2555
|
+
* **Example** (Sorting chunks by a derived value)
|
|
2556
|
+
*
|
|
2515
2557
|
* ```ts
|
|
2516
|
-
* import { Chunk } from "effect"
|
|
2517
|
-
* import * as Order from "effect/Order"
|
|
2558
|
+
* import { Chunk, Order } from "effect"
|
|
2518
2559
|
*
|
|
2519
2560
|
* const people = Chunk.make(
|
|
2520
2561
|
* { name: "Alice", age: 30 },
|
|
@@ -2538,17 +2579,17 @@ export declare const sortWith: {
|
|
|
2538
2579
|
* console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
|
|
2539
2580
|
* ```
|
|
2540
2581
|
*
|
|
2541
|
-
* @since 2.0.0
|
|
2542
2582
|
* @category sorting
|
|
2583
|
+
* @since 2.0.0
|
|
2543
2584
|
*/
|
|
2544
2585
|
<A, B>(f: (a: A) => B, order: Order.Order<B>): (self: Chunk<A>) => Chunk<A>;
|
|
2545
2586
|
/**
|
|
2546
2587
|
* Sorts the elements of a Chunk based on a projection function.
|
|
2547
2588
|
*
|
|
2548
|
-
*
|
|
2589
|
+
* **Example** (Sorting chunks by a derived value)
|
|
2590
|
+
*
|
|
2549
2591
|
* ```ts
|
|
2550
|
-
* import { Chunk } from "effect"
|
|
2551
|
-
* import * as Order from "effect/Order"
|
|
2592
|
+
* import { Chunk, Order } from "effect"
|
|
2552
2593
|
*
|
|
2553
2594
|
* const people = Chunk.make(
|
|
2554
2595
|
* { name: "Alice", age: 30 },
|
|
@@ -2572,15 +2613,16 @@ export declare const sortWith: {
|
|
|
2572
2613
|
* console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
|
|
2573
2614
|
* ```
|
|
2574
2615
|
*
|
|
2575
|
-
* @since 2.0.0
|
|
2576
2616
|
* @category sorting
|
|
2617
|
+
* @since 2.0.0
|
|
2577
2618
|
*/
|
|
2578
2619
|
<A, B>(self: Chunk<A>, f: (a: A) => B, order: Order.Order<B>): Chunk<A>;
|
|
2579
2620
|
};
|
|
2580
2621
|
/**
|
|
2581
2622
|
* Returns two splits of this chunk at the specified index.
|
|
2582
2623
|
*
|
|
2583
|
-
*
|
|
2624
|
+
* **Example** (Splitting at an index)
|
|
2625
|
+
*
|
|
2584
2626
|
* ```ts
|
|
2585
2627
|
* import { Chunk } from "effect"
|
|
2586
2628
|
*
|
|
@@ -2600,14 +2642,15 @@ export declare const sortWith: {
|
|
|
2600
2642
|
* console.log(Chunk.toArray(empty2)) // []
|
|
2601
2643
|
* ```
|
|
2602
2644
|
*
|
|
2603
|
-
* @since 2.0.0
|
|
2604
2645
|
* @category splitting
|
|
2646
|
+
* @since 2.0.0
|
|
2605
2647
|
*/
|
|
2606
2648
|
export declare const splitAt: {
|
|
2607
2649
|
/**
|
|
2608
2650
|
* Returns two splits of this chunk at the specified index.
|
|
2609
2651
|
*
|
|
2610
|
-
*
|
|
2652
|
+
* **Example** (Splitting at an index)
|
|
2653
|
+
*
|
|
2611
2654
|
* ```ts
|
|
2612
2655
|
* import { Chunk } from "effect"
|
|
2613
2656
|
*
|
|
@@ -2627,14 +2670,15 @@ export declare const splitAt: {
|
|
|
2627
2670
|
* console.log(Chunk.toArray(empty2)) // []
|
|
2628
2671
|
* ```
|
|
2629
2672
|
*
|
|
2630
|
-
* @since 2.0.0
|
|
2631
2673
|
* @category splitting
|
|
2674
|
+
* @since 2.0.0
|
|
2632
2675
|
*/
|
|
2633
2676
|
(n: number): <A>(self: Chunk<A>) => [beforeIndex: Chunk<A>, fromIndex: Chunk<A>];
|
|
2634
2677
|
/**
|
|
2635
2678
|
* Returns two splits of this chunk at the specified index.
|
|
2636
2679
|
*
|
|
2637
|
-
*
|
|
2680
|
+
* **Example** (Splitting at an index)
|
|
2681
|
+
*
|
|
2638
2682
|
* ```ts
|
|
2639
2683
|
* import { Chunk } from "effect"
|
|
2640
2684
|
*
|
|
@@ -2654,16 +2698,21 @@ export declare const splitAt: {
|
|
|
2654
2698
|
* console.log(Chunk.toArray(empty2)) // []
|
|
2655
2699
|
* ```
|
|
2656
2700
|
*
|
|
2657
|
-
* @since 2.0.0
|
|
2658
2701
|
* @category splitting
|
|
2702
|
+
* @since 2.0.0
|
|
2659
2703
|
*/
|
|
2660
2704
|
<A>(self: Chunk<A>, n: number): [beforeIndex: Chunk<A>, fromIndex: Chunk<A>];
|
|
2661
2705
|
};
|
|
2662
2706
|
/**
|
|
2663
|
-
* Splits a `NonEmptyChunk`
|
|
2664
|
-
*
|
|
2707
|
+
* Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
|
|
2708
|
+
* remaining suffix.
|
|
2709
|
+
*
|
|
2710
|
+
* `n` is floored and normalized to at least `1`. If `n` is greater than or
|
|
2711
|
+
* equal to the chunk length, the first result is the original chunk and the
|
|
2712
|
+
* second result is empty.
|
|
2713
|
+
*
|
|
2714
|
+
* **Example** (Splitting non-empty chunks at an index)
|
|
2665
2715
|
*
|
|
2666
|
-
* @example
|
|
2667
2716
|
* ```ts
|
|
2668
2717
|
* import { Chunk } from "effect"
|
|
2669
2718
|
*
|
|
@@ -2686,10 +2735,15 @@ export declare const splitAt: {
|
|
|
2686
2735
|
*/
|
|
2687
2736
|
export declare const splitNonEmptyAt: {
|
|
2688
2737
|
/**
|
|
2689
|
-
* Splits a `NonEmptyChunk`
|
|
2690
|
-
*
|
|
2738
|
+
* Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
|
|
2739
|
+
* remaining suffix.
|
|
2740
|
+
*
|
|
2741
|
+
* `n` is floored and normalized to at least `1`. If `n` is greater than or
|
|
2742
|
+
* equal to the chunk length, the first result is the original chunk and the
|
|
2743
|
+
* second result is empty.
|
|
2744
|
+
*
|
|
2745
|
+
* **Example** (Splitting non-empty chunks at an index)
|
|
2691
2746
|
*
|
|
2692
|
-
* @example
|
|
2693
2747
|
* ```ts
|
|
2694
2748
|
* import { Chunk } from "effect"
|
|
2695
2749
|
*
|
|
@@ -2712,10 +2766,15 @@ export declare const splitNonEmptyAt: {
|
|
|
2712
2766
|
*/
|
|
2713
2767
|
(n: number): <A>(self: NonEmptyChunk<A>) => [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>];
|
|
2714
2768
|
/**
|
|
2715
|
-
* Splits a `NonEmptyChunk`
|
|
2716
|
-
*
|
|
2769
|
+
* Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
|
|
2770
|
+
* remaining suffix.
|
|
2771
|
+
*
|
|
2772
|
+
* `n` is floored and normalized to at least `1`. If `n` is greater than or
|
|
2773
|
+
* equal to the chunk length, the first result is the original chunk and the
|
|
2774
|
+
* second result is empty.
|
|
2775
|
+
*
|
|
2776
|
+
* **Example** (Splitting non-empty chunks at an index)
|
|
2717
2777
|
*
|
|
2718
|
-
* @example
|
|
2719
2778
|
* ```ts
|
|
2720
2779
|
* import { Chunk } from "effect"
|
|
2721
2780
|
*
|
|
@@ -2739,9 +2798,13 @@ export declare const splitNonEmptyAt: {
|
|
|
2739
2798
|
<A>(self: NonEmptyChunk<A>, n: number): [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>];
|
|
2740
2799
|
};
|
|
2741
2800
|
/**
|
|
2742
|
-
* Splits
|
|
2801
|
+
* Splits a chunk into up to `n` chunks, distributing elements in order.
|
|
2802
|
+
*
|
|
2803
|
+
* The chunk size is derived from the input length and `n`; the final chunk may
|
|
2804
|
+
* contain fewer elements than the others.
|
|
2805
|
+
*
|
|
2806
|
+
* **Example** (Splitting chunks into groups)
|
|
2743
2807
|
*
|
|
2744
|
-
* @example
|
|
2745
2808
|
* ```ts
|
|
2746
2809
|
* import { Chunk } from "effect"
|
|
2747
2810
|
*
|
|
@@ -2762,14 +2825,18 @@ export declare const splitNonEmptyAt: {
|
|
|
2762
2825
|
* // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
|
|
2763
2826
|
* ```
|
|
2764
2827
|
*
|
|
2765
|
-
* @since 2.0.0
|
|
2766
2828
|
* @category splitting
|
|
2829
|
+
* @since 2.0.0
|
|
2767
2830
|
*/
|
|
2768
2831
|
export declare const split: {
|
|
2769
2832
|
/**
|
|
2770
|
-
* Splits
|
|
2833
|
+
* Splits a chunk into up to `n` chunks, distributing elements in order.
|
|
2834
|
+
*
|
|
2835
|
+
* The chunk size is derived from the input length and `n`; the final chunk may
|
|
2836
|
+
* contain fewer elements than the others.
|
|
2837
|
+
*
|
|
2838
|
+
* **Example** (Splitting chunks into groups)
|
|
2771
2839
|
*
|
|
2772
|
-
* @example
|
|
2773
2840
|
* ```ts
|
|
2774
2841
|
* import { Chunk } from "effect"
|
|
2775
2842
|
*
|
|
@@ -2790,14 +2857,18 @@ export declare const split: {
|
|
|
2790
2857
|
* // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
|
|
2791
2858
|
* ```
|
|
2792
2859
|
*
|
|
2793
|
-
* @since 2.0.0
|
|
2794
2860
|
* @category splitting
|
|
2861
|
+
* @since 2.0.0
|
|
2795
2862
|
*/
|
|
2796
2863
|
(n: number): <A>(self: Chunk<A>) => Chunk<Chunk<A>>;
|
|
2797
2864
|
/**
|
|
2798
|
-
* Splits
|
|
2865
|
+
* Splits a chunk into up to `n` chunks, distributing elements in order.
|
|
2866
|
+
*
|
|
2867
|
+
* The chunk size is derived from the input length and `n`; the final chunk may
|
|
2868
|
+
* contain fewer elements than the others.
|
|
2869
|
+
*
|
|
2870
|
+
* **Example** (Splitting chunks into groups)
|
|
2799
2871
|
*
|
|
2800
|
-
* @example
|
|
2801
2872
|
* ```ts
|
|
2802
2873
|
* import { Chunk } from "effect"
|
|
2803
2874
|
*
|
|
@@ -2818,8 +2889,8 @@ export declare const split: {
|
|
|
2818
2889
|
* // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
|
|
2819
2890
|
* ```
|
|
2820
2891
|
*
|
|
2821
|
-
* @since 2.0.0
|
|
2822
2892
|
* @category splitting
|
|
2893
|
+
* @since 2.0.0
|
|
2823
2894
|
*/
|
|
2824
2895
|
<A>(self: Chunk<A>, n: number): Chunk<Chunk<A>>;
|
|
2825
2896
|
};
|
|
@@ -2827,7 +2898,8 @@ export declare const split: {
|
|
|
2827
2898
|
* Splits this chunk on the first element that matches this predicate.
|
|
2828
2899
|
* Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
|
|
2829
2900
|
*
|
|
2830
|
-
*
|
|
2901
|
+
* **Example** (Splitting at a matching element)
|
|
2902
|
+
*
|
|
2831
2903
|
* ```ts
|
|
2832
2904
|
* import { Chunk } from "effect"
|
|
2833
2905
|
*
|
|
@@ -2855,7 +2927,8 @@ export declare const splitWhere: {
|
|
|
2855
2927
|
* Splits this chunk on the first element that matches this predicate.
|
|
2856
2928
|
* Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
|
|
2857
2929
|
*
|
|
2858
|
-
*
|
|
2930
|
+
* **Example** (Splitting at a matching element)
|
|
2931
|
+
*
|
|
2859
2932
|
* ```ts
|
|
2860
2933
|
* import { Chunk } from "effect"
|
|
2861
2934
|
*
|
|
@@ -2883,7 +2956,8 @@ export declare const splitWhere: {
|
|
|
2883
2956
|
* Splits this chunk on the first element that matches this predicate.
|
|
2884
2957
|
* Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
|
|
2885
2958
|
*
|
|
2886
|
-
*
|
|
2959
|
+
* **Example** (Splitting at a matching element)
|
|
2960
|
+
*
|
|
2887
2961
|
* ```ts
|
|
2888
2962
|
* import { Chunk } from "effect"
|
|
2889
2963
|
*
|
|
@@ -2911,7 +2985,8 @@ export declare const splitWhere: {
|
|
|
2911
2985
|
/**
|
|
2912
2986
|
* Returns every elements after the first.
|
|
2913
2987
|
*
|
|
2914
|
-
*
|
|
2988
|
+
* **Example** (Getting the tail safely)
|
|
2989
|
+
*
|
|
2915
2990
|
* ```ts
|
|
2916
2991
|
* import { Chunk } from "effect"
|
|
2917
2992
|
*
|
|
@@ -2925,14 +3000,15 @@ export declare const splitWhere: {
|
|
|
2925
3000
|
* console.log(Chunk.tail(empty)) // Option.none()
|
|
2926
3001
|
* ```
|
|
2927
3002
|
*
|
|
2928
|
-
* @since 2.0.0
|
|
2929
3003
|
* @category elements
|
|
3004
|
+
* @since 2.0.0
|
|
2930
3005
|
*/
|
|
2931
3006
|
export declare const tail: <A>(self: Chunk<A>) => O.Option<Chunk<A>>;
|
|
2932
3007
|
/**
|
|
2933
3008
|
* Returns every elements after the first.
|
|
2934
3009
|
*
|
|
2935
|
-
*
|
|
3010
|
+
* **Example** (Getting the tail of a non-empty chunk)
|
|
3011
|
+
*
|
|
2936
3012
|
* ```ts
|
|
2937
3013
|
* import { Chunk } from "effect"
|
|
2938
3014
|
*
|
|
@@ -2948,14 +3024,15 @@ export declare const tail: <A>(self: Chunk<A>) => O.Option<Chunk<A>>;
|
|
|
2948
3024
|
* // Chunk.tailNonEmpty(Chunk.empty()) // TypeScript error
|
|
2949
3025
|
* ```
|
|
2950
3026
|
*
|
|
2951
|
-
* @since 2.0.0
|
|
2952
3027
|
* @category elements
|
|
3028
|
+
* @since 2.0.0
|
|
2953
3029
|
*/
|
|
2954
3030
|
export declare const tailNonEmpty: <A>(self: NonEmptyChunk<A>) => Chunk<A>;
|
|
2955
3031
|
/**
|
|
2956
3032
|
* Takes the last `n` elements.
|
|
2957
3033
|
*
|
|
2958
|
-
*
|
|
3034
|
+
* **Example** (Taking elements from the end)
|
|
3035
|
+
*
|
|
2959
3036
|
* ```ts
|
|
2960
3037
|
* import { Chunk } from "effect"
|
|
2961
3038
|
*
|
|
@@ -2972,14 +3049,15 @@ export declare const tailNonEmpty: <A>(self: NonEmptyChunk<A>) => Chunk<A>;
|
|
|
2972
3049
|
* console.log(Chunk.toArray(none)) // []
|
|
2973
3050
|
* ```
|
|
2974
3051
|
*
|
|
2975
|
-
* @since 2.0.0
|
|
2976
3052
|
* @category elements
|
|
3053
|
+
* @since 2.0.0
|
|
2977
3054
|
*/
|
|
2978
3055
|
export declare const takeRight: {
|
|
2979
3056
|
/**
|
|
2980
3057
|
* Takes the last `n` elements.
|
|
2981
3058
|
*
|
|
2982
|
-
*
|
|
3059
|
+
* **Example** (Taking elements from the end)
|
|
3060
|
+
*
|
|
2983
3061
|
* ```ts
|
|
2984
3062
|
* import { Chunk } from "effect"
|
|
2985
3063
|
*
|
|
@@ -2996,14 +3074,15 @@ export declare const takeRight: {
|
|
|
2996
3074
|
* console.log(Chunk.toArray(none)) // []
|
|
2997
3075
|
* ```
|
|
2998
3076
|
*
|
|
2999
|
-
* @since 2.0.0
|
|
3000
3077
|
* @category elements
|
|
3078
|
+
* @since 2.0.0
|
|
3001
3079
|
*/
|
|
3002
3080
|
(n: number): <A>(self: Chunk<A>) => Chunk<A>;
|
|
3003
3081
|
/**
|
|
3004
3082
|
* Takes the last `n` elements.
|
|
3005
3083
|
*
|
|
3006
|
-
*
|
|
3084
|
+
* **Example** (Taking elements from the end)
|
|
3085
|
+
*
|
|
3007
3086
|
* ```ts
|
|
3008
3087
|
* import { Chunk } from "effect"
|
|
3009
3088
|
*
|
|
@@ -3020,15 +3099,16 @@ export declare const takeRight: {
|
|
|
3020
3099
|
* console.log(Chunk.toArray(none)) // []
|
|
3021
3100
|
* ```
|
|
3022
3101
|
*
|
|
3023
|
-
* @since 2.0.0
|
|
3024
3102
|
* @category elements
|
|
3103
|
+
* @since 2.0.0
|
|
3025
3104
|
*/
|
|
3026
3105
|
<A>(self: Chunk<A>, n: number): Chunk<A>;
|
|
3027
3106
|
};
|
|
3028
3107
|
/**
|
|
3029
3108
|
* Takes all elements so long as the predicate returns true.
|
|
3030
3109
|
*
|
|
3031
|
-
*
|
|
3110
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3111
|
+
*
|
|
3032
3112
|
* ```ts
|
|
3033
3113
|
* import { Chunk } from "effect"
|
|
3034
3114
|
*
|
|
@@ -3046,14 +3126,15 @@ export declare const takeRight: {
|
|
|
3046
3126
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3047
3127
|
* ```
|
|
3048
3128
|
*
|
|
3049
|
-
* @since 2.0.0
|
|
3050
3129
|
* @category elements
|
|
3130
|
+
* @since 2.0.0
|
|
3051
3131
|
*/
|
|
3052
3132
|
export declare const takeWhile: {
|
|
3053
3133
|
/**
|
|
3054
3134
|
* Takes all elements so long as the predicate returns true.
|
|
3055
3135
|
*
|
|
3056
|
-
*
|
|
3136
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3137
|
+
*
|
|
3057
3138
|
* ```ts
|
|
3058
3139
|
* import { Chunk } from "effect"
|
|
3059
3140
|
*
|
|
@@ -3071,14 +3152,15 @@ export declare const takeWhile: {
|
|
|
3071
3152
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3072
3153
|
* ```
|
|
3073
3154
|
*
|
|
3074
|
-
* @since 2.0.0
|
|
3075
3155
|
* @category elements
|
|
3156
|
+
* @since 2.0.0
|
|
3076
3157
|
*/
|
|
3077
3158
|
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Chunk<B>;
|
|
3078
3159
|
/**
|
|
3079
3160
|
* Takes all elements so long as the predicate returns true.
|
|
3080
3161
|
*
|
|
3081
|
-
*
|
|
3162
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3163
|
+
*
|
|
3082
3164
|
* ```ts
|
|
3083
3165
|
* import { Chunk } from "effect"
|
|
3084
3166
|
*
|
|
@@ -3096,14 +3178,15 @@ export declare const takeWhile: {
|
|
|
3096
3178
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3097
3179
|
* ```
|
|
3098
3180
|
*
|
|
3099
|
-
* @since 2.0.0
|
|
3100
3181
|
* @category elements
|
|
3182
|
+
* @since 2.0.0
|
|
3101
3183
|
*/
|
|
3102
3184
|
<A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Chunk<A>;
|
|
3103
3185
|
/**
|
|
3104
3186
|
* Takes all elements so long as the predicate returns true.
|
|
3105
3187
|
*
|
|
3106
|
-
*
|
|
3188
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3189
|
+
*
|
|
3107
3190
|
* ```ts
|
|
3108
3191
|
* import { Chunk } from "effect"
|
|
3109
3192
|
*
|
|
@@ -3121,14 +3204,15 @@ export declare const takeWhile: {
|
|
|
3121
3204
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3122
3205
|
* ```
|
|
3123
3206
|
*
|
|
3124
|
-
* @since 2.0.0
|
|
3125
3207
|
* @category elements
|
|
3208
|
+
* @since 2.0.0
|
|
3126
3209
|
*/
|
|
3127
3210
|
<A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Chunk<B>;
|
|
3128
3211
|
/**
|
|
3129
3212
|
* Takes all elements so long as the predicate returns true.
|
|
3130
3213
|
*
|
|
3131
|
-
*
|
|
3214
|
+
* **Example** (Taking elements while a predicate matches)
|
|
3215
|
+
*
|
|
3132
3216
|
* ```ts
|
|
3133
3217
|
* import { Chunk } from "effect"
|
|
3134
3218
|
*
|
|
@@ -3146,15 +3230,16 @@ export declare const takeWhile: {
|
|
|
3146
3230
|
* console.log(Chunk.toArray(all)) // [1, 2, 3]
|
|
3147
3231
|
* ```
|
|
3148
3232
|
*
|
|
3149
|
-
* @since 2.0.0
|
|
3150
3233
|
* @category elements
|
|
3234
|
+
* @since 2.0.0
|
|
3151
3235
|
*/
|
|
3152
3236
|
<A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A>;
|
|
3153
3237
|
};
|
|
3154
3238
|
/**
|
|
3155
3239
|
* Creates a Chunks of unique values, in order, from all given Chunks.
|
|
3156
3240
|
*
|
|
3157
|
-
*
|
|
3241
|
+
* **Example** (Unioning chunks)
|
|
3242
|
+
*
|
|
3158
3243
|
* ```ts
|
|
3159
3244
|
* import { Chunk } from "effect"
|
|
3160
3245
|
*
|
|
@@ -3170,14 +3255,15 @@ export declare const takeWhile: {
|
|
|
3170
3255
|
* console.log(Chunk.toArray(unified)) // [1, 2, 3]
|
|
3171
3256
|
* ```
|
|
3172
3257
|
*
|
|
3173
|
-
* @since 2.0.0
|
|
3174
3258
|
* @category elements
|
|
3259
|
+
* @since 2.0.0
|
|
3175
3260
|
*/
|
|
3176
3261
|
export declare const union: {
|
|
3177
3262
|
/**
|
|
3178
3263
|
* Creates a Chunks of unique values, in order, from all given Chunks.
|
|
3179
3264
|
*
|
|
3180
|
-
*
|
|
3265
|
+
* **Example** (Unioning chunks)
|
|
3266
|
+
*
|
|
3181
3267
|
* ```ts
|
|
3182
3268
|
* import { Chunk } from "effect"
|
|
3183
3269
|
*
|
|
@@ -3193,14 +3279,15 @@ export declare const union: {
|
|
|
3193
3279
|
* console.log(Chunk.toArray(unified)) // [1, 2, 3]
|
|
3194
3280
|
* ```
|
|
3195
3281
|
*
|
|
3196
|
-
* @since 2.0.0
|
|
3197
3282
|
* @category elements
|
|
3283
|
+
* @since 2.0.0
|
|
3198
3284
|
*/
|
|
3199
3285
|
<A>(that: Chunk<A>): <B>(self: Chunk<B>) => Chunk<A | B>;
|
|
3200
3286
|
/**
|
|
3201
3287
|
* Creates a Chunks of unique values, in order, from all given Chunks.
|
|
3202
3288
|
*
|
|
3203
|
-
*
|
|
3289
|
+
* **Example** (Unioning chunks)
|
|
3290
|
+
*
|
|
3204
3291
|
* ```ts
|
|
3205
3292
|
* import { Chunk } from "effect"
|
|
3206
3293
|
*
|
|
@@ -3216,15 +3303,17 @@ export declare const union: {
|
|
|
3216
3303
|
* console.log(Chunk.toArray(unified)) // [1, 2, 3]
|
|
3217
3304
|
* ```
|
|
3218
3305
|
*
|
|
3219
|
-
* @since 2.0.0
|
|
3220
3306
|
* @category elements
|
|
3307
|
+
* @since 2.0.0
|
|
3221
3308
|
*/
|
|
3222
3309
|
<A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<A | B>;
|
|
3223
3310
|
};
|
|
3224
3311
|
/**
|
|
3225
|
-
*
|
|
3312
|
+
* Removes duplicate elements from a `Chunk`, preserving the first occurrence
|
|
3313
|
+
* of each value.
|
|
3314
|
+
*
|
|
3315
|
+
* **Example** (Removing duplicate values)
|
|
3226
3316
|
*
|
|
3227
|
-
* @example
|
|
3228
3317
|
* ```ts
|
|
3229
3318
|
* import { Chunk } from "effect"
|
|
3230
3319
|
*
|
|
@@ -3243,14 +3332,15 @@ export declare const union: {
|
|
|
3243
3332
|
* console.log(Chunk.toArray(uniqueDeduped)) // [1, 2, 3]
|
|
3244
3333
|
* ```
|
|
3245
3334
|
*
|
|
3246
|
-
* @since 2.0.0
|
|
3247
3335
|
* @category elements
|
|
3336
|
+
* @since 2.0.0
|
|
3248
3337
|
*/
|
|
3249
3338
|
export declare const dedupe: <A>(self: Chunk<A>) => Chunk<A>;
|
|
3250
3339
|
/**
|
|
3251
3340
|
* Deduplicates adjacent elements that are identical.
|
|
3252
3341
|
*
|
|
3253
|
-
*
|
|
3342
|
+
* **Example** (Removing adjacent duplicates)
|
|
3343
|
+
*
|
|
3254
3344
|
* ```ts
|
|
3255
3345
|
* import { Chunk } from "effect"
|
|
3256
3346
|
*
|
|
@@ -3264,8 +3354,8 @@ export declare const dedupe: <A>(self: Chunk<A>) => Chunk<A>;
|
|
|
3264
3354
|
* console.log(Chunk.toArray(mixedResult)) // ["a", "b", "a"]
|
|
3265
3355
|
* ```
|
|
3266
3356
|
*
|
|
3267
|
-
* @since 2.0.0
|
|
3268
3357
|
* @category filtering
|
|
3358
|
+
* @since 2.0.0
|
|
3269
3359
|
*/
|
|
3270
3360
|
export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
|
|
3271
3361
|
/**
|
|
@@ -3273,7 +3363,8 @@ export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
|
|
|
3273
3363
|
*
|
|
3274
3364
|
* Note: The function is reverse of `zip`.
|
|
3275
3365
|
*
|
|
3276
|
-
*
|
|
3366
|
+
* **Example** (Unzipping pairs)
|
|
3367
|
+
*
|
|
3277
3368
|
* ```ts
|
|
3278
3369
|
* import { Chunk } from "effect"
|
|
3279
3370
|
*
|
|
@@ -3293,14 +3384,15 @@ export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
|
|
|
3293
3384
|
* console.log(Chunk.toArray(emptyStrs)) // []
|
|
3294
3385
|
* ```
|
|
3295
3386
|
*
|
|
3296
|
-
* @since 2.0.0
|
|
3297
3387
|
* @category elements
|
|
3388
|
+
* @since 2.0.0
|
|
3298
3389
|
*/
|
|
3299
3390
|
export declare const unzip: <A, B>(self: Chunk<readonly [A, B]>) => [Chunk<A>, Chunk<B>];
|
|
3300
3391
|
/**
|
|
3301
3392
|
* Zips this chunk pointwise with the specified chunk using the specified combiner.
|
|
3302
3393
|
*
|
|
3303
|
-
*
|
|
3394
|
+
* **Example** (Zipping chunks with a function)
|
|
3395
|
+
*
|
|
3304
3396
|
* ```ts
|
|
3305
3397
|
* import { Chunk } from "effect"
|
|
3306
3398
|
*
|
|
@@ -3316,14 +3408,15 @@ export declare const unzip: <A, B>(self: Chunk<readonly [A, B]>) => [Chunk<A>, C
|
|
|
3316
3408
|
* console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
|
|
3317
3409
|
* ```
|
|
3318
3410
|
*
|
|
3319
|
-
* @since 2.0.0
|
|
3320
3411
|
* @category zipping
|
|
3412
|
+
* @since 2.0.0
|
|
3321
3413
|
*/
|
|
3322
3414
|
export declare const zipWith: {
|
|
3323
3415
|
/**
|
|
3324
3416
|
* Zips this chunk pointwise with the specified chunk using the specified combiner.
|
|
3325
3417
|
*
|
|
3326
|
-
*
|
|
3418
|
+
* **Example** (Zipping chunks with a function)
|
|
3419
|
+
*
|
|
3327
3420
|
* ```ts
|
|
3328
3421
|
* import { Chunk } from "effect"
|
|
3329
3422
|
*
|
|
@@ -3339,14 +3432,15 @@ export declare const zipWith: {
|
|
|
3339
3432
|
* console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
|
|
3340
3433
|
* ```
|
|
3341
3434
|
*
|
|
3342
|
-
* @since 2.0.0
|
|
3343
3435
|
* @category zipping
|
|
3436
|
+
* @since 2.0.0
|
|
3344
3437
|
*/
|
|
3345
3438
|
<A, B, C>(that: Chunk<B>, f: (a: A, b: B) => C): (self: Chunk<A>) => Chunk<C>;
|
|
3346
3439
|
/**
|
|
3347
3440
|
* Zips this chunk pointwise with the specified chunk using the specified combiner.
|
|
3348
3441
|
*
|
|
3349
|
-
*
|
|
3442
|
+
* **Example** (Zipping chunks with a function)
|
|
3443
|
+
*
|
|
3350
3444
|
* ```ts
|
|
3351
3445
|
* import { Chunk } from "effect"
|
|
3352
3446
|
*
|
|
@@ -3362,15 +3456,16 @@ export declare const zipWith: {
|
|
|
3362
3456
|
* console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
|
|
3363
3457
|
* ```
|
|
3364
3458
|
*
|
|
3365
|
-
* @since 2.0.0
|
|
3366
3459
|
* @category zipping
|
|
3460
|
+
* @since 2.0.0
|
|
3367
3461
|
*/
|
|
3368
3462
|
<A, B, C>(self: Chunk<A>, that: Chunk<B>, f: (a: A, b: B) => C): Chunk<C>;
|
|
3369
3463
|
};
|
|
3370
3464
|
/**
|
|
3371
3465
|
* Zips this chunk pointwise with the specified chunk.
|
|
3372
3466
|
*
|
|
3373
|
-
*
|
|
3467
|
+
* **Example** (Zipping chunks)
|
|
3468
|
+
*
|
|
3374
3469
|
* ```ts
|
|
3375
3470
|
* import { Chunk } from "effect"
|
|
3376
3471
|
*
|
|
@@ -3386,14 +3481,15 @@ export declare const zipWith: {
|
|
|
3386
3481
|
* console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
|
|
3387
3482
|
* ```
|
|
3388
3483
|
*
|
|
3389
|
-
* @since 2.0.0
|
|
3390
3484
|
* @category zipping
|
|
3485
|
+
* @since 2.0.0
|
|
3391
3486
|
*/
|
|
3392
3487
|
export declare const zip: {
|
|
3393
3488
|
/**
|
|
3394
3489
|
* Zips this chunk pointwise with the specified chunk.
|
|
3395
3490
|
*
|
|
3396
|
-
*
|
|
3491
|
+
* **Example** (Zipping chunks)
|
|
3492
|
+
*
|
|
3397
3493
|
* ```ts
|
|
3398
3494
|
* import { Chunk } from "effect"
|
|
3399
3495
|
*
|
|
@@ -3409,14 +3505,15 @@ export declare const zip: {
|
|
|
3409
3505
|
* console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
|
|
3410
3506
|
* ```
|
|
3411
3507
|
*
|
|
3412
|
-
* @since 2.0.0
|
|
3413
3508
|
* @category zipping
|
|
3509
|
+
* @since 2.0.0
|
|
3414
3510
|
*/
|
|
3415
3511
|
<B>(that: Chunk<B>): <A>(self: Chunk<A>) => Chunk<[A, B]>;
|
|
3416
3512
|
/**
|
|
3417
3513
|
* Zips this chunk pointwise with the specified chunk.
|
|
3418
3514
|
*
|
|
3419
|
-
*
|
|
3515
|
+
* **Example** (Zipping chunks)
|
|
3516
|
+
*
|
|
3420
3517
|
* ```ts
|
|
3421
3518
|
* import { Chunk } from "effect"
|
|
3422
3519
|
*
|
|
@@ -3432,15 +3529,16 @@ export declare const zip: {
|
|
|
3432
3529
|
* console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
|
|
3433
3530
|
* ```
|
|
3434
3531
|
*
|
|
3435
|
-
* @since 2.0.0
|
|
3436
3532
|
* @category zipping
|
|
3533
|
+
* @since 2.0.0
|
|
3437
3534
|
*/
|
|
3438
3535
|
<A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<[A, B]>;
|
|
3439
3536
|
};
|
|
3440
3537
|
/**
|
|
3441
3538
|
* Delete the element at the specified index, creating a new `Chunk`.
|
|
3442
3539
|
*
|
|
3443
|
-
*
|
|
3540
|
+
* **Example** (Removing an element)
|
|
3541
|
+
*
|
|
3444
3542
|
* ```ts
|
|
3445
3543
|
* import { Chunk } from "effect"
|
|
3446
3544
|
*
|
|
@@ -3464,7 +3562,8 @@ export declare const remove: {
|
|
|
3464
3562
|
/**
|
|
3465
3563
|
* Delete the element at the specified index, creating a new `Chunk`.
|
|
3466
3564
|
*
|
|
3467
|
-
*
|
|
3565
|
+
* **Example** (Removing an element)
|
|
3566
|
+
*
|
|
3468
3567
|
* ```ts
|
|
3469
3568
|
* import { Chunk } from "effect"
|
|
3470
3569
|
*
|
|
@@ -3488,7 +3587,8 @@ export declare const remove: {
|
|
|
3488
3587
|
/**
|
|
3489
3588
|
* Delete the element at the specified index, creating a new `Chunk`.
|
|
3490
3589
|
*
|
|
3491
|
-
*
|
|
3590
|
+
* **Example** (Removing an element)
|
|
3591
|
+
*
|
|
3492
3592
|
* ```ts
|
|
3493
3593
|
* import { Chunk } from "effect"
|
|
3494
3594
|
*
|
|
@@ -3514,7 +3614,8 @@ export declare const remove: {
|
|
|
3514
3614
|
* Applies a function to the element at the specified index, creating a new `Chunk`,
|
|
3515
3615
|
* or returns `None` if the index is out of bounds.
|
|
3516
3616
|
*
|
|
3517
|
-
*
|
|
3617
|
+
* **Example** (Modifying an element)
|
|
3618
|
+
*
|
|
3518
3619
|
* ```ts
|
|
3519
3620
|
* import { Chunk } from "effect"
|
|
3520
3621
|
*
|
|
@@ -3539,7 +3640,8 @@ export declare const modify: {
|
|
|
3539
3640
|
* Applies a function to the element at the specified index, creating a new `Chunk`,
|
|
3540
3641
|
* or returns `None` if the index is out of bounds.
|
|
3541
3642
|
*
|
|
3542
|
-
*
|
|
3643
|
+
* **Example** (Modifying an element)
|
|
3644
|
+
*
|
|
3543
3645
|
* ```ts
|
|
3544
3646
|
* import { Chunk } from "effect"
|
|
3545
3647
|
*
|
|
@@ -3564,7 +3666,8 @@ export declare const modify: {
|
|
|
3564
3666
|
* Applies a function to the element at the specified index, creating a new `Chunk`,
|
|
3565
3667
|
* or returns `None` if the index is out of bounds.
|
|
3566
3668
|
*
|
|
3567
|
-
*
|
|
3669
|
+
* **Example** (Modifying an element)
|
|
3670
|
+
*
|
|
3568
3671
|
* ```ts
|
|
3569
3672
|
* import { Chunk } from "effect"
|
|
3570
3673
|
*
|
|
@@ -3590,7 +3693,8 @@ export declare const modify: {
|
|
|
3590
3693
|
* Change the element at the specified index, creating a new `Chunk`,
|
|
3591
3694
|
* or returns `None` if the index is out of bounds.
|
|
3592
3695
|
*
|
|
3593
|
-
*
|
|
3696
|
+
* **Example** (Replacing an element)
|
|
3697
|
+
*
|
|
3594
3698
|
* ```ts
|
|
3595
3699
|
* import { Chunk } from "effect"
|
|
3596
3700
|
*
|
|
@@ -3615,7 +3719,8 @@ export declare const replace: {
|
|
|
3615
3719
|
* Change the element at the specified index, creating a new `Chunk`,
|
|
3616
3720
|
* or returns `None` if the index is out of bounds.
|
|
3617
3721
|
*
|
|
3618
|
-
*
|
|
3722
|
+
* **Example** (Replacing an element)
|
|
3723
|
+
*
|
|
3619
3724
|
* ```ts
|
|
3620
3725
|
* import { Chunk } from "effect"
|
|
3621
3726
|
*
|
|
@@ -3640,7 +3745,8 @@ export declare const replace: {
|
|
|
3640
3745
|
* Change the element at the specified index, creating a new `Chunk`,
|
|
3641
3746
|
* or returns `None` if the index is out of bounds.
|
|
3642
3747
|
*
|
|
3643
|
-
*
|
|
3748
|
+
* **Example** (Replacing an element)
|
|
3749
|
+
*
|
|
3644
3750
|
* ```ts
|
|
3645
3751
|
* import { Chunk } from "effect"
|
|
3646
3752
|
*
|
|
@@ -3667,13 +3773,13 @@ export declare const replace: {
|
|
|
3667
3773
|
*
|
|
3668
3774
|
* **Note**. `n` is normalized to an integer >= 1.
|
|
3669
3775
|
*
|
|
3670
|
-
*
|
|
3776
|
+
* **Example** (Generating chunks from indices)
|
|
3777
|
+
*
|
|
3671
3778
|
* ```ts
|
|
3672
3779
|
* import { Chunk } from "effect"
|
|
3673
3780
|
*
|
|
3674
3781
|
* const chunk = Chunk.makeBy(5, (i) => i * 2)
|
|
3675
|
-
* console.log(chunk)
|
|
3676
|
-
* // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
|
|
3782
|
+
* console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
|
|
3677
3783
|
* ```
|
|
3678
3784
|
*
|
|
3679
3785
|
* @category constructors
|
|
@@ -3685,13 +3791,13 @@ export declare const makeBy: {
|
|
|
3685
3791
|
*
|
|
3686
3792
|
* **Note**. `n` is normalized to an integer >= 1.
|
|
3687
3793
|
*
|
|
3688
|
-
*
|
|
3794
|
+
* **Example** (Generating chunks from indices)
|
|
3795
|
+
*
|
|
3689
3796
|
* ```ts
|
|
3690
3797
|
* import { Chunk } from "effect"
|
|
3691
3798
|
*
|
|
3692
3799
|
* const chunk = Chunk.makeBy(5, (i) => i * 2)
|
|
3693
|
-
* console.log(chunk)
|
|
3694
|
-
* // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
|
|
3800
|
+
* console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
|
|
3695
3801
|
* ```
|
|
3696
3802
|
*
|
|
3697
3803
|
* @category constructors
|
|
@@ -3703,13 +3809,13 @@ export declare const makeBy: {
|
|
|
3703
3809
|
*
|
|
3704
3810
|
* **Note**. `n` is normalized to an integer >= 1.
|
|
3705
3811
|
*
|
|
3706
|
-
*
|
|
3812
|
+
* **Example** (Generating chunks from indices)
|
|
3813
|
+
*
|
|
3707
3814
|
* ```ts
|
|
3708
3815
|
* import { Chunk } from "effect"
|
|
3709
3816
|
*
|
|
3710
3817
|
* const chunk = Chunk.makeBy(5, (i) => i * 2)
|
|
3711
|
-
* console.log(chunk)
|
|
3712
|
-
* // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
|
|
3818
|
+
* console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
|
|
3713
3819
|
* ```
|
|
3714
3820
|
*
|
|
3715
3821
|
* @category constructors
|
|
@@ -3718,15 +3824,19 @@ export declare const makeBy: {
|
|
|
3718
3824
|
<A>(n: number, f: (i: number) => A): NonEmptyChunk<A>;
|
|
3719
3825
|
};
|
|
3720
3826
|
/**
|
|
3721
|
-
*
|
|
3827
|
+
* Creates a non-empty `Chunk` of consecutive integers from `start` through
|
|
3828
|
+
* `end`, inclusive.
|
|
3829
|
+
*
|
|
3830
|
+
* If `start` is greater than `end`, returns a single-element chunk containing
|
|
3831
|
+
* `start`.
|
|
3832
|
+
*
|
|
3833
|
+
* **Example** (Creating a range)
|
|
3722
3834
|
*
|
|
3723
|
-
* @example
|
|
3724
3835
|
* ```ts
|
|
3725
3836
|
* import { Chunk } from "effect"
|
|
3726
3837
|
*
|
|
3727
3838
|
* const chunk = Chunk.range(1, 5)
|
|
3728
|
-
* console.log(chunk)
|
|
3729
|
-
* // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
|
|
3839
|
+
* console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4, 5]
|
|
3730
3840
|
* ```
|
|
3731
3841
|
*
|
|
3732
3842
|
* @category constructors
|
|
@@ -3736,7 +3846,8 @@ export declare const range: (start: number, end: number) => NonEmptyChunk<number
|
|
|
3736
3846
|
/**
|
|
3737
3847
|
* Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
|
|
3738
3848
|
*
|
|
3739
|
-
*
|
|
3849
|
+
* **Example** (Checking membership)
|
|
3850
|
+
*
|
|
3740
3851
|
* ```ts
|
|
3741
3852
|
* import { Chunk } from "effect"
|
|
3742
3853
|
*
|
|
@@ -3761,7 +3872,8 @@ export declare const contains: {
|
|
|
3761
3872
|
/**
|
|
3762
3873
|
* Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
|
|
3763
3874
|
*
|
|
3764
|
-
*
|
|
3875
|
+
* **Example** (Checking membership)
|
|
3876
|
+
*
|
|
3765
3877
|
* ```ts
|
|
3766
3878
|
* import { Chunk } from "effect"
|
|
3767
3879
|
*
|
|
@@ -3786,7 +3898,8 @@ export declare const contains: {
|
|
|
3786
3898
|
/**
|
|
3787
3899
|
* Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
|
|
3788
3900
|
*
|
|
3789
|
-
*
|
|
3901
|
+
* **Example** (Checking membership)
|
|
3902
|
+
*
|
|
3790
3903
|
* ```ts
|
|
3791
3904
|
* import { Chunk } from "effect"
|
|
3792
3905
|
*
|
|
@@ -3812,7 +3925,8 @@ export declare const contains: {
|
|
|
3812
3925
|
/**
|
|
3813
3926
|
* Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function.
|
|
3814
3927
|
*
|
|
3815
|
-
*
|
|
3928
|
+
* **Example** (Checking membership with custom equivalence)
|
|
3929
|
+
*
|
|
3816
3930
|
* ```ts
|
|
3817
3931
|
* import { Chunk } from "effect"
|
|
3818
3932
|
*
|
|
@@ -3845,7 +3959,8 @@ export declare const containsWith: <A>(isEquivalent: (self: A, that: A) => boole
|
|
|
3845
3959
|
* Returns the first element that satisfies the specified
|
|
3846
3960
|
* predicate, or `None` if no such element exists.
|
|
3847
3961
|
*
|
|
3848
|
-
*
|
|
3962
|
+
* **Example** (Finding the first matching element)
|
|
3963
|
+
*
|
|
3849
3964
|
* ```ts
|
|
3850
3965
|
* import { Chunk, Option } from "effect"
|
|
3851
3966
|
*
|
|
@@ -3875,7 +3990,8 @@ export declare const findFirst: {
|
|
|
3875
3990
|
* Returns the first element that satisfies the specified
|
|
3876
3991
|
* predicate, or `None` if no such element exists.
|
|
3877
3992
|
*
|
|
3878
|
-
*
|
|
3993
|
+
* **Example** (Finding the first matching element)
|
|
3994
|
+
*
|
|
3879
3995
|
* ```ts
|
|
3880
3996
|
* import { Chunk, Option } from "effect"
|
|
3881
3997
|
*
|
|
@@ -3905,7 +4021,8 @@ export declare const findFirst: {
|
|
|
3905
4021
|
* Returns the first element that satisfies the specified
|
|
3906
4022
|
* predicate, or `None` if no such element exists.
|
|
3907
4023
|
*
|
|
3908
|
-
*
|
|
4024
|
+
* **Example** (Finding the first matching element)
|
|
4025
|
+
*
|
|
3909
4026
|
* ```ts
|
|
3910
4027
|
* import { Chunk, Option } from "effect"
|
|
3911
4028
|
*
|
|
@@ -3935,7 +4052,8 @@ export declare const findFirst: {
|
|
|
3935
4052
|
* Returns the first element that satisfies the specified
|
|
3936
4053
|
* predicate, or `None` if no such element exists.
|
|
3937
4054
|
*
|
|
3938
|
-
*
|
|
4055
|
+
* **Example** (Finding the first matching element)
|
|
4056
|
+
*
|
|
3939
4057
|
* ```ts
|
|
3940
4058
|
* import { Chunk, Option } from "effect"
|
|
3941
4059
|
*
|
|
@@ -3965,7 +4083,8 @@ export declare const findFirst: {
|
|
|
3965
4083
|
* Returns the first element that satisfies the specified
|
|
3966
4084
|
* predicate, or `None` if no such element exists.
|
|
3967
4085
|
*
|
|
3968
|
-
*
|
|
4086
|
+
* **Example** (Finding the first matching element)
|
|
4087
|
+
*
|
|
3969
4088
|
* ```ts
|
|
3970
4089
|
* import { Chunk, Option } from "effect"
|
|
3971
4090
|
*
|
|
@@ -3995,7 +4114,8 @@ export declare const findFirst: {
|
|
|
3995
4114
|
/**
|
|
3996
4115
|
* Return the first index for which a predicate holds.
|
|
3997
4116
|
*
|
|
3998
|
-
*
|
|
4117
|
+
* **Example** (Finding the first matching index)
|
|
4118
|
+
*
|
|
3999
4119
|
* ```ts
|
|
4000
4120
|
* import { Chunk } from "effect"
|
|
4001
4121
|
*
|
|
@@ -4019,7 +4139,8 @@ export declare const findFirstIndex: {
|
|
|
4019
4139
|
/**
|
|
4020
4140
|
* Return the first index for which a predicate holds.
|
|
4021
4141
|
*
|
|
4022
|
-
*
|
|
4142
|
+
* **Example** (Finding the first matching index)
|
|
4143
|
+
*
|
|
4023
4144
|
* ```ts
|
|
4024
4145
|
* import { Chunk } from "effect"
|
|
4025
4146
|
*
|
|
@@ -4043,7 +4164,8 @@ export declare const findFirstIndex: {
|
|
|
4043
4164
|
/**
|
|
4044
4165
|
* Return the first index for which a predicate holds.
|
|
4045
4166
|
*
|
|
4046
|
-
*
|
|
4167
|
+
* **Example** (Finding the first matching index)
|
|
4168
|
+
*
|
|
4047
4169
|
* ```ts
|
|
4048
4170
|
* import { Chunk } from "effect"
|
|
4049
4171
|
*
|
|
@@ -4068,10 +4190,10 @@ export declare const findFirstIndex: {
|
|
|
4068
4190
|
/**
|
|
4069
4191
|
* Find the last element for which a predicate holds.
|
|
4070
4192
|
*
|
|
4071
|
-
*
|
|
4193
|
+
* **Example** (Finding the last matching element)
|
|
4194
|
+
*
|
|
4072
4195
|
* ```ts
|
|
4073
|
-
* import { Chunk } from "effect"
|
|
4074
|
-
* import * as Option from "effect/Option"
|
|
4196
|
+
* import { Chunk, Option } from "effect"
|
|
4075
4197
|
*
|
|
4076
4198
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
4077
4199
|
* const result = Chunk.findLast(chunk, (n) => n < 4)
|
|
@@ -4094,10 +4216,10 @@ export declare const findLast: {
|
|
|
4094
4216
|
/**
|
|
4095
4217
|
* Find the last element for which a predicate holds.
|
|
4096
4218
|
*
|
|
4097
|
-
*
|
|
4219
|
+
* **Example** (Finding the last matching element)
|
|
4220
|
+
*
|
|
4098
4221
|
* ```ts
|
|
4099
|
-
* import { Chunk } from "effect"
|
|
4100
|
-
* import * as Option from "effect/Option"
|
|
4222
|
+
* import { Chunk, Option } from "effect"
|
|
4101
4223
|
*
|
|
4102
4224
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
4103
4225
|
* const result = Chunk.findLast(chunk, (n) => n < 4)
|
|
@@ -4120,10 +4242,10 @@ export declare const findLast: {
|
|
|
4120
4242
|
/**
|
|
4121
4243
|
* Find the last element for which a predicate holds.
|
|
4122
4244
|
*
|
|
4123
|
-
*
|
|
4245
|
+
* **Example** (Finding the last matching element)
|
|
4246
|
+
*
|
|
4124
4247
|
* ```ts
|
|
4125
|
-
* import { Chunk } from "effect"
|
|
4126
|
-
* import * as Option from "effect/Option"
|
|
4248
|
+
* import { Chunk, Option } from "effect"
|
|
4127
4249
|
*
|
|
4128
4250
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
4129
4251
|
* const result = Chunk.findLast(chunk, (n) => n < 4)
|
|
@@ -4146,10 +4268,10 @@ export declare const findLast: {
|
|
|
4146
4268
|
/**
|
|
4147
4269
|
* Find the last element for which a predicate holds.
|
|
4148
4270
|
*
|
|
4149
|
-
*
|
|
4271
|
+
* **Example** (Finding the last matching element)
|
|
4272
|
+
*
|
|
4150
4273
|
* ```ts
|
|
4151
|
-
* import { Chunk } from "effect"
|
|
4152
|
-
* import * as Option from "effect/Option"
|
|
4274
|
+
* import { Chunk, Option } from "effect"
|
|
4153
4275
|
*
|
|
4154
4276
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
4155
4277
|
* const result = Chunk.findLast(chunk, (n) => n < 4)
|
|
@@ -4172,10 +4294,10 @@ export declare const findLast: {
|
|
|
4172
4294
|
/**
|
|
4173
4295
|
* Find the last element for which a predicate holds.
|
|
4174
4296
|
*
|
|
4175
|
-
*
|
|
4297
|
+
* **Example** (Finding the last matching element)
|
|
4298
|
+
*
|
|
4176
4299
|
* ```ts
|
|
4177
|
-
* import { Chunk } from "effect"
|
|
4178
|
-
* import * as Option from "effect/Option"
|
|
4300
|
+
* import { Chunk, Option } from "effect"
|
|
4179
4301
|
*
|
|
4180
4302
|
* const chunk = Chunk.make(1, 2, 3, 4, 5)
|
|
4181
4303
|
* const result = Chunk.findLast(chunk, (n) => n < 4)
|
|
@@ -4199,7 +4321,8 @@ export declare const findLast: {
|
|
|
4199
4321
|
/**
|
|
4200
4322
|
* Return the last index for which a predicate holds.
|
|
4201
4323
|
*
|
|
4202
|
-
*
|
|
4324
|
+
* **Example** (Finding the last matching index)
|
|
4325
|
+
*
|
|
4203
4326
|
* ```ts
|
|
4204
4327
|
* import { Chunk } from "effect"
|
|
4205
4328
|
*
|
|
@@ -4223,7 +4346,8 @@ export declare const findLastIndex: {
|
|
|
4223
4346
|
/**
|
|
4224
4347
|
* Return the last index for which a predicate holds.
|
|
4225
4348
|
*
|
|
4226
|
-
*
|
|
4349
|
+
* **Example** (Finding the last matching index)
|
|
4350
|
+
*
|
|
4227
4351
|
* ```ts
|
|
4228
4352
|
* import { Chunk } from "effect"
|
|
4229
4353
|
*
|
|
@@ -4247,7 +4371,8 @@ export declare const findLastIndex: {
|
|
|
4247
4371
|
/**
|
|
4248
4372
|
* Return the last index for which a predicate holds.
|
|
4249
4373
|
*
|
|
4250
|
-
*
|
|
4374
|
+
* **Example** (Finding the last matching index)
|
|
4375
|
+
*
|
|
4251
4376
|
* ```ts
|
|
4252
4377
|
* import { Chunk } from "effect"
|
|
4253
4378
|
*
|
|
@@ -4272,7 +4397,8 @@ export declare const findLastIndex: {
|
|
|
4272
4397
|
/**
|
|
4273
4398
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4274
4399
|
*
|
|
4275
|
-
*
|
|
4400
|
+
* **Example** (Checking every element)
|
|
4401
|
+
*
|
|
4276
4402
|
* ```ts
|
|
4277
4403
|
* import { Chunk } from "effect"
|
|
4278
4404
|
*
|
|
@@ -4299,7 +4425,8 @@ export declare const every: {
|
|
|
4299
4425
|
/**
|
|
4300
4426
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4301
4427
|
*
|
|
4302
|
-
*
|
|
4428
|
+
* **Example** (Checking every element)
|
|
4429
|
+
*
|
|
4303
4430
|
* ```ts
|
|
4304
4431
|
* import { Chunk } from "effect"
|
|
4305
4432
|
*
|
|
@@ -4326,7 +4453,8 @@ export declare const every: {
|
|
|
4326
4453
|
/**
|
|
4327
4454
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4328
4455
|
*
|
|
4329
|
-
*
|
|
4456
|
+
* **Example** (Checking every element)
|
|
4457
|
+
*
|
|
4330
4458
|
* ```ts
|
|
4331
4459
|
* import { Chunk } from "effect"
|
|
4332
4460
|
*
|
|
@@ -4353,7 +4481,8 @@ export declare const every: {
|
|
|
4353
4481
|
/**
|
|
4354
4482
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4355
4483
|
*
|
|
4356
|
-
*
|
|
4484
|
+
* **Example** (Checking every element)
|
|
4485
|
+
*
|
|
4357
4486
|
* ```ts
|
|
4358
4487
|
* import { Chunk } from "effect"
|
|
4359
4488
|
*
|
|
@@ -4380,7 +4509,8 @@ export declare const every: {
|
|
|
4380
4509
|
/**
|
|
4381
4510
|
* Check if a predicate holds true for every `Chunk` element.
|
|
4382
4511
|
*
|
|
4383
|
-
*
|
|
4512
|
+
* **Example** (Checking every element)
|
|
4513
|
+
*
|
|
4384
4514
|
* ```ts
|
|
4385
4515
|
* import { Chunk } from "effect"
|
|
4386
4516
|
*
|
|
@@ -4408,7 +4538,8 @@ export declare const every: {
|
|
|
4408
4538
|
/**
|
|
4409
4539
|
* Check if a predicate holds true for some `Chunk` element.
|
|
4410
4540
|
*
|
|
4411
|
-
*
|
|
4541
|
+
* **Example** (Checking for some matching element)
|
|
4542
|
+
*
|
|
4412
4543
|
* ```ts
|
|
4413
4544
|
* import { Chunk } from "effect"
|
|
4414
4545
|
*
|
|
@@ -4432,7 +4563,8 @@ export declare const some: {
|
|
|
4432
4563
|
/**
|
|
4433
4564
|
* Check if a predicate holds true for some `Chunk` element.
|
|
4434
4565
|
*
|
|
4435
|
-
*
|
|
4566
|
+
* **Example** (Checking for some matching element)
|
|
4567
|
+
*
|
|
4436
4568
|
* ```ts
|
|
4437
4569
|
* import { Chunk } from "effect"
|
|
4438
4570
|
*
|
|
@@ -4456,7 +4588,8 @@ export declare const some: {
|
|
|
4456
4588
|
/**
|
|
4457
4589
|
* Check if a predicate holds true for some `Chunk` element.
|
|
4458
4590
|
*
|
|
4459
|
-
*
|
|
4591
|
+
* **Example** (Checking for some matching element)
|
|
4592
|
+
*
|
|
4460
4593
|
* ```ts
|
|
4461
4594
|
* import { Chunk } from "effect"
|
|
4462
4595
|
*
|
|
@@ -4481,7 +4614,8 @@ export declare const some: {
|
|
|
4481
4614
|
/**
|
|
4482
4615
|
* Joins the elements together with "sep" in the middle.
|
|
4483
4616
|
*
|
|
4484
|
-
*
|
|
4617
|
+
* **Example** (Joining chunks into a string)
|
|
4618
|
+
*
|
|
4485
4619
|
* ```ts
|
|
4486
4620
|
* import { Chunk } from "effect"
|
|
4487
4621
|
*
|
|
@@ -4509,7 +4643,8 @@ export declare const join: {
|
|
|
4509
4643
|
/**
|
|
4510
4644
|
* Joins the elements together with "sep" in the middle.
|
|
4511
4645
|
*
|
|
4512
|
-
*
|
|
4646
|
+
* **Example** (Joining chunks into a string)
|
|
4647
|
+
*
|
|
4513
4648
|
* ```ts
|
|
4514
4649
|
* import { Chunk } from "effect"
|
|
4515
4650
|
*
|
|
@@ -4537,7 +4672,8 @@ export declare const join: {
|
|
|
4537
4672
|
/**
|
|
4538
4673
|
* Joins the elements together with "sep" in the middle.
|
|
4539
4674
|
*
|
|
4540
|
-
*
|
|
4675
|
+
* **Example** (Joining chunks into a string)
|
|
4676
|
+
*
|
|
4541
4677
|
* ```ts
|
|
4542
4678
|
* import { Chunk } from "effect"
|
|
4543
4679
|
*
|
|
@@ -4566,7 +4702,8 @@ export declare const join: {
|
|
|
4566
4702
|
/**
|
|
4567
4703
|
* Reduces the elements of a chunk from left to right.
|
|
4568
4704
|
*
|
|
4569
|
-
*
|
|
4705
|
+
* **Example** (Reducing from the left)
|
|
4706
|
+
*
|
|
4570
4707
|
* ```ts
|
|
4571
4708
|
* import { Chunk } from "effect"
|
|
4572
4709
|
*
|
|
@@ -4591,7 +4728,8 @@ export declare const reduce: {
|
|
|
4591
4728
|
/**
|
|
4592
4729
|
* Reduces the elements of a chunk from left to right.
|
|
4593
4730
|
*
|
|
4594
|
-
*
|
|
4731
|
+
* **Example** (Reducing from the left)
|
|
4732
|
+
*
|
|
4595
4733
|
* ```ts
|
|
4596
4734
|
* import { Chunk } from "effect"
|
|
4597
4735
|
*
|
|
@@ -4616,7 +4754,8 @@ export declare const reduce: {
|
|
|
4616
4754
|
/**
|
|
4617
4755
|
* Reduces the elements of a chunk from left to right.
|
|
4618
4756
|
*
|
|
4619
|
-
*
|
|
4757
|
+
* **Example** (Reducing from the left)
|
|
4758
|
+
*
|
|
4620
4759
|
* ```ts
|
|
4621
4760
|
* import { Chunk } from "effect"
|
|
4622
4761
|
*
|
|
@@ -4642,7 +4781,8 @@ export declare const reduce: {
|
|
|
4642
4781
|
/**
|
|
4643
4782
|
* Reduces the elements of a chunk from right to left.
|
|
4644
4783
|
*
|
|
4645
|
-
*
|
|
4784
|
+
* **Example** (Reducing from the right)
|
|
4785
|
+
*
|
|
4646
4786
|
* ```ts
|
|
4647
4787
|
* import { Chunk } from "effect"
|
|
4648
4788
|
*
|
|
@@ -4671,7 +4811,8 @@ export declare const reduceRight: {
|
|
|
4671
4811
|
/**
|
|
4672
4812
|
* Reduces the elements of a chunk from right to left.
|
|
4673
4813
|
*
|
|
4674
|
-
*
|
|
4814
|
+
* **Example** (Reducing from the right)
|
|
4815
|
+
*
|
|
4675
4816
|
* ```ts
|
|
4676
4817
|
* import { Chunk } from "effect"
|
|
4677
4818
|
*
|
|
@@ -4700,7 +4841,8 @@ export declare const reduceRight: {
|
|
|
4700
4841
|
/**
|
|
4701
4842
|
* Reduces the elements of a chunk from right to left.
|
|
4702
4843
|
*
|
|
4703
|
-
*
|
|
4844
|
+
* **Example** (Reducing from the right)
|
|
4845
|
+
*
|
|
4704
4846
|
* ```ts
|
|
4705
4847
|
* import { Chunk } from "effect"
|
|
4706
4848
|
*
|
|
@@ -4731,7 +4873,8 @@ export declare const reduceRight: {
|
|
|
4731
4873
|
* Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function.
|
|
4732
4874
|
* The order and references of result values are determined by the first `Chunk`.
|
|
4733
4875
|
*
|
|
4734
|
-
*
|
|
4876
|
+
* **Example** (Computing difference with custom equivalence)
|
|
4877
|
+
*
|
|
4735
4878
|
* ```ts
|
|
4736
4879
|
* import { Chunk } from "effect"
|
|
4737
4880
|
*
|
|
@@ -4766,7 +4909,8 @@ export declare const differenceWith: <A>(isEquivalent: (self: A, that: A) => boo
|
|
|
4766
4909
|
* Creates a `Chunk` of values not included in the other given `Chunk`.
|
|
4767
4910
|
* The order and references of result values are determined by the first `Chunk`.
|
|
4768
4911
|
*
|
|
4769
|
-
*
|
|
4912
|
+
* **Example** (Computing chunk difference)
|
|
4913
|
+
*
|
|
4770
4914
|
* ```ts
|
|
4771
4915
|
* import { Chunk } from "effect"
|
|
4772
4916
|
*
|
|
@@ -4795,7 +4939,8 @@ export declare const difference: {
|
|
|
4795
4939
|
* Creates a `Chunk` of values not included in the other given `Chunk`.
|
|
4796
4940
|
* The order and references of result values are determined by the first `Chunk`.
|
|
4797
4941
|
*
|
|
4798
|
-
*
|
|
4942
|
+
* **Example** (Computing chunk difference)
|
|
4943
|
+
*
|
|
4799
4944
|
* ```ts
|
|
4800
4945
|
* import { Chunk } from "effect"
|
|
4801
4946
|
*
|
|
@@ -4824,7 +4969,8 @@ export declare const difference: {
|
|
|
4824
4969
|
* Creates a `Chunk` of values not included in the other given `Chunk`.
|
|
4825
4970
|
* The order and references of result values are determined by the first `Chunk`.
|
|
4826
4971
|
*
|
|
4827
|
-
*
|
|
4972
|
+
* **Example** (Computing chunk difference)
|
|
4973
|
+
*
|
|
4828
4974
|
* ```ts
|
|
4829
4975
|
* import { Chunk } from "effect"
|
|
4830
4976
|
*
|