effect 4.0.0-beta.67 → 4.0.0-beta.69
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 +41 -42
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +23 -23
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +265 -265
- package/dist/BigDecimal.js +128 -128
- package/dist/BigInt.d.ts +175 -177
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +81 -79
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +127 -125
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +55 -53
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +10 -4
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +3 -2
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +36 -36
- package/dist/Cache.js +17 -17
- package/dist/Cause.d.ts +17 -18
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +12 -12
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +234 -241
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +98 -102
- package/dist/Channel.js.map +1 -1
- package/dist/Chunk.d.ts +33 -56
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +17 -26
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +1 -1
- package/dist/Clock.js +1 -1
- package/dist/Combiner.d.ts +9 -1
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +8 -0
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +78 -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 +19 -19
- package/dist/Console.js +19 -19
- package/dist/Context.d.ts +70 -108
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +30 -44
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +3 -5
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +3 -5
- 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 +6 -1
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +29 -31
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +19 -19
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +8 -9
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +6 -6
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +2 -2
- package/dist/Duration.d.ts +30 -27
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +15 -12
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +879 -1137
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +375 -465
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +2 -2
- package/dist/Effectable.js +2 -2
- package/dist/Encoding.d.ts +9 -9
- package/dist/Encoding.js +9 -9
- 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 +4 -5
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +2 -2
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +14 -14
- package/dist/ErrorReporter.js +9 -9
- package/dist/ExecutionPlan.d.ts +18 -9
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +6 -4
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +0 -1
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +1 -2
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +5 -5
- package/dist/FiberHandle.js +3 -3
- package/dist/FiberMap.d.ts +10 -10
- package/dist/FiberMap.js +4 -4
- package/dist/FiberSet.d.ts +4 -4
- package/dist/FiberSet.js +2 -2
- package/dist/FileSystem.d.ts +10 -12
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +3 -3
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +54 -54
- package/dist/Filter.js +28 -28
- 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 +64 -65
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +41 -41
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +157 -175
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +72 -80
- package/dist/Graph.js.map +1 -1
- package/dist/Hash.d.ts +4 -6
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +2 -2
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +121 -157
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +47 -59
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +34 -34
- package/dist/HashRing.js +16 -16
- package/dist/HashSet.d.ts +51 -55
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +19 -20
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +6 -4
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +6 -4
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +37 -83
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +21 -39
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +8 -6
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +5 -3
- 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 +4 -16
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +2 -14
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +94 -135
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +44 -61
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +15 -16
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +6 -6
- package/dist/LogLevel.d.ts +13 -13
- package/dist/LogLevel.js +4 -4
- package/dist/Logger.d.ts +10 -11
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +10 -11
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +5 -4
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +4 -3
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +2 -4
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +1 -2
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +48 -50
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +22 -22
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +30 -30
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +15 -14
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +0 -2
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +23 -24
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +17 -19
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +0 -1
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +12 -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 +5 -12
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +3 -8
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +145 -141
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +65 -61
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +5 -5
- package/dist/Optic.js +5 -5
- package/dist/Option.d.ts +105 -109
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +50 -52
- 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 +15 -19
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +6 -6
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +3 -3
- package/dist/PartitionedSemaphore.js +2 -2
- package/dist/Path.d.ts +4 -4
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +2 -1
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +10 -7
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +6 -4
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +3 -3
- package/dist/PlatformError.js +2 -2
- package/dist/Predicate.d.ts +2 -4
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +3 -3
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +2 -1
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +2 -1
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +25 -51
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +17 -35
- package/dist/PubSub.js.map +1 -1
- package/dist/Queue.d.ts +45 -60
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +27 -33
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +27 -38
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +17 -54
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +11 -11
- package/dist/RcMap.js +3 -3
- package/dist/RcRef.d.ts +0 -1
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +9 -8
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +7 -5
- 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 +2 -3
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +2 -2
- 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 +7 -17
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +5 -12
- package/dist/Ref.js.map +1 -1
- package/dist/RegExp.d.ts +1 -1
- package/dist/RegExp.js +1 -1
- package/dist/Request.d.ts +2 -1
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +1 -0
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +2 -3
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +1 -1
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +1 -1
- package/dist/Resource.js +1 -1
- package/dist/Result.d.ts +124 -142
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +51 -63
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +2 -7
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +1 -3
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +69 -72
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +31 -33
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +2 -2
- package/dist/Scheduler.js +2 -2
- package/dist/Schema.d.ts +491 -321
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +220 -172
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +98 -77
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +89 -68
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +23 -23
- package/dist/SchemaGetter.js +20 -20
- package/dist/SchemaIssue.d.ts +18 -16
- 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 +39 -40
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +48 -51
- 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 +36 -5
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +33 -5
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +1 -1
- package/dist/SchemaUtils.js +1 -1
- package/dist/Scope.d.ts +12 -29
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +6 -11
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +37 -37
- package/dist/ScopedCache.js +17 -17
- package/dist/Semaphore.d.ts +4 -16
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +2 -14
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +36 -39
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +18 -18
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +6 -6
- package/dist/Stdio.js +4 -4
- package/dist/Stream.d.ts +671 -808
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +289 -363
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +3 -2
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +3 -2
- 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 +2 -2
- package/dist/SubscriptionRef.js +2 -2
- package/dist/Symbol.d.ts +3 -3
- package/dist/Symbol.js +3 -3
- package/dist/SynchronizedRef.d.ts +1 -1
- package/dist/SynchronizedRef.js +1 -1
- package/dist/Take.d.ts +2 -2
- package/dist/Take.js +1 -1
- package/dist/Terminal.d.ts +5 -5
- package/dist/Terminal.js +2 -2
- package/dist/Tracer.d.ts +9 -9
- package/dist/Tracer.js +2 -2
- package/dist/Trie.d.ts +70 -106
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +29 -43
- 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 +27 -18
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +15 -10
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +11 -11
- package/dist/TxDeferred.js +5 -5
- package/dist/TxHashMap.d.ts +60 -61
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +23 -23
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +28 -32
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +13 -16
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +30 -30
- package/dist/TxPriorityQueue.js +18 -18
- package/dist/TxPubSub.d.ts +18 -18
- package/dist/TxPubSub.js +14 -14
- package/dist/TxQueue.d.ts +26 -29
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +17 -17
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +21 -21
- package/dist/TxReentrantLock.js +15 -15
- package/dist/TxRef.d.ts +24 -24
- package/dist/TxRef.js +11 -11
- package/dist/TxSemaphore.d.ts +13 -74
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +9 -52
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +24 -24
- package/dist/TxSubscriptionRef.js +11 -11
- package/dist/Types.d.ts +1 -4
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.d.ts +14 -0
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +8 -0
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +8 -8
- package/dist/Unify.js +1 -1
- package/dist/Utils.d.ts +1 -2
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +1934 -436
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1934 -436
- package/dist/index.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +3 -3
- package/dist/testing/FastCheck.js +3 -3
- package/dist/testing/TestClock.d.ts +2 -3
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +1 -1
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +8 -9
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +5 -5
- 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 +2 -0
- 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 +10 -19
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +0 -9
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +0 -1
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +3 -0
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +2 -0
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +3 -1
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +1 -1
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +2 -6
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +2 -2
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +8 -10
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +4 -4
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +20 -20
- package/dist/unstable/ai/ResponseIdTracker.d.ts +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +5 -5
- package/dist/unstable/ai/Telemetry.js +3 -3
- package/dist/unstable/ai/Tokenizer.d.ts +1 -1
- package/dist/unstable/ai/Tool.d.ts +14 -12
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +10 -9
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +80 -6
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +80 -6
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +5 -6
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +2 -3
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +3 -3
- package/dist/unstable/cli/Command.js +1 -1
- package/dist/unstable/cli/Flag.d.ts +23 -0
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +23 -0
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +4 -4
- package/dist/unstable/cli/Param.d.ts +33 -1
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +64 -38
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +1 -1
- package/dist/unstable/cli/Primitive.js +1 -1
- package/dist/unstable/cli/Prompt.d.ts +6 -14
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +2 -2
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.d.ts +212 -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/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +3 -0
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +3 -0
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/help.d.ts.map +1 -1
- package/dist/unstable/cli/internal/help.js +10 -0
- package/dist/unstable/cli/internal/help.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +3 -1
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
- package/dist/unstable/cluster/ClusterCron.js +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +8 -8
- package/dist/unstable/cluster/ClusterSchema.js +8 -8
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +2 -2
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +2 -2
- package/dist/unstable/cluster/Entity.d.ts +0 -1
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +10 -14
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +8 -14
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +3 -2
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +2 -2
- package/dist/unstable/cluster/EntityResource.d.ts +2 -2
- package/dist/unstable/cluster/EntityResource.js +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +1 -1
- package/dist/unstable/cluster/Envelope.js +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +11 -11
- package/dist/unstable/cluster/HttpRunner.js +11 -11
- package/dist/unstable/cluster/K8sHttpClient.d.ts +5 -5
- package/dist/unstable/cluster/K8sHttpClient.js +5 -5
- package/dist/unstable/cluster/MachineId.d.ts +1 -1
- package/dist/unstable/cluster/MachineId.js +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +1 -2
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +1 -1
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/Runner.js +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +2 -2
- package/dist/unstable/cluster/RunnerHealth.js +2 -2
- package/dist/unstable/cluster/RunnerServer.d.ts +4 -4
- package/dist/unstable/cluster/RunnerServer.js +4 -4
- package/dist/unstable/cluster/Runners.d.ts +3 -3
- package/dist/unstable/cluster/Runners.js +3 -3
- package/dist/unstable/cluster/ShardId.d.ts +7 -5
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +6 -4
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.js +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +2 -2
- package/dist/unstable/cluster/ShardingConfig.js +2 -2
- package/dist/unstable/cluster/SingleRunner.d.ts +1 -1
- package/dist/unstable/cluster/SingleRunner.js +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +10 -9
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +4 -3
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +2 -2
- package/dist/unstable/cluster/SocketRunner.js +2 -2
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +3 -3
- package/dist/unstable/cluster/SqlMessageStorage.js +3 -3
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +3 -3
- package/dist/unstable/cluster/SqlRunnerStorage.js +3 -3
- package/dist/unstable/cluster/TestRunner.d.ts +1 -1
- package/dist/unstable/cluster/TestRunner.js +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/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/Sse.d.ts +16 -16
- package/dist/unstable/encoding/Sse.js +11 -11
- 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 +2 -2
- package/dist/unstable/eventlog/Event.js +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +2 -2
- package/dist/unstable/eventlog/EventGroup.js +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +6 -7
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +4 -4
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +2 -2
- package/dist/unstable/eventlog/EventLogRemote.js +2 -2
- package/dist/unstable/eventlog/EventLogServer.d.ts +2 -2
- package/dist/unstable/eventlog/EventLogServer.js +2 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +2 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +2 -2
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +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 +6 -6
- package/dist/unstable/http/Cookies.js +4 -4
- package/dist/unstable/http/Etag.d.ts +2 -2
- package/dist/unstable/http/Etag.js +2 -2
- package/dist/unstable/http/Headers.d.ts +2 -2
- package/dist/unstable/http/Headers.js +1 -1
- package/dist/unstable/http/HttpClient.d.ts +5 -6
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +5 -4
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +1 -1
- package/dist/unstable/http/HttpClientError.js +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +4 -4
- package/dist/unstable/http/HttpClientRequest.js +4 -4
- package/dist/unstable/http/HttpClientResponse.d.ts +6 -6
- package/dist/unstable/http/HttpClientResponse.js +6 -6
- package/dist/unstable/http/HttpEffect.d.ts +5 -5
- package/dist/unstable/http/HttpEffect.js +5 -5
- package/dist/unstable/http/HttpIncomingMessage.d.ts +7 -6
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +7 -6
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +4 -2
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +4 -1
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -0
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +23 -25
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +23 -22
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +4 -1
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +4 -1
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +15 -15
- package/dist/unstable/http/HttpServerRequest.js +15 -15
- package/dist/unstable/http/HttpServerRespondable.d.ts +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +5 -4
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +5 -4
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +2 -4
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +2 -4
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +20 -19
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +19 -17
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.d.ts +0 -1
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +17 -17
- package/dist/unstable/http/Url.js +8 -8
- package/dist/unstable/http/UrlParams.d.ts +14 -12
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +12 -10
- 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/HttpApiBuilder.d.ts +0 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +0 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +4 -2
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +3 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +19 -8
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +11 -8
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +0 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts +0 -2
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +0 -2
- package/dist/unstable/httpapi/HttpApiSwagger.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 +3 -3
- package/dist/unstable/observability/Otlp.js +3 -3
- package/dist/unstable/observability/OtlpExporter.d.ts +1 -1
- package/dist/unstable/observability/OtlpExporter.js +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +3 -2
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +2 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +5 -4
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +2 -2
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +9 -9
- package/dist/unstable/observability/OtlpResource.js +2 -2
- package/dist/unstable/observability/OtlpSerialization.d.ts +3 -3
- package/dist/unstable/observability/OtlpSerialization.js +3 -3
- package/dist/unstable/observability/OtlpTracer.d.ts +5 -2
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +2 -2
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +7 -7
- package/dist/unstable/observability/PrometheusMetrics.js +2 -2
- package/dist/unstable/observability/index.d.ts +159 -3
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +159 -3
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +4 -4
- package/dist/unstable/persistence/KeyValueStore.js +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +11 -11
- package/dist/unstable/persistence/Persistable.js +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +2 -2
- package/dist/unstable/persistence/PersistedCache.js +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +6 -6
- package/dist/unstable/persistence/PersistedQueue.js +3 -3
- package/dist/unstable/persistence/Persistence.d.ts +2 -1
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +2 -1
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +19 -15
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +14 -10
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +3 -3
- package/dist/unstable/persistence/Redis.js +3 -3
- 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 +41 -41
- package/dist/unstable/process/ChildProcess.js +11 -11
- package/dist/unstable/process/ChildProcessSpawner.d.ts +10 -10
- package/dist/unstable/process/ChildProcessSpawner.js +5 -5
- package/dist/unstable/process/index.d.ts +1 -1
- package/dist/unstable/process/index.js +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +8 -6
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +3 -3
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +25 -20
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +12 -12
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +2 -2
- package/dist/unstable/reactivity/AtomHttpApi.js +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +2 -2
- package/dist/unstable/reactivity/AtomRef.js +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +16 -16
- package/dist/unstable/reactivity/AtomRegistry.js +7 -7
- package/dist/unstable/reactivity/AtomRpc.d.ts +2 -2
- package/dist/unstable/reactivity/AtomRpc.js +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +2 -3
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +2 -3
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/reactivity/index.d.ts +166 -0
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +166 -0
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +0 -1
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +0 -1
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +2 -2
- package/dist/unstable/rpc/RpcClientError.js +2 -2
- package/dist/unstable/rpc/RpcMiddleware.d.ts +2 -2
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +0 -1
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js +1 -1
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts +2 -0
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +2 -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 +63 -8
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +44 -5
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -4
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +1 -1
- 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 +5 -4
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +4 -3
- package/dist/unstable/socket/Socket.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 +11 -9
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +10 -8
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +4 -0
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +2 -0
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +3 -3
- package/dist/unstable/sql/SqlError.d.ts +18 -0
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +17 -0
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +0 -1
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +5 -5
- package/dist/unstable/sql/SqlSchema.js +5 -5
- package/dist/unstable/sql/SqlStream.d.ts +1 -0
- package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
- package/dist/unstable/sql/SqlStream.js +1 -0
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +27 -24
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +9 -6
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +178 -1
- package/dist/unstable/sql/index.d.ts.map +1 -1
- package/dist/unstable/sql/index.js +178 -1
- package/dist/unstable/sql/index.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +7 -7
- package/dist/unstable/workers/Transferable.js +4 -4
- package/dist/unstable/workers/Worker.d.ts +1 -0
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +1 -0
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +8 -8
- package/dist/unstable/workers/WorkerError.js +7 -7
- package/dist/unstable/workers/index.d.ts +80 -0
- package/dist/unstable/workers/index.d.ts.map +1 -1
- package/dist/unstable/workers/index.js +80 -0
- package/dist/unstable/workers/index.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +7 -7
- package/dist/unstable/workflow/Activity.js +2 -2
- package/dist/unstable/workflow/DurableClock.d.ts +2 -2
- package/dist/unstable/workflow/DurableClock.js +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +22 -20
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +8 -7
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +7 -5
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +5 -3
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +12 -10
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +3 -3
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +4 -4
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +9 -13
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +10 -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 +3 -2
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +2 -2
- 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 +3 -3
- package/src/Array.ts +41 -42
- package/src/BigDecimal.ts +265 -265
- package/src/BigInt.ts +175 -177
- package/src/Boolean.ts +127 -125
- package/src/Brand.ts +10 -4
- package/src/Cache.ts +42 -42
- package/src/Cause.ts +17 -18
- package/src/Channel.ts +256 -257
- package/src/Chunk.ts +33 -56
- package/src/Clock.ts +1 -1
- package/src/Combiner.ts +9 -1
- package/src/Config.ts +78 -68
- package/src/ConfigProvider.ts +33 -32
- package/src/Console.ts +23 -23
- package/src/Context.ts +70 -108
- package/src/Cron.ts +3 -5
- package/src/Crypto.ts +327 -0
- package/src/Data.ts +6 -1
- package/src/DateTime.ts +29 -31
- package/src/Deferred.ts +8 -9
- package/src/Differ.ts +2 -2
- package/src/Duration.ts +30 -27
- package/src/Effect.ts +893 -1151
- package/src/Effectable.ts +2 -2
- package/src/Encoding.ts +9 -9
- package/src/Equal.ts +4 -3
- package/src/Equivalence.ts +4 -5
- package/src/ErrorReporter.ts +14 -14
- package/src/ExecutionPlan.ts +18 -9
- package/src/Exit.ts +0 -1
- package/src/Fiber.ts +1 -2
- package/src/FiberHandle.ts +5 -5
- package/src/FiberMap.ts +10 -10
- package/src/FiberSet.ts +4 -4
- package/src/FileSystem.ts +10 -12
- package/src/Filter.ts +54 -54
- package/src/Formatter.ts +4 -70
- package/src/Function.ts +64 -65
- package/src/Graph.ts +157 -175
- package/src/Hash.ts +4 -6
- package/src/HashMap.ts +121 -157
- package/src/HashRing.ts +34 -34
- package/src/HashSet.ts +51 -55
- package/src/Inspectable.ts +8 -7
- package/src/Iterable.ts +37 -83
- package/src/JsonPatch.ts +9 -7
- package/src/JsonPointer.ts +13 -11
- package/src/JsonSchema.ts +16 -0
- package/src/Latch.ts +4 -16
- package/src/Layer.ts +94 -135
- package/src/LayerMap.ts +15 -16
- package/src/LogLevel.ts +13 -13
- package/src/Logger.ts +16 -17
- package/src/ManagedRuntime.ts +5 -4
- package/src/Match.ts +2 -4
- package/src/Metric.ts +56 -58
- package/src/MutableHashMap.ts +42 -44
- package/src/MutableHashSet.ts +0 -2
- package/src/MutableList.ts +23 -26
- package/src/MutableRef.ts +0 -1
- package/src/Newtype.ts +12 -2
- package/src/NonEmptyIterable.ts +5 -12
- package/src/Number.ts +145 -141
- package/src/Optic.ts +5 -5
- package/src/Option.ts +105 -109
- package/src/Order.ts +6 -6
- package/src/Ordering.ts +15 -19
- package/src/PartitionedSemaphore.ts +3 -3
- package/src/Path.ts +4 -4
- package/src/Pipeable.ts +10 -7
- package/src/PlatformError.ts +3 -3
- package/src/Predicate.ts +3 -5
- package/src/PrimaryKey.ts +2 -1
- package/src/PubSub.ts +25 -51
- package/src/Queue.ts +45 -60
- package/src/Random.ts +31 -74
- package/src/RcMap.ts +11 -11
- package/src/RcRef.ts +0 -1
- package/src/Record.ts +9 -8
- package/src/Redactable.ts +7 -5
- package/src/Redacted.ts +2 -3
- package/src/Reducer.ts +3 -1
- package/src/Ref.ts +15 -33
- package/src/RegExp.ts +1 -1
- package/src/Request.ts +2 -1
- package/src/RequestResolver.ts +2 -3
- package/src/Resource.ts +1 -1
- package/src/Result.ts +124 -142
- package/src/Runtime.ts +2 -7
- package/src/Schedule.ts +74 -77
- package/src/Scheduler.ts +2 -2
- package/src/Schema.ts +491 -321
- package/src/SchemaAST.ts +98 -77
- package/src/SchemaGetter.ts +23 -23
- package/src/SchemaIssue.ts +18 -16
- package/src/SchemaParser.ts +46 -49
- package/src/SchemaRepresentation.ts +89 -77
- package/src/SchemaTransformation.ts +36 -5
- package/src/SchemaUtils.ts +1 -1
- package/src/Scope.ts +12 -29
- package/src/ScopedCache.ts +43 -43
- package/src/Semaphore.ts +4 -16
- package/src/Sink.ts +36 -39
- package/src/Stdio.ts +6 -6
- package/src/Stream.ts +789 -828
- package/src/String.ts +3 -2
- package/src/Struct.ts +20 -18
- package/src/SubscriptionRef.ts +2 -2
- package/src/Symbol.ts +3 -3
- package/src/SynchronizedRef.ts +1 -1
- package/src/Take.ts +2 -2
- package/src/Terminal.ts +5 -5
- package/src/Tracer.ts +9 -9
- package/src/Trie.ts +70 -106
- package/src/Tuple.ts +34 -32
- package/src/TxChunk.ts +27 -18
- package/src/TxDeferred.ts +11 -11
- package/src/TxHashMap.ts +62 -63
- package/src/TxHashSet.ts +38 -42
- package/src/TxPriorityQueue.ts +31 -31
- package/src/TxPubSub.ts +18 -18
- package/src/TxQueue.ts +26 -29
- package/src/TxReentrantLock.ts +21 -21
- package/src/TxRef.ts +24 -24
- package/src/TxSemaphore.ts +13 -74
- package/src/TxSubscriptionRef.ts +24 -24
- package/src/Types.ts +1 -4
- package/src/UndefinedOr.ts +14 -0
- package/src/Unify.ts +8 -8
- package/src/Utils.ts +1 -2
- package/src/index.ts +1932 -433
- package/src/testing/FastCheck.ts +3 -3
- package/src/testing/TestClock.ts +2 -3
- package/src/testing/TestConsole.ts +8 -9
- package/src/testing/TestSchema.ts +2 -0
- package/src/testing/index.ts +34 -0
- package/src/unstable/ai/AiError.ts +10 -19
- package/src/unstable/ai/Chat.ts +0 -1
- package/src/unstable/ai/McpSchema.ts +3 -0
- package/src/unstable/ai/McpServer.ts +3 -1
- package/src/unstable/ai/Model.ts +2 -6
- package/src/unstable/ai/Prompt.ts +8 -10
- package/src/unstable/ai/Response.ts +20 -20
- package/src/unstable/ai/ResponseIdTracker.ts +1 -1
- package/src/unstable/ai/Telemetry.ts +5 -5
- package/src/unstable/ai/Tokenizer.ts +1 -1
- package/src/unstable/ai/Tool.ts +14 -12
- package/src/unstable/ai/index.ts +80 -6
- package/src/unstable/cli/CliOutput.ts +5 -6
- package/src/unstable/cli/Command.ts +3 -3
- package/src/unstable/cli/Flag.ts +24 -0
- package/src/unstable/cli/HelpDoc.ts +4 -4
- package/src/unstable/cli/Param.ts +101 -72
- package/src/unstable/cli/Primitive.ts +1 -1
- package/src/unstable/cli/Prompt.ts +6 -14
- package/src/unstable/cli/index.ts +205 -6
- package/src/unstable/cli/internal/command.ts +3 -0
- package/src/unstable/cli/internal/completions/descriptor.ts +3 -0
- package/src/unstable/cli/internal/help.ts +10 -0
- package/src/unstable/cli/internal/parser.ts +3 -1
- package/src/unstable/cluster/ClusterCron.ts +1 -1
- package/src/unstable/cluster/ClusterSchema.ts +8 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +2 -2
- package/src/unstable/cluster/Entity.ts +0 -1
- package/src/unstable/cluster/EntityProxy.ts +10 -14
- package/src/unstable/cluster/EntityProxyServer.ts +3 -2
- package/src/unstable/cluster/EntityResource.ts +2 -2
- package/src/unstable/cluster/Envelope.ts +1 -1
- package/src/unstable/cluster/HttpRunner.ts +11 -11
- package/src/unstable/cluster/K8sHttpClient.ts +5 -5
- package/src/unstable/cluster/MachineId.ts +1 -1
- package/src/unstable/cluster/MessageStorage.ts +1 -2
- package/src/unstable/cluster/Runner.ts +1 -1
- package/src/unstable/cluster/RunnerHealth.ts +2 -2
- package/src/unstable/cluster/RunnerServer.ts +4 -4
- package/src/unstable/cluster/Runners.ts +3 -3
- package/src/unstable/cluster/ShardId.ts +7 -5
- package/src/unstable/cluster/Sharding.ts +1 -1
- package/src/unstable/cluster/ShardingConfig.ts +2 -2
- package/src/unstable/cluster/SingleRunner.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +10 -9
- package/src/unstable/cluster/SocketRunner.ts +2 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +3 -3
- package/src/unstable/cluster/SqlRunnerStorage.ts +3 -3
- package/src/unstable/cluster/TestRunner.ts +1 -1
- package/src/unstable/cluster/index.ts +790 -0
- package/src/unstable/devtools/index.ts +58 -0
- package/src/unstable/encoding/Sse.ts +16 -16
- package/src/unstable/encoding/index.ts +49 -0
- package/src/unstable/eventlog/Event.ts +2 -2
- package/src/unstable/eventlog/EventGroup.ts +2 -2
- package/src/unstable/eventlog/EventLog.ts +6 -7
- package/src/unstable/eventlog/EventLogRemote.ts +2 -2
- package/src/unstable/eventlog/EventLogServer.ts +2 -2
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +2 -2
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +1 -1
- package/src/unstable/eventlog/EventLogSessionAuth.ts +1 -1
- package/src/unstable/eventlog/index.ts +240 -0
- package/src/unstable/http/Cookies.ts +6 -6
- package/src/unstable/http/Etag.ts +2 -2
- package/src/unstable/http/Headers.ts +2 -2
- package/src/unstable/http/HttpClient.ts +5 -6
- package/src/unstable/http/HttpClientError.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +4 -4
- package/src/unstable/http/HttpClientResponse.ts +6 -6
- package/src/unstable/http/HttpEffect.ts +5 -5
- package/src/unstable/http/HttpIncomingMessage.ts +7 -6
- package/src/unstable/http/HttpMethod.ts +4 -2
- package/src/unstable/http/HttpMiddleware.ts +1 -0
- package/src/unstable/http/HttpRouter.ts +23 -25
- package/src/unstable/http/HttpServerError.ts +4 -1
- package/src/unstable/http/HttpServerRequest.ts +15 -15
- package/src/unstable/http/HttpServerRespondable.ts +1 -1
- package/src/unstable/http/HttpServerResponse.ts +5 -4
- package/src/unstable/http/HttpStaticServer.ts +2 -4
- package/src/unstable/http/Multipart.ts +20 -19
- package/src/unstable/http/Template.ts +0 -1
- package/src/unstable/http/Url.ts +17 -17
- package/src/unstable/http/UrlParams.ts +14 -12
- package/src/unstable/http/index.ts +452 -0
- package/src/unstable/httpapi/HttpApiBuilder.ts +0 -1
- package/src/unstable/httpapi/HttpApiClient.ts +0 -1
- package/src/unstable/httpapi/HttpApiMiddleware.ts +4 -2
- package/src/unstable/httpapi/HttpApiScalar.ts +2 -2
- package/src/unstable/httpapi/HttpApiSchema.ts +19 -8
- package/src/unstable/httpapi/HttpApiSecurity.ts +0 -1
- package/src/unstable/httpapi/HttpApiSwagger.ts +0 -2
- package/src/unstable/httpapi/index.ts +310 -25
- package/src/unstable/observability/Otlp.ts +3 -3
- package/src/unstable/observability/OtlpExporter.ts +1 -1
- package/src/unstable/observability/OtlpLogger.ts +3 -2
- package/src/unstable/observability/OtlpMetrics.ts +5 -4
- package/src/unstable/observability/OtlpResource.ts +9 -9
- package/src/unstable/observability/OtlpSerialization.ts +3 -3
- package/src/unstable/observability/OtlpTracer.ts +5 -2
- package/src/unstable/observability/PrometheusMetrics.ts +7 -7
- package/src/unstable/observability/index.ts +159 -3
- package/src/unstable/persistence/KeyValueStore.ts +4 -4
- package/src/unstable/persistence/Persistable.ts +11 -11
- package/src/unstable/persistence/PersistedCache.ts +2 -2
- package/src/unstable/persistence/PersistedQueue.ts +6 -6
- package/src/unstable/persistence/Persistence.ts +2 -1
- package/src/unstable/persistence/RateLimiter.ts +19 -15
- package/src/unstable/persistence/Redis.ts +3 -3
- package/src/unstable/persistence/index.ts +147 -0
- package/src/unstable/process/ChildProcess.ts +42 -42
- package/src/unstable/process/ChildProcessSpawner.ts +10 -10
- package/src/unstable/process/index.ts +1 -1
- package/src/unstable/reactivity/AsyncResult.ts +8 -6
- package/src/unstable/reactivity/Atom.ts +25 -20
- package/src/unstable/reactivity/AtomHttpApi.ts +2 -2
- package/src/unstable/reactivity/AtomRef.ts +2 -2
- package/src/unstable/reactivity/AtomRegistry.ts +17 -17
- package/src/unstable/reactivity/AtomRpc.ts +2 -2
- package/src/unstable/reactivity/Reactivity.ts +2 -3
- package/src/unstable/reactivity/index.ts +166 -0
- package/src/unstable/rpc/Rpc.ts +0 -1
- package/src/unstable/rpc/RpcClient.ts +0 -1
- package/src/unstable/rpc/RpcClientError.ts +2 -2
- package/src/unstable/rpc/RpcMiddleware.ts +2 -2
- package/src/unstable/rpc/RpcWorker.ts +3 -2
- package/src/unstable/rpc/Utils.ts +2 -0
- package/src/unstable/rpc/index.ts +272 -0
- package/src/unstable/schema/Model.ts +98 -10
- package/src/unstable/schema/VariantSchema.ts +1 -4
- package/src/unstable/schema/index.ts +37 -0
- package/src/unstable/socket/Socket.ts +5 -4
- package/src/unstable/socket/index.ts +44 -0
- package/src/unstable/sql/Migrator.ts +14 -12
- package/src/unstable/sql/SqlClient.ts +4 -0
- package/src/unstable/sql/SqlConnection.ts +3 -3
- package/src/unstable/sql/SqlError.ts +18 -0
- package/src/unstable/sql/SqlModel.ts +0 -1
- package/src/unstable/sql/SqlSchema.ts +5 -5
- package/src/unstable/sql/SqlStream.ts +1 -0
- package/src/unstable/sql/Statement.ts +27 -24
- package/src/unstable/sql/index.ts +178 -1
- package/src/unstable/workers/Transferable.ts +7 -7
- package/src/unstable/workers/Worker.ts +1 -0
- package/src/unstable/workers/WorkerError.ts +8 -8
- package/src/unstable/workers/index.ts +80 -0
- package/src/unstable/workflow/Activity.ts +7 -7
- package/src/unstable/workflow/DurableClock.ts +2 -2
- package/src/unstable/workflow/DurableDeferred.ts +22 -20
- package/src/unstable/workflow/DurableQueue.ts +7 -5
- package/src/unstable/workflow/Workflow.ts +12 -10
- package/src/unstable/workflow/WorkflowEngine.ts +11 -15
- package/src/unstable/workflow/WorkflowProxy.ts +10 -12
- package/src/unstable/workflow/WorkflowProxyServer.ts +3 -2
- package/src/unstable/workflow/index.ts +160 -0
package/src/HashMap.ts
CHANGED
|
@@ -93,7 +93,7 @@ const TypeId = internal.HashMapTypeId
|
|
|
93
93
|
* **Example** (Using basic HashMap operations)
|
|
94
94
|
*
|
|
95
95
|
* ```ts
|
|
96
|
-
* import
|
|
96
|
+
* import { HashMap } from "effect"
|
|
97
97
|
*
|
|
98
98
|
* // Create a HashMap
|
|
99
99
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
@@ -124,7 +124,7 @@ export interface HashMap<out Key, out Value> extends Iterable<[Key, Value]>, Equ
|
|
|
124
124
|
* **Example** (Extracting HashMap types)
|
|
125
125
|
*
|
|
126
126
|
* ```ts
|
|
127
|
-
* import
|
|
127
|
+
* import { HashMap } from "effect"
|
|
128
128
|
*
|
|
129
129
|
* // Create a concrete HashMap for type extraction
|
|
130
130
|
* const inventory = HashMap.make(
|
|
@@ -149,7 +149,6 @@ export interface HashMap<out Key, out Value> extends Iterable<[Key, Value]>, Equ
|
|
|
149
149
|
* const updatedInventory = updateInventory("tablet", newProduct)
|
|
150
150
|
* ```
|
|
151
151
|
*
|
|
152
|
-
* @category models
|
|
153
152
|
* @since 2.0.0
|
|
154
153
|
*/
|
|
155
154
|
export declare namespace HashMap {
|
|
@@ -161,8 +160,7 @@ export declare namespace HashMap {
|
|
|
161
160
|
* **Example** (Updating values from Options)
|
|
162
161
|
*
|
|
163
162
|
* ```ts
|
|
164
|
-
* import
|
|
165
|
-
* import * as Option from "effect/Option"
|
|
163
|
+
* import { HashMap, Option } from "effect"
|
|
166
164
|
*
|
|
167
165
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
168
166
|
*
|
|
@@ -185,7 +183,7 @@ export declare namespace HashMap {
|
|
|
185
183
|
* **Example** (Extracting key types)
|
|
186
184
|
*
|
|
187
185
|
* ```ts
|
|
188
|
-
* import
|
|
186
|
+
* import { HashMap } from "effect"
|
|
189
187
|
*
|
|
190
188
|
* // Create a HashMap to extract key type from
|
|
191
189
|
* const userMap = HashMap.make(
|
|
@@ -211,7 +209,7 @@ export declare namespace HashMap {
|
|
|
211
209
|
* **Example** (Extracting value types)
|
|
212
210
|
*
|
|
213
211
|
* ```ts
|
|
214
|
-
* import
|
|
212
|
+
* import { HashMap } from "effect"
|
|
215
213
|
*
|
|
216
214
|
* // Create a HashMap with user data
|
|
217
215
|
* const userMap = HashMap.make(
|
|
@@ -241,7 +239,7 @@ export declare namespace HashMap {
|
|
|
241
239
|
* **Example** (Extracting entry types)
|
|
242
240
|
*
|
|
243
241
|
* ```ts
|
|
244
|
-
* import
|
|
242
|
+
* import { HashMap } from "effect"
|
|
245
243
|
*
|
|
246
244
|
* // Create a product catalog HashMap
|
|
247
245
|
* const catalog = HashMap.make(
|
|
@@ -273,7 +271,7 @@ export declare namespace HashMap {
|
|
|
273
271
|
* **Example** (Checking HashMap values)
|
|
274
272
|
*
|
|
275
273
|
* ```ts
|
|
276
|
-
* import
|
|
274
|
+
* import { HashMap } from "effect"
|
|
277
275
|
*
|
|
278
276
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
279
277
|
* const notMap = { a: 1 }
|
|
@@ -293,7 +291,7 @@ export const isHashMap: {
|
|
|
293
291
|
* **Example** (Checking HashMap values)
|
|
294
292
|
*
|
|
295
293
|
* ```ts
|
|
296
|
-
* import
|
|
294
|
+
* import { HashMap } from "effect"
|
|
297
295
|
*
|
|
298
296
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
299
297
|
* const notMap = { a: 1 }
|
|
@@ -313,7 +311,7 @@ export const isHashMap: {
|
|
|
313
311
|
* **Example** (Checking HashMap values)
|
|
314
312
|
*
|
|
315
313
|
* ```ts
|
|
316
|
-
* import
|
|
314
|
+
* import { HashMap } from "effect"
|
|
317
315
|
*
|
|
318
316
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
319
317
|
* const notMap = { a: 1 }
|
|
@@ -335,7 +333,7 @@ export const isHashMap: {
|
|
|
335
333
|
* **Example** (Creating an empty HashMap)
|
|
336
334
|
*
|
|
337
335
|
* ```ts
|
|
338
|
-
* import
|
|
336
|
+
* import { HashMap } from "effect"
|
|
339
337
|
*
|
|
340
338
|
* const map = HashMap.empty<string, number>()
|
|
341
339
|
* console.log(HashMap.isEmpty(map)) // true
|
|
@@ -353,7 +351,7 @@ export const empty: <K = never, V = never>() => HashMap<K, V> = internal.empty
|
|
|
353
351
|
* **Example** (Creating a HashMap from entries)
|
|
354
352
|
*
|
|
355
353
|
* ```ts
|
|
356
|
-
* import
|
|
354
|
+
* import { HashMap } from "effect"
|
|
357
355
|
*
|
|
358
356
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
359
357
|
* console.log(HashMap.size(map)) // 3
|
|
@@ -376,7 +374,7 @@ export const make: <Entries extends ReadonlyArray<readonly [any, any]>>(
|
|
|
376
374
|
* **Example** (Creating a HashMap from an iterable)
|
|
377
375
|
*
|
|
378
376
|
* ```ts
|
|
379
|
-
* import
|
|
377
|
+
* import { HashMap } from "effect"
|
|
380
378
|
*
|
|
381
379
|
* const entries = [["a", 1], ["b", 2], ["c", 3]] as const
|
|
382
380
|
* const map = HashMap.fromIterable(entries)
|
|
@@ -395,7 +393,7 @@ export const fromIterable: <K, V>(entries: Iterable<readonly [K, V]>) => HashMap
|
|
|
395
393
|
* **Example** (Checking for empty HashMaps)
|
|
396
394
|
*
|
|
397
395
|
* ```ts
|
|
398
|
-
* import
|
|
396
|
+
* import { HashMap } from "effect"
|
|
399
397
|
*
|
|
400
398
|
* const emptyMap = HashMap.empty<string, number>()
|
|
401
399
|
* const nonEmptyMap = HashMap.make(["a", 1])
|
|
@@ -416,7 +414,7 @@ export const isEmpty: <K, V>(self: HashMap<K, V>) => boolean = internal.isEmpty
|
|
|
416
414
|
* **Example** (Looking up values)
|
|
417
415
|
*
|
|
418
416
|
* ```ts
|
|
419
|
-
* import
|
|
417
|
+
* import { HashMap } from "effect"
|
|
420
418
|
*
|
|
421
419
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
422
420
|
*
|
|
@@ -439,7 +437,7 @@ export const get: {
|
|
|
439
437
|
* **Example** (Looking up values)
|
|
440
438
|
*
|
|
441
439
|
* ```ts
|
|
442
|
-
* import
|
|
440
|
+
* import { HashMap } from "effect"
|
|
443
441
|
*
|
|
444
442
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
445
443
|
*
|
|
@@ -462,7 +460,7 @@ export const get: {
|
|
|
462
460
|
* **Example** (Looking up values)
|
|
463
461
|
*
|
|
464
462
|
* ```ts
|
|
465
|
-
* import
|
|
463
|
+
* import { HashMap } from "effect"
|
|
466
464
|
*
|
|
467
465
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
468
466
|
*
|
|
@@ -486,8 +484,7 @@ export const get: {
|
|
|
486
484
|
* **Example** (Looking up values with a hash)
|
|
487
485
|
*
|
|
488
486
|
* ```ts
|
|
489
|
-
* import { Hash } from "effect"
|
|
490
|
-
* import * as HashMap from "effect/HashMap"
|
|
487
|
+
* import { Hash, HashMap } from "effect"
|
|
491
488
|
*
|
|
492
489
|
* // Useful when implementing custom equality for complex keys
|
|
493
490
|
* const userMap = HashMap.make(
|
|
@@ -518,8 +515,7 @@ export const getHash: {
|
|
|
518
515
|
* **Example** (Looking up values with a hash)
|
|
519
516
|
*
|
|
520
517
|
* ```ts
|
|
521
|
-
* import { Hash } from "effect"
|
|
522
|
-
* import * as HashMap from "effect/HashMap"
|
|
518
|
+
* import { Hash, HashMap } from "effect"
|
|
523
519
|
*
|
|
524
520
|
* // Useful when implementing custom equality for complex keys
|
|
525
521
|
* const userMap = HashMap.make(
|
|
@@ -550,8 +546,7 @@ export const getHash: {
|
|
|
550
546
|
* **Example** (Looking up values with a hash)
|
|
551
547
|
*
|
|
552
548
|
* ```ts
|
|
553
|
-
* import { Hash } from "effect"
|
|
554
|
-
* import * as HashMap from "effect/HashMap"
|
|
549
|
+
* import { Hash, HashMap } from "effect"
|
|
555
550
|
*
|
|
556
551
|
* // Useful when implementing custom equality for complex keys
|
|
557
552
|
* const userMap = HashMap.make(
|
|
@@ -588,8 +583,7 @@ export const getHash: {
|
|
|
588
583
|
* **Example** (Unsafely looking up values)
|
|
589
584
|
*
|
|
590
585
|
* ```ts
|
|
591
|
-
* import
|
|
592
|
-
* import * as Option from "effect/Option"
|
|
586
|
+
* import { HashMap, Option } from "effect"
|
|
593
587
|
*
|
|
594
588
|
* const config = HashMap.make(
|
|
595
589
|
* ["api_url", "https://api.example.com"],
|
|
@@ -612,7 +606,7 @@ export const getHash: {
|
|
|
612
606
|
* ```
|
|
613
607
|
*
|
|
614
608
|
* @category unsafe
|
|
615
|
-
* @since
|
|
609
|
+
* @since 4.0.0
|
|
616
610
|
*/
|
|
617
611
|
export const getUnsafe: {
|
|
618
612
|
/**
|
|
@@ -625,8 +619,7 @@ export const getUnsafe: {
|
|
|
625
619
|
* **Example** (Unsafely looking up values)
|
|
626
620
|
*
|
|
627
621
|
* ```ts
|
|
628
|
-
* import
|
|
629
|
-
* import * as Option from "effect/Option"
|
|
622
|
+
* import { HashMap, Option } from "effect"
|
|
630
623
|
*
|
|
631
624
|
* const config = HashMap.make(
|
|
632
625
|
* ["api_url", "https://api.example.com"],
|
|
@@ -649,7 +642,7 @@ export const getUnsafe: {
|
|
|
649
642
|
* ```
|
|
650
643
|
*
|
|
651
644
|
* @category unsafe
|
|
652
|
-
* @since
|
|
645
|
+
* @since 4.0.0
|
|
653
646
|
*/
|
|
654
647
|
<K1 extends K, K>(key: K1): <V>(self: HashMap<K, V>) => V
|
|
655
648
|
/**
|
|
@@ -662,8 +655,7 @@ export const getUnsafe: {
|
|
|
662
655
|
* **Example** (Unsafely looking up values)
|
|
663
656
|
*
|
|
664
657
|
* ```ts
|
|
665
|
-
* import
|
|
666
|
-
* import * as Option from "effect/Option"
|
|
658
|
+
* import { HashMap, Option } from "effect"
|
|
667
659
|
*
|
|
668
660
|
* const config = HashMap.make(
|
|
669
661
|
* ["api_url", "https://api.example.com"],
|
|
@@ -686,7 +678,7 @@ export const getUnsafe: {
|
|
|
686
678
|
* ```
|
|
687
679
|
*
|
|
688
680
|
* @category unsafe
|
|
689
|
-
* @since
|
|
681
|
+
* @since 4.0.0
|
|
690
682
|
*/
|
|
691
683
|
<K1 extends K, K, V>(self: HashMap<K, V>, key: K1): V
|
|
692
684
|
} = internal.getUnsafe
|
|
@@ -697,7 +689,7 @@ export const getUnsafe: {
|
|
|
697
689
|
* **Example** (Checking for keys)
|
|
698
690
|
*
|
|
699
691
|
* ```ts
|
|
700
|
-
* import
|
|
692
|
+
* import { HashMap } from "effect"
|
|
701
693
|
*
|
|
702
694
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
703
695
|
*
|
|
@@ -719,7 +711,7 @@ export const has: {
|
|
|
719
711
|
* **Example** (Checking for keys)
|
|
720
712
|
*
|
|
721
713
|
* ```ts
|
|
722
|
-
* import
|
|
714
|
+
* import { HashMap } from "effect"
|
|
723
715
|
*
|
|
724
716
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
725
717
|
*
|
|
@@ -741,7 +733,7 @@ export const has: {
|
|
|
741
733
|
* **Example** (Checking for keys)
|
|
742
734
|
*
|
|
743
735
|
* ```ts
|
|
744
|
-
* import
|
|
736
|
+
* import { HashMap } from "effect"
|
|
745
737
|
*
|
|
746
738
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
747
739
|
*
|
|
@@ -766,8 +758,7 @@ export const has: {
|
|
|
766
758
|
* **Example** (Checking keys with a hash)
|
|
767
759
|
*
|
|
768
760
|
* ```ts
|
|
769
|
-
* import { Hash } from "effect"
|
|
770
|
-
* import * as HashMap from "effect/HashMap"
|
|
761
|
+
* import { Hash, HashMap } from "effect"
|
|
771
762
|
*
|
|
772
763
|
* // Create a map with case-sensitive keys
|
|
773
764
|
* const userMap = HashMap.make(
|
|
@@ -798,8 +789,7 @@ export const hasHash: {
|
|
|
798
789
|
* **Example** (Checking keys with a hash)
|
|
799
790
|
*
|
|
800
791
|
* ```ts
|
|
801
|
-
* import { Hash } from "effect"
|
|
802
|
-
* import * as HashMap from "effect/HashMap"
|
|
792
|
+
* import { Hash, HashMap } from "effect"
|
|
803
793
|
*
|
|
804
794
|
* // Create a map with case-sensitive keys
|
|
805
795
|
* const userMap = HashMap.make(
|
|
@@ -830,8 +820,7 @@ export const hasHash: {
|
|
|
830
820
|
* **Example** (Checking keys with a hash)
|
|
831
821
|
*
|
|
832
822
|
* ```ts
|
|
833
|
-
* import { Hash } from "effect"
|
|
834
|
-
* import * as HashMap from "effect/HashMap"
|
|
823
|
+
* import { Hash, HashMap } from "effect"
|
|
835
824
|
*
|
|
836
825
|
* // Create a map with case-sensitive keys
|
|
837
826
|
* const userMap = HashMap.make(
|
|
@@ -863,7 +852,7 @@ export const hasHash: {
|
|
|
863
852
|
* **Example** (Checking entries by predicate)
|
|
864
853
|
*
|
|
865
854
|
* ```ts
|
|
866
|
-
* import
|
|
855
|
+
* import { HashMap } from "effect"
|
|
867
856
|
*
|
|
868
857
|
* const hm = HashMap.make([1, "a"])
|
|
869
858
|
* HashMap.hasBy(hm, (value, key) => value === "a" && key === 1) // -> true
|
|
@@ -880,7 +869,7 @@ export const hasBy: {
|
|
|
880
869
|
* **Example** (Checking entries by predicate)
|
|
881
870
|
*
|
|
882
871
|
* ```ts
|
|
883
|
-
* import
|
|
872
|
+
* import { HashMap } from "effect"
|
|
884
873
|
*
|
|
885
874
|
* const hm = HashMap.make([1, "a"])
|
|
886
875
|
* HashMap.hasBy(hm, (value, key) => value === "a" && key === 1) // -> true
|
|
@@ -897,7 +886,7 @@ export const hasBy: {
|
|
|
897
886
|
* **Example** (Checking entries by predicate)
|
|
898
887
|
*
|
|
899
888
|
* ```ts
|
|
900
|
-
* import
|
|
889
|
+
* import { HashMap } from "effect"
|
|
901
890
|
*
|
|
902
891
|
* const hm = HashMap.make([1, "a"])
|
|
903
892
|
* HashMap.hasBy(hm, (value, key) => value === "a" && key === 1) // -> true
|
|
@@ -920,7 +909,7 @@ export const hasBy: {
|
|
|
920
909
|
* **Example** (Setting a value)
|
|
921
910
|
*
|
|
922
911
|
* ```ts
|
|
923
|
-
* import
|
|
912
|
+
* import { HashMap } from "effect"
|
|
924
913
|
*
|
|
925
914
|
* const map1 = HashMap.make(["a", 1])
|
|
926
915
|
* const map2 = HashMap.set(map1, "b", 2)
|
|
@@ -932,7 +921,7 @@ export const hasBy: {
|
|
|
932
921
|
* console.log(HashMap.size(map1)) // 1
|
|
933
922
|
* ```
|
|
934
923
|
*
|
|
935
|
-
* @category
|
|
924
|
+
* @category transforming
|
|
936
925
|
* @since 2.0.0
|
|
937
926
|
*/
|
|
938
927
|
export const set: {
|
|
@@ -943,7 +932,7 @@ export const set: {
|
|
|
943
932
|
* **Example** (Setting a value)
|
|
944
933
|
*
|
|
945
934
|
* ```ts
|
|
946
|
-
* import
|
|
935
|
+
* import { HashMap } from "effect"
|
|
947
936
|
*
|
|
948
937
|
* const map1 = HashMap.make(["a", 1])
|
|
949
938
|
* const map2 = HashMap.set(map1, "b", 2)
|
|
@@ -955,7 +944,7 @@ export const set: {
|
|
|
955
944
|
* console.log(HashMap.size(map1)) // 1
|
|
956
945
|
* ```
|
|
957
946
|
*
|
|
958
|
-
* @category
|
|
947
|
+
* @category transforming
|
|
959
948
|
* @since 2.0.0
|
|
960
949
|
*/
|
|
961
950
|
<K, V>(key: K, value: V): (self: HashMap<K, V>) => HashMap<K, V>
|
|
@@ -966,7 +955,7 @@ export const set: {
|
|
|
966
955
|
* **Example** (Setting a value)
|
|
967
956
|
*
|
|
968
957
|
* ```ts
|
|
969
|
-
* import
|
|
958
|
+
* import { HashMap } from "effect"
|
|
970
959
|
*
|
|
971
960
|
* const map1 = HashMap.make(["a", 1])
|
|
972
961
|
* const map2 = HashMap.set(map1, "b", 2)
|
|
@@ -978,7 +967,7 @@ export const set: {
|
|
|
978
967
|
* console.log(HashMap.size(map1)) // 1
|
|
979
968
|
* ```
|
|
980
969
|
*
|
|
981
|
-
* @category
|
|
970
|
+
* @category transforming
|
|
982
971
|
* @since 2.0.0
|
|
983
972
|
*/
|
|
984
973
|
<K, V>(self: HashMap<K, V>, key: K, value: V): HashMap<K, V>
|
|
@@ -990,7 +979,7 @@ export const set: {
|
|
|
990
979
|
* **Example** (Iterating keys)
|
|
991
980
|
*
|
|
992
981
|
* ```ts
|
|
993
|
-
* import
|
|
982
|
+
* import { HashMap } from "effect"
|
|
994
983
|
*
|
|
995
984
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
996
985
|
* const keys = Array.from(HashMap.keys(map))
|
|
@@ -1008,7 +997,7 @@ export const keys: <K, V>(self: HashMap<K, V>) => IterableIterator<K> = internal
|
|
|
1008
997
|
* **Example** (Iterating values)
|
|
1009
998
|
*
|
|
1010
999
|
* ```ts
|
|
1011
|
-
* import
|
|
1000
|
+
* import { HashMap } from "effect"
|
|
1012
1001
|
*
|
|
1013
1002
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
1014
1003
|
* const values = Array.from(HashMap.values(map))
|
|
@@ -1026,7 +1015,7 @@ export const values: <K, V>(self: HashMap<K, V>) => IterableIterator<V> = intern
|
|
|
1026
1015
|
* **Example** (Converting values to an array)
|
|
1027
1016
|
*
|
|
1028
1017
|
* ```ts
|
|
1029
|
-
* import
|
|
1018
|
+
* import { HashMap } from "effect"
|
|
1030
1019
|
*
|
|
1031
1020
|
* const employees = HashMap.make(
|
|
1032
1021
|
* ["alice", { department: "engineering", salary: 90000 }],
|
|
@@ -1058,7 +1047,7 @@ export const toValues = <K, V>(self: HashMap<K, V>): Array<V> => Array.from(valu
|
|
|
1058
1047
|
* **Example** (Iterating entries)
|
|
1059
1048
|
*
|
|
1060
1049
|
* ```ts
|
|
1061
|
-
* import
|
|
1050
|
+
* import { HashMap } from "effect"
|
|
1062
1051
|
*
|
|
1063
1052
|
* // Create a configuration map
|
|
1064
1053
|
* const config = HashMap.make(
|
|
@@ -1091,7 +1080,7 @@ export const entries: <K, V>(self: HashMap<K, V>) => IterableIterator<[K, V]> =
|
|
|
1091
1080
|
* **Example** (Converting entries to an array)
|
|
1092
1081
|
*
|
|
1093
1082
|
* ```ts
|
|
1094
|
-
* import
|
|
1083
|
+
* import { HashMap } from "effect"
|
|
1095
1084
|
*
|
|
1096
1085
|
* const gameScores = HashMap.make(
|
|
1097
1086
|
* ["alice", 1250],
|
|
@@ -1125,7 +1114,7 @@ export const toEntries = <K, V>(self: HashMap<K, V>): Array<[K, V]> => Array.fro
|
|
|
1125
1114
|
* **Example** (Getting the size)
|
|
1126
1115
|
*
|
|
1127
1116
|
* ```ts
|
|
1128
|
-
* import
|
|
1117
|
+
* import { HashMap } from "effect"
|
|
1129
1118
|
*
|
|
1130
1119
|
* const emptyMap = HashMap.empty<string, number>()
|
|
1131
1120
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
@@ -1148,7 +1137,7 @@ export const size: <K, V>(self: HashMap<K, V>) => number = internal.size
|
|
|
1148
1137
|
* **Example** (Beginning batch mutation)
|
|
1149
1138
|
*
|
|
1150
1139
|
* ```ts
|
|
1151
|
-
* import
|
|
1140
|
+
* import { HashMap } from "effect"
|
|
1152
1141
|
*
|
|
1153
1142
|
* const map = HashMap.make(["a", 1])
|
|
1154
1143
|
*
|
|
@@ -1176,7 +1165,7 @@ export const beginMutation: <K, V>(self: HashMap<K, V>) => HashMap<K, V> = inter
|
|
|
1176
1165
|
* **Example** (Ending batch mutation)
|
|
1177
1166
|
*
|
|
1178
1167
|
* ```ts
|
|
1179
|
-
* import
|
|
1168
|
+
* import { HashMap } from "effect"
|
|
1180
1169
|
*
|
|
1181
1170
|
* // Start with an existing map
|
|
1182
1171
|
* const original = HashMap.make(["x", 10], ["y", 20])
|
|
@@ -1212,7 +1201,7 @@ export const endMutation: <K, V>(self: HashMap<K, V>) => HashMap<K, V> = interna
|
|
|
1212
1201
|
* **Example** (Applying batched mutations)
|
|
1213
1202
|
*
|
|
1214
1203
|
* ```ts
|
|
1215
|
-
* import
|
|
1204
|
+
* import { HashMap } from "effect"
|
|
1216
1205
|
*
|
|
1217
1206
|
* const map1 = HashMap.make(["a", 1])
|
|
1218
1207
|
* const map2 = HashMap.mutate(map1, (mutable) => {
|
|
@@ -1236,7 +1225,7 @@ export const mutate: {
|
|
|
1236
1225
|
* **Example** (Applying batched mutations)
|
|
1237
1226
|
*
|
|
1238
1227
|
* ```ts
|
|
1239
|
-
* import
|
|
1228
|
+
* import { HashMap } from "effect"
|
|
1240
1229
|
*
|
|
1241
1230
|
* const map1 = HashMap.make(["a", 1])
|
|
1242
1231
|
* const map2 = HashMap.mutate(map1, (mutable) => {
|
|
@@ -1260,7 +1249,7 @@ export const mutate: {
|
|
|
1260
1249
|
* **Example** (Applying batched mutations)
|
|
1261
1250
|
*
|
|
1262
1251
|
* ```ts
|
|
1263
|
-
* import
|
|
1252
|
+
* import { HashMap } from "effect"
|
|
1264
1253
|
*
|
|
1265
1254
|
* const map1 = HashMap.make(["a", 1])
|
|
1266
1255
|
* const map2 = HashMap.mutate(map1, (mutable) => {
|
|
@@ -1286,8 +1275,7 @@ export const mutate: {
|
|
|
1286
1275
|
* **Example** (Updating values with Options)
|
|
1287
1276
|
*
|
|
1288
1277
|
* ```ts
|
|
1289
|
-
* import
|
|
1290
|
-
* import * as Option from "effect/Option"
|
|
1278
|
+
* import { HashMap, Option } from "effect"
|
|
1291
1279
|
*
|
|
1292
1280
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
1293
1281
|
*
|
|
@@ -1299,7 +1287,7 @@ export const mutate: {
|
|
|
1299
1287
|
* console.log(HashMap.get(updated, "a")) // Option.some(2)
|
|
1300
1288
|
* ```
|
|
1301
1289
|
*
|
|
1302
|
-
* @category
|
|
1290
|
+
* @category transforming
|
|
1303
1291
|
* @since 2.0.0
|
|
1304
1292
|
*/
|
|
1305
1293
|
export const modifyAt: {
|
|
@@ -1313,8 +1301,7 @@ export const modifyAt: {
|
|
|
1313
1301
|
* **Example** (Updating values with Options)
|
|
1314
1302
|
*
|
|
1315
1303
|
* ```ts
|
|
1316
|
-
* import
|
|
1317
|
-
* import * as Option from "effect/Option"
|
|
1304
|
+
* import { HashMap, Option } from "effect"
|
|
1318
1305
|
*
|
|
1319
1306
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
1320
1307
|
*
|
|
@@ -1326,7 +1313,7 @@ export const modifyAt: {
|
|
|
1326
1313
|
* console.log(HashMap.get(updated, "a")) // Option.some(2)
|
|
1327
1314
|
* ```
|
|
1328
1315
|
*
|
|
1329
|
-
* @category
|
|
1316
|
+
* @category transforming
|
|
1330
1317
|
* @since 2.0.0
|
|
1331
1318
|
*/
|
|
1332
1319
|
<K, V>(key: K, f: HashMap.UpdateFn<V>): (self: HashMap<K, V>) => HashMap<K, V>
|
|
@@ -1340,8 +1327,7 @@ export const modifyAt: {
|
|
|
1340
1327
|
* **Example** (Updating values with Options)
|
|
1341
1328
|
*
|
|
1342
1329
|
* ```ts
|
|
1343
|
-
* import
|
|
1344
|
-
* import * as Option from "effect/Option"
|
|
1330
|
+
* import { HashMap, Option } from "effect"
|
|
1345
1331
|
*
|
|
1346
1332
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
1347
1333
|
*
|
|
@@ -1353,7 +1339,7 @@ export const modifyAt: {
|
|
|
1353
1339
|
* console.log(HashMap.get(updated, "a")) // Option.some(2)
|
|
1354
1340
|
* ```
|
|
1355
1341
|
*
|
|
1356
|
-
* @category
|
|
1342
|
+
* @category transforming
|
|
1357
1343
|
* @since 2.0.0
|
|
1358
1344
|
*/
|
|
1359
1345
|
<K, V>(self: HashMap<K, V>, key: K, f: HashMap.UpdateFn<V>): HashMap<K, V>
|
|
@@ -1370,9 +1356,7 @@ export const modifyAt: {
|
|
|
1370
1356
|
* **Example** (Updating values with a hash)
|
|
1371
1357
|
*
|
|
1372
1358
|
* ```ts
|
|
1373
|
-
* import { Hash } from "effect"
|
|
1374
|
-
* import * as HashMap from "effect/HashMap"
|
|
1375
|
-
* import * as Option from "effect/Option"
|
|
1359
|
+
* import { Hash, HashMap, Option } from "effect"
|
|
1376
1360
|
*
|
|
1377
1361
|
* // Useful when working with precomputed hashes for performance
|
|
1378
1362
|
* const counters = HashMap.make(["downloads", 100], ["views", 250])
|
|
@@ -1406,7 +1390,7 @@ export const modifyAt: {
|
|
|
1406
1390
|
* console.log(HashMap.get(withClicks, "clicks")) // Option.some(1)
|
|
1407
1391
|
* ```
|
|
1408
1392
|
*
|
|
1409
|
-
* @category
|
|
1393
|
+
* @category transforming
|
|
1410
1394
|
* @since 2.0.0
|
|
1411
1395
|
*/
|
|
1412
1396
|
export const modifyHash: {
|
|
@@ -1421,9 +1405,7 @@ export const modifyHash: {
|
|
|
1421
1405
|
* **Example** (Updating values with a hash)
|
|
1422
1406
|
*
|
|
1423
1407
|
* ```ts
|
|
1424
|
-
* import { Hash } from "effect"
|
|
1425
|
-
* import * as HashMap from "effect/HashMap"
|
|
1426
|
-
* import * as Option from "effect/Option"
|
|
1408
|
+
* import { Hash, HashMap, Option } from "effect"
|
|
1427
1409
|
*
|
|
1428
1410
|
* // Useful when working with precomputed hashes for performance
|
|
1429
1411
|
* const counters = HashMap.make(["downloads", 100], ["views", 250])
|
|
@@ -1457,7 +1439,7 @@ export const modifyHash: {
|
|
|
1457
1439
|
* console.log(HashMap.get(withClicks, "clicks")) // Option.some(1)
|
|
1458
1440
|
* ```
|
|
1459
1441
|
*
|
|
1460
|
-
* @category
|
|
1442
|
+
* @category transforming
|
|
1461
1443
|
* @since 2.0.0
|
|
1462
1444
|
*/
|
|
1463
1445
|
<K, V>(key: K, hash: number, f: HashMap.UpdateFn<V>): (self: HashMap<K, V>) => HashMap<K, V>
|
|
@@ -1472,9 +1454,7 @@ export const modifyHash: {
|
|
|
1472
1454
|
* **Example** (Updating values with a hash)
|
|
1473
1455
|
*
|
|
1474
1456
|
* ```ts
|
|
1475
|
-
* import { Hash } from "effect"
|
|
1476
|
-
* import * as HashMap from "effect/HashMap"
|
|
1477
|
-
* import * as Option from "effect/Option"
|
|
1457
|
+
* import { Hash, HashMap, Option } from "effect"
|
|
1478
1458
|
*
|
|
1479
1459
|
* // Useful when working with precomputed hashes for performance
|
|
1480
1460
|
* const counters = HashMap.make(["downloads", 100], ["views", 250])
|
|
@@ -1508,7 +1488,7 @@ export const modifyHash: {
|
|
|
1508
1488
|
* console.log(HashMap.get(withClicks, "clicks")) // Option.some(1)
|
|
1509
1489
|
* ```
|
|
1510
1490
|
*
|
|
1511
|
-
* @category
|
|
1491
|
+
* @category transforming
|
|
1512
1492
|
* @since 2.0.0
|
|
1513
1493
|
*/
|
|
1514
1494
|
<K, V>(self: HashMap<K, V>, key: K, hash: number, f: HashMap.UpdateFn<V>): HashMap<K, V>
|
|
@@ -1520,7 +1500,7 @@ export const modifyHash: {
|
|
|
1520
1500
|
* **Example** (Modifying existing values)
|
|
1521
1501
|
*
|
|
1522
1502
|
* ```ts
|
|
1523
|
-
* import
|
|
1503
|
+
* import { HashMap } from "effect"
|
|
1524
1504
|
*
|
|
1525
1505
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1526
1506
|
* const map2 = HashMap.modify(map1, "a", (value) => value * 3)
|
|
@@ -1529,7 +1509,7 @@ export const modifyHash: {
|
|
|
1529
1509
|
* console.log(HashMap.get(map2, "b")) // Option.some(2)
|
|
1530
1510
|
* ```
|
|
1531
1511
|
*
|
|
1532
|
-
* @category
|
|
1512
|
+
* @category transforming
|
|
1533
1513
|
* @since 2.0.0
|
|
1534
1514
|
*/
|
|
1535
1515
|
export const modify: {
|
|
@@ -1539,7 +1519,7 @@ export const modify: {
|
|
|
1539
1519
|
* **Example** (Modifying existing values)
|
|
1540
1520
|
*
|
|
1541
1521
|
* ```ts
|
|
1542
|
-
* import
|
|
1522
|
+
* import { HashMap } from "effect"
|
|
1543
1523
|
*
|
|
1544
1524
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1545
1525
|
* const map2 = HashMap.modify(map1, "a", (value) => value * 3)
|
|
@@ -1548,7 +1528,7 @@ export const modify: {
|
|
|
1548
1528
|
* console.log(HashMap.get(map2, "b")) // Option.some(2)
|
|
1549
1529
|
* ```
|
|
1550
1530
|
*
|
|
1551
|
-
* @category
|
|
1531
|
+
* @category transforming
|
|
1552
1532
|
* @since 2.0.0
|
|
1553
1533
|
*/
|
|
1554
1534
|
<K, V>(key: K, f: (v: V) => V): (self: HashMap<K, V>) => HashMap<K, V>
|
|
@@ -1558,7 +1538,7 @@ export const modify: {
|
|
|
1558
1538
|
* **Example** (Modifying existing values)
|
|
1559
1539
|
*
|
|
1560
1540
|
* ```ts
|
|
1561
|
-
* import
|
|
1541
|
+
* import { HashMap } from "effect"
|
|
1562
1542
|
*
|
|
1563
1543
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1564
1544
|
* const map2 = HashMap.modify(map1, "a", (value) => value * 3)
|
|
@@ -1567,7 +1547,7 @@ export const modify: {
|
|
|
1567
1547
|
* console.log(HashMap.get(map2, "b")) // Option.some(2)
|
|
1568
1548
|
* ```
|
|
1569
1549
|
*
|
|
1570
|
-
* @category
|
|
1550
|
+
* @category transforming
|
|
1571
1551
|
* @since 2.0.0
|
|
1572
1552
|
*/
|
|
1573
1553
|
<K, V>(self: HashMap<K, V>, key: K, f: (v: V) => V): HashMap<K, V>
|
|
@@ -1582,7 +1562,7 @@ export const modify: {
|
|
|
1582
1562
|
* **Example** (Combining HashMaps)
|
|
1583
1563
|
*
|
|
1584
1564
|
* ```ts
|
|
1585
|
-
* import
|
|
1565
|
+
* import { HashMap } from "effect"
|
|
1586
1566
|
*
|
|
1587
1567
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1588
1568
|
* const map2 = HashMap.make(["b", 20], ["c", 3])
|
|
@@ -1605,7 +1585,7 @@ export const union: {
|
|
|
1605
1585
|
* **Example** (Combining HashMaps)
|
|
1606
1586
|
*
|
|
1607
1587
|
* ```ts
|
|
1608
|
-
* import
|
|
1588
|
+
* import { HashMap } from "effect"
|
|
1609
1589
|
*
|
|
1610
1590
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1611
1591
|
* const map2 = HashMap.make(["b", 20], ["c", 3])
|
|
@@ -1628,7 +1608,7 @@ export const union: {
|
|
|
1628
1608
|
* **Example** (Combining HashMaps)
|
|
1629
1609
|
*
|
|
1630
1610
|
* ```ts
|
|
1631
|
-
* import
|
|
1611
|
+
* import { HashMap } from "effect"
|
|
1632
1612
|
*
|
|
1633
1613
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1634
1614
|
* const map2 = HashMap.make(["b", 20], ["c", 3])
|
|
@@ -1651,7 +1631,7 @@ export const union: {
|
|
|
1651
1631
|
* **Example** (Removing a key)
|
|
1652
1632
|
*
|
|
1653
1633
|
* ```ts
|
|
1654
|
-
* import
|
|
1634
|
+
* import { HashMap } from "effect"
|
|
1655
1635
|
*
|
|
1656
1636
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
1657
1637
|
* const map2 = HashMap.remove(map1, "b")
|
|
@@ -1661,7 +1641,7 @@ export const union: {
|
|
|
1661
1641
|
* console.log(HashMap.has(map2, "a")) // true
|
|
1662
1642
|
* ```
|
|
1663
1643
|
*
|
|
1664
|
-
* @category
|
|
1644
|
+
* @category transforming
|
|
1665
1645
|
* @since 2.0.0
|
|
1666
1646
|
*/
|
|
1667
1647
|
export const remove: {
|
|
@@ -1672,7 +1652,7 @@ export const remove: {
|
|
|
1672
1652
|
* **Example** (Removing a key)
|
|
1673
1653
|
*
|
|
1674
1654
|
* ```ts
|
|
1675
|
-
* import
|
|
1655
|
+
* import { HashMap } from "effect"
|
|
1676
1656
|
*
|
|
1677
1657
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
1678
1658
|
* const map2 = HashMap.remove(map1, "b")
|
|
@@ -1682,7 +1662,7 @@ export const remove: {
|
|
|
1682
1662
|
* console.log(HashMap.has(map2, "a")) // true
|
|
1683
1663
|
* ```
|
|
1684
1664
|
*
|
|
1685
|
-
* @category
|
|
1665
|
+
* @category transforming
|
|
1686
1666
|
* @since 2.0.0
|
|
1687
1667
|
*/
|
|
1688
1668
|
<K>(key: K): <V>(self: HashMap<K, V>) => HashMap<K, V>
|
|
@@ -1693,7 +1673,7 @@ export const remove: {
|
|
|
1693
1673
|
* **Example** (Removing a key)
|
|
1694
1674
|
*
|
|
1695
1675
|
* ```ts
|
|
1696
|
-
* import
|
|
1676
|
+
* import { HashMap } from "effect"
|
|
1697
1677
|
*
|
|
1698
1678
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
1699
1679
|
* const map2 = HashMap.remove(map1, "b")
|
|
@@ -1703,7 +1683,7 @@ export const remove: {
|
|
|
1703
1683
|
* console.log(HashMap.has(map2, "a")) // true
|
|
1704
1684
|
* ```
|
|
1705
1685
|
*
|
|
1706
|
-
* @category
|
|
1686
|
+
* @category transforming
|
|
1707
1687
|
* @since 2.0.0
|
|
1708
1688
|
*/
|
|
1709
1689
|
<K, V>(self: HashMap<K, V>, key: K): HashMap<K, V>
|
|
@@ -1715,7 +1695,7 @@ export const remove: {
|
|
|
1715
1695
|
* **Example** (Removing multiple keys)
|
|
1716
1696
|
*
|
|
1717
1697
|
* ```ts
|
|
1718
|
-
* import
|
|
1698
|
+
* import { HashMap } from "effect"
|
|
1719
1699
|
*
|
|
1720
1700
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
1721
1701
|
* const map2 = HashMap.removeMany(map1, ["b", "d"])
|
|
@@ -1725,7 +1705,7 @@ export const remove: {
|
|
|
1725
1705
|
* console.log(HashMap.has(map2, "c")) // true
|
|
1726
1706
|
* ```
|
|
1727
1707
|
*
|
|
1728
|
-
* @category
|
|
1708
|
+
* @category transforming
|
|
1729
1709
|
* @since 2.0.0
|
|
1730
1710
|
*/
|
|
1731
1711
|
export const removeMany: {
|
|
@@ -1735,7 +1715,7 @@ export const removeMany: {
|
|
|
1735
1715
|
* **Example** (Removing multiple keys)
|
|
1736
1716
|
*
|
|
1737
1717
|
* ```ts
|
|
1738
|
-
* import
|
|
1718
|
+
* import { HashMap } from "effect"
|
|
1739
1719
|
*
|
|
1740
1720
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
1741
1721
|
* const map2 = HashMap.removeMany(map1, ["b", "d"])
|
|
@@ -1745,7 +1725,7 @@ export const removeMany: {
|
|
|
1745
1725
|
* console.log(HashMap.has(map2, "c")) // true
|
|
1746
1726
|
* ```
|
|
1747
1727
|
*
|
|
1748
|
-
* @category
|
|
1728
|
+
* @category transforming
|
|
1749
1729
|
* @since 2.0.0
|
|
1750
1730
|
*/
|
|
1751
1731
|
<K>(keys: Iterable<K>): <V>(self: HashMap<K, V>) => HashMap<K, V>
|
|
@@ -1755,7 +1735,7 @@ export const removeMany: {
|
|
|
1755
1735
|
* **Example** (Removing multiple keys)
|
|
1756
1736
|
*
|
|
1757
1737
|
* ```ts
|
|
1758
|
-
* import
|
|
1738
|
+
* import { HashMap } from "effect"
|
|
1759
1739
|
*
|
|
1760
1740
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
1761
1741
|
* const map2 = HashMap.removeMany(map1, ["b", "d"])
|
|
@@ -1765,7 +1745,7 @@ export const removeMany: {
|
|
|
1765
1745
|
* console.log(HashMap.has(map2, "c")) // true
|
|
1766
1746
|
* ```
|
|
1767
1747
|
*
|
|
1768
|
-
* @category
|
|
1748
|
+
* @category transforming
|
|
1769
1749
|
* @since 2.0.0
|
|
1770
1750
|
*/
|
|
1771
1751
|
<K, V>(self: HashMap<K, V>, keys: Iterable<K>): HashMap<K, V>
|
|
@@ -1777,7 +1757,7 @@ export const removeMany: {
|
|
|
1777
1757
|
* **Example** (Setting multiple entries)
|
|
1778
1758
|
*
|
|
1779
1759
|
* ```ts
|
|
1780
|
-
* import
|
|
1760
|
+
* import { HashMap } from "effect"
|
|
1781
1761
|
*
|
|
1782
1762
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1783
1763
|
* const newEntries = [["c", 3], ["d", 4], ["a", 10]] as const // "a" will be overwritten
|
|
@@ -1788,8 +1768,8 @@ export const removeMany: {
|
|
|
1788
1768
|
* console.log(HashMap.get(map2, "c")) // Option.some(3)
|
|
1789
1769
|
* ```
|
|
1790
1770
|
*
|
|
1791
|
-
* @category
|
|
1792
|
-
* @since
|
|
1771
|
+
* @category transforming
|
|
1772
|
+
* @since 4.0.0
|
|
1793
1773
|
*/
|
|
1794
1774
|
export const setMany: {
|
|
1795
1775
|
/**
|
|
@@ -1798,7 +1778,7 @@ export const setMany: {
|
|
|
1798
1778
|
* **Example** (Setting multiple entries)
|
|
1799
1779
|
*
|
|
1800
1780
|
* ```ts
|
|
1801
|
-
* import
|
|
1781
|
+
* import { HashMap } from "effect"
|
|
1802
1782
|
*
|
|
1803
1783
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1804
1784
|
* const newEntries = [["c", 3], ["d", 4], ["a", 10]] as const // "a" will be overwritten
|
|
@@ -1809,8 +1789,8 @@ export const setMany: {
|
|
|
1809
1789
|
* console.log(HashMap.get(map2, "c")) // Option.some(3)
|
|
1810
1790
|
* ```
|
|
1811
1791
|
*
|
|
1812
|
-
* @category
|
|
1813
|
-
* @since
|
|
1792
|
+
* @category transforming
|
|
1793
|
+
* @since 4.0.0
|
|
1814
1794
|
*/
|
|
1815
1795
|
<K, V>(entries: Iterable<readonly [K, V]>): (self: HashMap<K, V>) => HashMap<K, V>
|
|
1816
1796
|
/**
|
|
@@ -1819,7 +1799,7 @@ export const setMany: {
|
|
|
1819
1799
|
* **Example** (Setting multiple entries)
|
|
1820
1800
|
*
|
|
1821
1801
|
* ```ts
|
|
1822
|
-
* import
|
|
1802
|
+
* import { HashMap } from "effect"
|
|
1823
1803
|
*
|
|
1824
1804
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1825
1805
|
* const newEntries = [["c", 3], ["d", 4], ["a", 10]] as const // "a" will be overwritten
|
|
@@ -1830,8 +1810,8 @@ export const setMany: {
|
|
|
1830
1810
|
* console.log(HashMap.get(map2, "c")) // Option.some(3)
|
|
1831
1811
|
* ```
|
|
1832
1812
|
*
|
|
1833
|
-
* @category
|
|
1834
|
-
* @since
|
|
1813
|
+
* @category transforming
|
|
1814
|
+
* @since 4.0.0
|
|
1835
1815
|
*/
|
|
1836
1816
|
<K, V>(self: HashMap<K, V>, entries: Iterable<readonly [K, V]>): HashMap<K, V>
|
|
1837
1817
|
} = internal.setMany
|
|
@@ -1842,7 +1822,7 @@ export const setMany: {
|
|
|
1842
1822
|
* **Example** (Mapping values)
|
|
1843
1823
|
*
|
|
1844
1824
|
* ```ts
|
|
1845
|
-
* import
|
|
1825
|
+
* import { HashMap } from "effect"
|
|
1846
1826
|
*
|
|
1847
1827
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
1848
1828
|
* const map2 = HashMap.map(map1, (value, key) => `${key}:${value * 2}`)
|
|
@@ -1861,7 +1841,7 @@ export const map: {
|
|
|
1861
1841
|
* **Example** (Mapping values)
|
|
1862
1842
|
*
|
|
1863
1843
|
* ```ts
|
|
1864
|
-
* import
|
|
1844
|
+
* import { HashMap } from "effect"
|
|
1865
1845
|
*
|
|
1866
1846
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
1867
1847
|
* const map2 = HashMap.map(map1, (value, key) => `${key}:${value * 2}`)
|
|
@@ -1880,7 +1860,7 @@ export const map: {
|
|
|
1880
1860
|
* **Example** (Mapping values)
|
|
1881
1861
|
*
|
|
1882
1862
|
* ```ts
|
|
1883
|
-
* import
|
|
1863
|
+
* import { HashMap } from "effect"
|
|
1884
1864
|
*
|
|
1885
1865
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
1886
1866
|
* const map2 = HashMap.map(map1, (value, key) => `${key}:${value * 2}`)
|
|
@@ -1903,7 +1883,7 @@ export const map: {
|
|
|
1903
1883
|
* **Example** (FlatMapping values)
|
|
1904
1884
|
*
|
|
1905
1885
|
* ```ts
|
|
1906
|
-
* import
|
|
1886
|
+
* import { HashMap } from "effect"
|
|
1907
1887
|
*
|
|
1908
1888
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1909
1889
|
* const map2 = HashMap.flatMap(
|
|
@@ -1928,7 +1908,7 @@ export const flatMap: {
|
|
|
1928
1908
|
* **Example** (FlatMapping values)
|
|
1929
1909
|
*
|
|
1930
1910
|
* ```ts
|
|
1931
|
-
* import
|
|
1911
|
+
* import { HashMap } from "effect"
|
|
1932
1912
|
*
|
|
1933
1913
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1934
1914
|
* const map2 = HashMap.flatMap(
|
|
@@ -1953,7 +1933,7 @@ export const flatMap: {
|
|
|
1953
1933
|
* **Example** (FlatMapping values)
|
|
1954
1934
|
*
|
|
1955
1935
|
* ```ts
|
|
1956
|
-
* import
|
|
1936
|
+
* import { HashMap } from "effect"
|
|
1957
1937
|
*
|
|
1958
1938
|
* const map1 = HashMap.make(["a", 1], ["b", 2])
|
|
1959
1939
|
* const map2 = HashMap.flatMap(
|
|
@@ -1978,7 +1958,7 @@ export const flatMap: {
|
|
|
1978
1958
|
* **Example** (Iterating with side effects)
|
|
1979
1959
|
*
|
|
1980
1960
|
* ```ts
|
|
1981
|
-
* import
|
|
1961
|
+
* import { HashMap } from "effect"
|
|
1982
1962
|
*
|
|
1983
1963
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
1984
1964
|
* const collected: Array<[string, number]> = []
|
|
@@ -2000,7 +1980,7 @@ export const forEach: {
|
|
|
2000
1980
|
* **Example** (Iterating with side effects)
|
|
2001
1981
|
*
|
|
2002
1982
|
* ```ts
|
|
2003
|
-
* import
|
|
1983
|
+
* import { HashMap } from "effect"
|
|
2004
1984
|
*
|
|
2005
1985
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
2006
1986
|
* const collected: Array<[string, number]> = []
|
|
@@ -2022,7 +2002,7 @@ export const forEach: {
|
|
|
2022
2002
|
* **Example** (Iterating with side effects)
|
|
2023
2003
|
*
|
|
2024
2004
|
* ```ts
|
|
2025
|
-
* import
|
|
2005
|
+
* import { HashMap } from "effect"
|
|
2026
2006
|
*
|
|
2027
2007
|
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
2028
2008
|
* const collected: Array<[string, number]> = []
|
|
@@ -2046,7 +2026,7 @@ export const forEach: {
|
|
|
2046
2026
|
* **Example** (Reducing values)
|
|
2047
2027
|
*
|
|
2048
2028
|
* ```ts
|
|
2049
|
-
* import
|
|
2029
|
+
* import { HashMap } from "effect"
|
|
2050
2030
|
*
|
|
2051
2031
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2052
2032
|
* const sum = HashMap.reduce(map, 0, (acc, value) => acc + value)
|
|
@@ -2064,7 +2044,7 @@ export const reduce: {
|
|
|
2064
2044
|
* **Example** (Reducing values)
|
|
2065
2045
|
*
|
|
2066
2046
|
* ```ts
|
|
2067
|
-
* import
|
|
2047
|
+
* import { HashMap } from "effect"
|
|
2068
2048
|
*
|
|
2069
2049
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2070
2050
|
* const sum = HashMap.reduce(map, 0, (acc, value) => acc + value)
|
|
@@ -2082,7 +2062,7 @@ export const reduce: {
|
|
|
2082
2062
|
* **Example** (Reducing values)
|
|
2083
2063
|
*
|
|
2084
2064
|
* ```ts
|
|
2085
|
-
* import
|
|
2065
|
+
* import { HashMap } from "effect"
|
|
2086
2066
|
*
|
|
2087
2067
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2088
2068
|
* const sum = HashMap.reduce(map, 0, (acc, value) => acc + value)
|
|
@@ -2102,7 +2082,7 @@ export const reduce: {
|
|
|
2102
2082
|
* **Example** (Filtering entries)
|
|
2103
2083
|
*
|
|
2104
2084
|
* ```ts
|
|
2105
|
-
* import
|
|
2085
|
+
* import { HashMap } from "effect"
|
|
2106
2086
|
*
|
|
2107
2087
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
2108
2088
|
* const map2 = HashMap.filter(map1, (value) => value % 2 === 0)
|
|
@@ -2123,7 +2103,7 @@ export const filter: {
|
|
|
2123
2103
|
* **Example** (Filtering entries)
|
|
2124
2104
|
*
|
|
2125
2105
|
* ```ts
|
|
2126
|
-
* import
|
|
2106
|
+
* import { HashMap } from "effect"
|
|
2127
2107
|
*
|
|
2128
2108
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
2129
2109
|
* const map2 = HashMap.filter(map1, (value) => value % 2 === 0)
|
|
@@ -2144,7 +2124,7 @@ export const filter: {
|
|
|
2144
2124
|
* **Example** (Filtering entries)
|
|
2145
2125
|
*
|
|
2146
2126
|
* ```ts
|
|
2147
|
-
* import
|
|
2127
|
+
* import { HashMap } from "effect"
|
|
2148
2128
|
*
|
|
2149
2129
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
2150
2130
|
* const map2 = HashMap.filter(map1, (value) => value % 2 === 0)
|
|
@@ -2167,8 +2147,7 @@ export const filter: {
|
|
|
2167
2147
|
* **Example** (Compacting Option values)
|
|
2168
2148
|
*
|
|
2169
2149
|
* ```ts
|
|
2170
|
-
* import
|
|
2171
|
-
* import * as Option from "effect/Option"
|
|
2150
|
+
* import { HashMap, Option } from "effect"
|
|
2172
2151
|
*
|
|
2173
2152
|
* const map1 = HashMap.make(
|
|
2174
2153
|
* ["a", Option.some(1)],
|
|
@@ -2194,8 +2173,7 @@ export const compact: <K, A>(self: HashMap<K, Option<A>>) => HashMap<K, A> = int
|
|
|
2194
2173
|
* **Example** (Filtering and mapping Results)
|
|
2195
2174
|
*
|
|
2196
2175
|
* ```ts
|
|
2197
|
-
* import
|
|
2198
|
-
* import * as Result from "effect/Result"
|
|
2176
|
+
* import { HashMap, Result } from "effect"
|
|
2199
2177
|
*
|
|
2200
2178
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
2201
2179
|
* const map2 = HashMap.filterMap(
|
|
@@ -2219,8 +2197,7 @@ export const filterMap: {
|
|
|
2219
2197
|
* **Example** (Filtering and mapping Results)
|
|
2220
2198
|
*
|
|
2221
2199
|
* ```ts
|
|
2222
|
-
* import
|
|
2223
|
-
* import * as Result from "effect/Result"
|
|
2200
|
+
* import { HashMap, Result } from "effect"
|
|
2224
2201
|
*
|
|
2225
2202
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
2226
2203
|
* const map2 = HashMap.filterMap(
|
|
@@ -2244,8 +2221,7 @@ export const filterMap: {
|
|
|
2244
2221
|
* **Example** (Filtering and mapping Results)
|
|
2245
2222
|
*
|
|
2246
2223
|
* ```ts
|
|
2247
|
-
* import
|
|
2248
|
-
* import * as Result from "effect/Result"
|
|
2224
|
+
* import { HashMap, Result } from "effect"
|
|
2249
2225
|
*
|
|
2250
2226
|
* const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4])
|
|
2251
2227
|
* const map2 = HashMap.filterMap(
|
|
@@ -2271,8 +2247,7 @@ export const filterMap: {
|
|
|
2271
2247
|
* **Example** (Finding the first matching entry)
|
|
2272
2248
|
*
|
|
2273
2249
|
* ```ts
|
|
2274
|
-
* import
|
|
2275
|
-
* import * as Option from "effect/Option"
|
|
2250
|
+
* import { HashMap, Option } from "effect"
|
|
2276
2251
|
*
|
|
2277
2252
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2278
2253
|
* const result = HashMap.findFirst(map, (value, key) => key === "b" && value > 1)
|
|
@@ -2291,8 +2266,7 @@ export const findFirst: {
|
|
|
2291
2266
|
* **Example** (Finding the first matching entry)
|
|
2292
2267
|
*
|
|
2293
2268
|
* ```ts
|
|
2294
|
-
* import
|
|
2295
|
-
* import * as Option from "effect/Option"
|
|
2269
|
+
* import { HashMap, Option } from "effect"
|
|
2296
2270
|
*
|
|
2297
2271
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2298
2272
|
* const result = HashMap.findFirst(map, (value, key) => key === "b" && value > 1)
|
|
@@ -2311,8 +2285,7 @@ export const findFirst: {
|
|
|
2311
2285
|
* **Example** (Finding the first matching entry)
|
|
2312
2286
|
*
|
|
2313
2287
|
* ```ts
|
|
2314
|
-
* import
|
|
2315
|
-
* import * as Option from "effect/Option"
|
|
2288
|
+
* import { HashMap, Option } from "effect"
|
|
2316
2289
|
*
|
|
2317
2290
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2318
2291
|
* const result = HashMap.findFirst(map, (value, key) => key === "b" && value > 1)
|
|
@@ -2332,7 +2305,7 @@ export const findFirst: {
|
|
|
2332
2305
|
* **Example** (Checking for any matching entry)
|
|
2333
2306
|
*
|
|
2334
2307
|
* ```ts
|
|
2335
|
-
* import
|
|
2308
|
+
* import { HashMap } from "effect"
|
|
2336
2309
|
*
|
|
2337
2310
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2338
2311
|
*
|
|
@@ -2350,7 +2323,7 @@ export const some: {
|
|
|
2350
2323
|
* **Example** (Checking for any matching entry)
|
|
2351
2324
|
*
|
|
2352
2325
|
* ```ts
|
|
2353
|
-
* import
|
|
2326
|
+
* import { HashMap } from "effect"
|
|
2354
2327
|
*
|
|
2355
2328
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2356
2329
|
*
|
|
@@ -2368,7 +2341,7 @@ export const some: {
|
|
|
2368
2341
|
* **Example** (Checking for any matching entry)
|
|
2369
2342
|
*
|
|
2370
2343
|
* ```ts
|
|
2371
|
-
* import
|
|
2344
|
+
* import { HashMap } from "effect"
|
|
2372
2345
|
*
|
|
2373
2346
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2374
2347
|
*
|
|
@@ -2388,7 +2361,7 @@ export const some: {
|
|
|
2388
2361
|
* **Example** (Checking all entries)
|
|
2389
2362
|
*
|
|
2390
2363
|
* ```ts
|
|
2391
|
-
* import
|
|
2364
|
+
* import { HashMap } from "effect"
|
|
2392
2365
|
*
|
|
2393
2366
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2394
2367
|
*
|
|
@@ -2396,9 +2369,6 @@ export const some: {
|
|
|
2396
2369
|
* console.log(HashMap.every(map, (value) => value > 1)) // false
|
|
2397
2370
|
* ```
|
|
2398
2371
|
*
|
|
2399
|
-
* @param self - The hashmap to check.
|
|
2400
|
-
* @param predicate - The condition to test entries (value, key).
|
|
2401
|
-
*
|
|
2402
2372
|
* @category elements
|
|
2403
2373
|
* @since 3.14.0
|
|
2404
2374
|
*/
|
|
@@ -2409,7 +2379,7 @@ export const every: {
|
|
|
2409
2379
|
* **Example** (Checking all entries)
|
|
2410
2380
|
*
|
|
2411
2381
|
* ```ts
|
|
2412
|
-
* import
|
|
2382
|
+
* import { HashMap } from "effect"
|
|
2413
2383
|
*
|
|
2414
2384
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2415
2385
|
*
|
|
@@ -2417,9 +2387,6 @@ export const every: {
|
|
|
2417
2387
|
* console.log(HashMap.every(map, (value) => value > 1)) // false
|
|
2418
2388
|
* ```
|
|
2419
2389
|
*
|
|
2420
|
-
* @param self - The hashmap to check.
|
|
2421
|
-
* @param predicate - The condition to test entries (value, key).
|
|
2422
|
-
*
|
|
2423
2390
|
* @category elements
|
|
2424
2391
|
* @since 3.14.0
|
|
2425
2392
|
*/
|
|
@@ -2430,7 +2397,7 @@ export const every: {
|
|
|
2430
2397
|
* **Example** (Checking all entries)
|
|
2431
2398
|
*
|
|
2432
2399
|
* ```ts
|
|
2433
|
-
* import
|
|
2400
|
+
* import { HashMap } from "effect"
|
|
2434
2401
|
*
|
|
2435
2402
|
* const map = HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
2436
2403
|
*
|
|
@@ -2438,9 +2405,6 @@ export const every: {
|
|
|
2438
2405
|
* console.log(HashMap.every(map, (value) => value > 1)) // false
|
|
2439
2406
|
* ```
|
|
2440
2407
|
*
|
|
2441
|
-
* @param self - The hashmap to check.
|
|
2442
|
-
* @param predicate - The condition to test entries (value, key).
|
|
2443
|
-
*
|
|
2444
2408
|
* @category elements
|
|
2445
2409
|
* @since 3.14.0
|
|
2446
2410
|
*/
|