effect 4.0.0-beta.67 → 4.0.0-beta.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Array.d.ts +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 +97 -101
- 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 +394 -652
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +157 -247
- 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 +1917 -411
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1917 -411
- 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 +79 -5
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +79 -5
- 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/HelpDoc.d.ts +4 -4
- package/dist/unstable/cli/Param.d.ts +31 -1
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +37 -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 +182 -0
- package/dist/unstable/cli/index.d.ts.map +1 -1
- package/dist/unstable/cli/index.js +205 -6
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +0 -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 +158 -2
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +158 -2
- 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/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 +167 -0
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +167 -0
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +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.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 +5 -5
- package/dist/unstable/sql/Migrator.js +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 -0
- package/dist/unstable/sql/index.d.ts.map +1 -1
- package/dist/unstable/sql/index.js +178 -0
- 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.js +4 -4
- 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 +1 -1
- 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 +250 -256
- 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 +402 -660
- 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 +1915 -408
- 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 +79 -5
- package/src/unstable/cli/CliOutput.ts +5 -6
- package/src/unstable/cli/Command.ts +3 -3
- package/src/unstable/cli/HelpDoc.ts +4 -4
- package/src/unstable/cli/Param.ts +69 -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/parser.ts +0 -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 +158 -2
- 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/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 +167 -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 +0 -1
- 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 +5 -5
- 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 -0
- 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 +4 -4
- 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/dist/Effect.d.ts
CHANGED
|
@@ -103,14 +103,14 @@ import type * as Unify from "./Unify.ts";
|
|
|
103
103
|
* Type-level identifier for `Effect` values.
|
|
104
104
|
*
|
|
105
105
|
* @category Type identifiers
|
|
106
|
-
* @since
|
|
106
|
+
* @since 4.0.0
|
|
107
107
|
*/
|
|
108
108
|
export type TypeId = "~effect/Effect";
|
|
109
109
|
/**
|
|
110
110
|
* Runtime identifier used to recognize `Effect` values.
|
|
111
111
|
*
|
|
112
112
|
* @category Type identifiers
|
|
113
|
-
* @since
|
|
113
|
+
* @since 4.0.0
|
|
114
114
|
*/
|
|
115
115
|
export declare const TypeId: TypeId;
|
|
116
116
|
/**
|
|
@@ -127,7 +127,7 @@ export declare const TypeId: TypeId;
|
|
|
127
127
|
* To run an `Effect` value, you need a `Runtime`, which is a type that is
|
|
128
128
|
* capable of executing `Effect` values.
|
|
129
129
|
*
|
|
130
|
-
* @category
|
|
130
|
+
* @category models
|
|
131
131
|
* @since 2.0.0
|
|
132
132
|
*/
|
|
133
133
|
export interface Effect<out A, out E = never, out R = never> extends Pipeable, Inspectable {
|
|
@@ -140,7 +140,7 @@ export interface Effect<out A, out E = never, out R = never> extends Pipeable, I
|
|
|
140
140
|
/**
|
|
141
141
|
* Type-level unification support for `Effect` values.
|
|
142
142
|
*
|
|
143
|
-
* @category
|
|
143
|
+
* @category models
|
|
144
144
|
* @since 2.0.0
|
|
145
145
|
*/
|
|
146
146
|
export interface EffectUnify<A extends {
|
|
@@ -160,7 +160,7 @@ export interface EffectTypeLambda extends TypeLambda {
|
|
|
160
160
|
/**
|
|
161
161
|
* Variance interface for Effect, encoding the type parameters' variance.
|
|
162
162
|
*
|
|
163
|
-
* @category
|
|
163
|
+
* @category models
|
|
164
164
|
* @since 2.0.0
|
|
165
165
|
*/
|
|
166
166
|
export interface Variance<A, E, R> {
|
|
@@ -171,22 +171,22 @@ export interface Variance<A, E, R> {
|
|
|
171
171
|
/**
|
|
172
172
|
* Extracts the success type from an `Effect`.
|
|
173
173
|
*
|
|
174
|
-
* @category
|
|
174
|
+
* @category models
|
|
175
175
|
* @since 2.0.0
|
|
176
176
|
*/
|
|
177
177
|
export type Success<T> = T extends Effect<infer _A, infer _E, infer _R> ? _A : never;
|
|
178
178
|
/**
|
|
179
179
|
* Extracts the error type from an `Effect`.
|
|
180
180
|
*
|
|
181
|
-
* @category
|
|
181
|
+
* @category models
|
|
182
182
|
* @since 2.0.0
|
|
183
183
|
*/
|
|
184
184
|
export type Error<T> = T extends Effect<infer _A, infer _E, infer _R> ? _E : never;
|
|
185
185
|
/**
|
|
186
186
|
* Extracts the required services type from an `Effect`.
|
|
187
187
|
*
|
|
188
|
-
* @category
|
|
189
|
-
* @since
|
|
188
|
+
* @category models
|
|
189
|
+
* @since 4.0.0
|
|
190
190
|
*/
|
|
191
191
|
export type Services<T> = T extends Effect<infer _A, infer _E, infer _R> ? _R : never;
|
|
192
192
|
/**
|
|
@@ -201,15 +201,15 @@ export type Services<T> = T extends Effect<infer _A, infer _E, infer _R> ? _R :
|
|
|
201
201
|
* console.log(Effect.isEffect("hello")) // false
|
|
202
202
|
* ```
|
|
203
203
|
*
|
|
204
|
-
* @category
|
|
204
|
+
* @category guards
|
|
205
205
|
* @since 2.0.0
|
|
206
206
|
*/
|
|
207
207
|
export declare const isEffect: (u: unknown) => u is Effect<any, any, any>;
|
|
208
208
|
/**
|
|
209
209
|
* Iterator interface for Effect generators, enabling Effect values to work with generator functions.
|
|
210
210
|
*
|
|
211
|
-
* @category
|
|
212
|
-
* @since
|
|
211
|
+
* @category models
|
|
212
|
+
* @since 4.0.0
|
|
213
213
|
*/
|
|
214
214
|
export interface EffectIterator<T extends Effect<any, any, any>> {
|
|
215
215
|
next(...args: ReadonlyArray<any>): IteratorResult<T, Success<T>>;
|
|
@@ -218,28 +218,27 @@ export interface EffectIterator<T extends Effect<any, any, any>> {
|
|
|
218
218
|
* Namespace containing type utilities for the `Effect.all` function, which handles
|
|
219
219
|
* collecting multiple effects into various output structures.
|
|
220
220
|
*
|
|
221
|
-
* @category Models
|
|
222
221
|
* @since 2.0.0
|
|
223
222
|
*/
|
|
224
223
|
export declare namespace All {
|
|
225
224
|
/**
|
|
226
225
|
* Alias for any `Effect` value accepted by `Effect.all`.
|
|
227
226
|
*
|
|
228
|
-
* @category
|
|
227
|
+
* @category models
|
|
229
228
|
* @since 2.0.0
|
|
230
229
|
*/
|
|
231
230
|
type EffectAny = Effect<any, any, any>;
|
|
232
231
|
/**
|
|
233
232
|
* Computes the return type for `Effect.all` when collecting an iterable.
|
|
234
233
|
*
|
|
235
|
-
* @category
|
|
234
|
+
* @category models
|
|
236
235
|
* @since 2.0.0
|
|
237
236
|
*/
|
|
238
237
|
type ReturnIterable<T extends Iterable<EffectAny>, Discard extends boolean, Mode extends boolean = false> = [T] extends [Iterable<Effect<infer A, infer E, infer R>>] ? Effect<Discard extends true ? void : Array<Mode extends true ? Result.Result<A, E> : A>, Mode extends true ? never : E, R> : never;
|
|
239
238
|
/**
|
|
240
239
|
* Computes the return type for `Effect.all` when collecting a tuple.
|
|
241
240
|
*
|
|
242
|
-
* @category
|
|
241
|
+
* @category models
|
|
243
242
|
* @since 2.0.0
|
|
244
243
|
*/
|
|
245
244
|
type ReturnTuple<T extends ReadonlyArray<unknown>, Discard extends boolean, Mode extends boolean = false> = Effect<Discard extends true ? void : T[number] extends never ? [] : {
|
|
@@ -248,7 +247,7 @@ export declare namespace All {
|
|
|
248
247
|
/**
|
|
249
248
|
* Computes the return type for `Effect.all` when collecting a record.
|
|
250
249
|
*
|
|
251
|
-
* @category
|
|
250
|
+
* @category models
|
|
252
251
|
* @since 2.0.0
|
|
253
252
|
*/
|
|
254
253
|
type ReturnObject<T, Discard extends boolean, Mode extends boolean = false> = [T] extends [
|
|
@@ -261,7 +260,7 @@ export declare namespace All {
|
|
|
261
260
|
/**
|
|
262
261
|
* Detects whether `Effect.all` should discard collected values.
|
|
263
262
|
*
|
|
264
|
-
* @category
|
|
263
|
+
* @category models
|
|
265
264
|
* @since 2.0.0
|
|
266
265
|
*/
|
|
267
266
|
type IsDiscard<A> = [Extract<A, {
|
|
@@ -272,7 +271,7 @@ export declare namespace All {
|
|
|
272
271
|
/**
|
|
273
272
|
* Detects whether `Effect.all` should collect results in `Result` mode.
|
|
274
273
|
*
|
|
275
|
-
* @category
|
|
274
|
+
* @category models
|
|
276
275
|
* @since 4.0.0
|
|
277
276
|
*/
|
|
278
277
|
type IsResult<A> = [Extract<A, {
|
|
@@ -281,7 +280,7 @@ export declare namespace All {
|
|
|
281
280
|
/**
|
|
282
281
|
* Computes the return type for `Effect.all` from its input and options.
|
|
283
282
|
*
|
|
284
|
-
* @category
|
|
283
|
+
* @category models
|
|
285
284
|
* @since 2.0.0
|
|
286
285
|
*/
|
|
287
286
|
type Return<Arg extends Iterable<EffectAny> | Record<string, EffectAny>, O extends {
|
|
@@ -450,7 +449,7 @@ export declare const all: <const Arg extends Iterable<Effect<any, any, any>> | R
|
|
|
450
449
|
* ```
|
|
451
450
|
*
|
|
452
451
|
* @category Collecting
|
|
453
|
-
* @since
|
|
452
|
+
* @since 2.0.0
|
|
454
453
|
*/
|
|
455
454
|
export declare const partition: {
|
|
456
455
|
/**
|
|
@@ -479,7 +478,7 @@ export declare const partition: {
|
|
|
479
478
|
* ```
|
|
480
479
|
*
|
|
481
480
|
* @category Collecting
|
|
482
|
-
* @since
|
|
481
|
+
* @since 2.0.0
|
|
483
482
|
*/
|
|
484
483
|
<A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options?: {
|
|
485
484
|
readonly concurrency?: Concurrency | undefined;
|
|
@@ -510,7 +509,7 @@ export declare const partition: {
|
|
|
510
509
|
* ```
|
|
511
510
|
*
|
|
512
511
|
* @category Collecting
|
|
513
|
-
* @since
|
|
512
|
+
* @since 2.0.0
|
|
514
513
|
*/
|
|
515
514
|
<A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options?: {
|
|
516
515
|
readonly concurrency?: Concurrency | undefined;
|
|
@@ -550,7 +549,7 @@ export declare const partition: {
|
|
|
550
549
|
* ```
|
|
551
550
|
*
|
|
552
551
|
* @category Error Accumulation
|
|
553
|
-
* @since
|
|
552
|
+
* @since 2.0.0
|
|
554
553
|
*/
|
|
555
554
|
export declare const validate: {
|
|
556
555
|
/**
|
|
@@ -587,7 +586,7 @@ export declare const validate: {
|
|
|
587
586
|
* ```
|
|
588
587
|
*
|
|
589
588
|
* @category Error Accumulation
|
|
590
|
-
* @since
|
|
589
|
+
* @since 2.0.0
|
|
591
590
|
*/
|
|
592
591
|
<A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options?: {
|
|
593
592
|
readonly concurrency?: Concurrency | undefined;
|
|
@@ -627,7 +626,7 @@ export declare const validate: {
|
|
|
627
626
|
* ```
|
|
628
627
|
*
|
|
629
628
|
* @category Error Accumulation
|
|
630
|
-
* @since
|
|
629
|
+
* @since 2.0.0
|
|
631
630
|
*/
|
|
632
631
|
<A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options: {
|
|
633
632
|
readonly concurrency?: Concurrency | undefined;
|
|
@@ -667,7 +666,7 @@ export declare const validate: {
|
|
|
667
666
|
* ```
|
|
668
667
|
*
|
|
669
668
|
* @category Error Accumulation
|
|
670
|
-
* @since
|
|
669
|
+
* @since 2.0.0
|
|
671
670
|
*/
|
|
672
671
|
<A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options?: {
|
|
673
672
|
readonly concurrency?: Concurrency | undefined;
|
|
@@ -707,7 +706,7 @@ export declare const validate: {
|
|
|
707
706
|
* ```
|
|
708
707
|
*
|
|
709
708
|
* @category Error Accumulation
|
|
710
|
-
* @since
|
|
709
|
+
* @since 2.0.0
|
|
711
710
|
*/
|
|
712
711
|
<A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options: {
|
|
713
712
|
readonly concurrency?: Concurrency | undefined;
|
|
@@ -835,8 +834,7 @@ export declare const findFirstFilter: {
|
|
|
835
834
|
* **Example** (Applying Effects to Iterable Elements)
|
|
836
835
|
*
|
|
837
836
|
* ```ts
|
|
838
|
-
* import { Effect } from "effect"
|
|
839
|
-
* import { Console } from "effect"
|
|
837
|
+
* import { Console, Effect } from "effect"
|
|
840
838
|
*
|
|
841
839
|
* const result = Effect.forEach(
|
|
842
840
|
* [1, 2, 3, 4, 5],
|
|
@@ -857,8 +855,7 @@ export declare const findFirstFilter: {
|
|
|
857
855
|
* **Example** (Using discard to Ignore Results)
|
|
858
856
|
*
|
|
859
857
|
* ```ts
|
|
860
|
-
* import { Effect } from "effect"
|
|
861
|
-
* import { Console } from "effect"
|
|
858
|
+
* import { Console, Effect } from "effect"
|
|
862
859
|
*
|
|
863
860
|
* // Apply effects but discard the results
|
|
864
861
|
* const result = Effect.forEach(
|
|
@@ -908,8 +905,7 @@ export declare const forEach: {
|
|
|
908
905
|
* **Example** (Applying Effects to Iterable Elements)
|
|
909
906
|
*
|
|
910
907
|
* ```ts
|
|
911
|
-
* import { Effect } from "effect"
|
|
912
|
-
* import { Console } from "effect"
|
|
908
|
+
* import { Console, Effect } from "effect"
|
|
913
909
|
*
|
|
914
910
|
* const result = Effect.forEach(
|
|
915
911
|
* [1, 2, 3, 4, 5],
|
|
@@ -930,8 +926,7 @@ export declare const forEach: {
|
|
|
930
926
|
* **Example** (Using discard to Ignore Results)
|
|
931
927
|
*
|
|
932
928
|
* ```ts
|
|
933
|
-
* import { Effect } from "effect"
|
|
934
|
-
* import { Console } from "effect"
|
|
929
|
+
* import { Console, Effect } from "effect"
|
|
935
930
|
*
|
|
936
931
|
* // Apply effects but discard the results
|
|
937
932
|
* const result = Effect.forEach(
|
|
@@ -984,8 +979,7 @@ export declare const forEach: {
|
|
|
984
979
|
* **Example** (Applying Effects to Iterable Elements)
|
|
985
980
|
*
|
|
986
981
|
* ```ts
|
|
987
|
-
* import { Effect } from "effect"
|
|
988
|
-
* import { Console } from "effect"
|
|
982
|
+
* import { Console, Effect } from "effect"
|
|
989
983
|
*
|
|
990
984
|
* const result = Effect.forEach(
|
|
991
985
|
* [1, 2, 3, 4, 5],
|
|
@@ -1006,8 +1000,7 @@ export declare const forEach: {
|
|
|
1006
1000
|
* **Example** (Using discard to Ignore Results)
|
|
1007
1001
|
*
|
|
1008
1002
|
* ```ts
|
|
1009
|
-
* import { Effect } from "effect"
|
|
1010
|
-
* import { Console } from "effect"
|
|
1003
|
+
* import { Console, Effect } from "effect"
|
|
1011
1004
|
*
|
|
1012
1005
|
* // Apply effects but discard the results
|
|
1013
1006
|
* const result = Effect.forEach(
|
|
@@ -1084,7 +1077,7 @@ export declare const whileLoop: <A, E, R>(options: {
|
|
|
1084
1077
|
* This defect is not a standard error but indicates a flaw in the logic that
|
|
1085
1078
|
* was expected to be error-free. You can think of it similar to an unexpected
|
|
1086
1079
|
* crash in the program, which can be further managed or logged using tools like
|
|
1087
|
-
* {@link
|
|
1080
|
+
* {@link catchDefect}.
|
|
1088
1081
|
*
|
|
1089
1082
|
* **Interruptions**
|
|
1090
1083
|
*
|
|
@@ -1351,7 +1344,7 @@ export declare const suspend: <A, E, R>(effect: LazyArg<Effect<A, E, R>>) => Eff
|
|
|
1351
1344
|
* This defect is not a standard error but indicates a flaw in the logic that
|
|
1352
1345
|
* was expected to be error-free. You can think of it similar to an unexpected
|
|
1353
1346
|
* crash in the program, which can be further managed or logged using tools like
|
|
1354
|
-
* {@link
|
|
1347
|
+
* {@link catchDefect}.
|
|
1355
1348
|
*
|
|
1356
1349
|
* @see {@link try_ | try} for a version that can handle failures.
|
|
1357
1350
|
*
|
|
@@ -1403,12 +1396,6 @@ undefined_ as undefined };
|
|
|
1403
1396
|
* Use `Effect.callback` when integrating APIs that complete through callbacks
|
|
1404
1397
|
* instead of returning a `Promise`.
|
|
1405
1398
|
*
|
|
1406
|
-
* **Previously Known As**
|
|
1407
|
-
*
|
|
1408
|
-
* This API replaces the following from Effect 3.x:
|
|
1409
|
-
*
|
|
1410
|
-
* - `Effect.async`
|
|
1411
|
-
*
|
|
1412
1399
|
* **Example** (Usage)
|
|
1413
1400
|
*
|
|
1414
1401
|
* ```ts
|
|
@@ -1427,7 +1414,7 @@ undefined_ as undefined };
|
|
|
1427
1414
|
* ```
|
|
1428
1415
|
*
|
|
1429
1416
|
* @category Creating Effects
|
|
1430
|
-
* @since
|
|
1417
|
+
* @since 4.0.0
|
|
1431
1418
|
*/
|
|
1432
1419
|
export declare const callback: <A, E = never, R = never>(register: (this: Scheduler, resume: (effect: Effect<A, E, R>) => void, signal: AbortSignal) => void | Effect<void, never, R>) => Effect<A, E, R>;
|
|
1433
1420
|
/**
|
|
@@ -1460,8 +1447,7 @@ export declare const never: Effect<never>;
|
|
|
1460
1447
|
* **Example** (Usage)
|
|
1461
1448
|
*
|
|
1462
1449
|
* ```ts
|
|
1463
|
-
* import { Effect } from "effect"
|
|
1464
|
-
* import { pipe } from "effect/Function"
|
|
1450
|
+
* import { Effect, pipe } from "effect"
|
|
1465
1451
|
*
|
|
1466
1452
|
* const program = pipe(
|
|
1467
1453
|
* Effect.Do,
|
|
@@ -1472,7 +1458,7 @@ export declare const never: Effect<never>;
|
|
|
1472
1458
|
* ```
|
|
1473
1459
|
*
|
|
1474
1460
|
* @category Do notation
|
|
1475
|
-
* @since
|
|
1461
|
+
* @since 2.0.0
|
|
1476
1462
|
*/
|
|
1477
1463
|
export declare const Do: Effect<{}>;
|
|
1478
1464
|
/**
|
|
@@ -1480,7 +1466,7 @@ export declare const Do: Effect<{}>;
|
|
|
1480
1466
|
* record used in do notation pipelines.
|
|
1481
1467
|
*
|
|
1482
1468
|
* @category Do notation
|
|
1483
|
-
* @since
|
|
1469
|
+
* @since 2.0.0
|
|
1484
1470
|
*/
|
|
1485
1471
|
export declare const bindTo: {
|
|
1486
1472
|
/**
|
|
@@ -1488,7 +1474,7 @@ export declare const bindTo: {
|
|
|
1488
1474
|
* record used in do notation pipelines.
|
|
1489
1475
|
*
|
|
1490
1476
|
* @category Do notation
|
|
1491
|
-
* @since
|
|
1477
|
+
* @since 2.0.0
|
|
1492
1478
|
*/
|
|
1493
1479
|
<N extends string>(name: N): <A, E, R>(self: Effect<A, E, R>) => Effect<{
|
|
1494
1480
|
[K in N]: A;
|
|
@@ -1498,7 +1484,7 @@ export declare const bindTo: {
|
|
|
1498
1484
|
* record used in do notation pipelines.
|
|
1499
1485
|
*
|
|
1500
1486
|
* @category Do notation
|
|
1501
|
-
* @since
|
|
1487
|
+
* @since 2.0.0
|
|
1502
1488
|
*/
|
|
1503
1489
|
<A, E, R, N extends string>(self: Effect<A, E, R>, name: N): Effect<{
|
|
1504
1490
|
[K in N]: A;
|
|
@@ -1513,28 +1499,28 @@ export {
|
|
|
1513
1499
|
* Adds a computed plain value to the do notation record.
|
|
1514
1500
|
*
|
|
1515
1501
|
* @category Do notation
|
|
1516
|
-
* @since
|
|
1502
|
+
* @since 2.0.0
|
|
1517
1503
|
*/
|
|
1518
1504
|
let_ as let };
|
|
1519
1505
|
/**
|
|
1520
1506
|
* Adds an `Effect` value to the do notation record under a given name.
|
|
1521
1507
|
*
|
|
1522
1508
|
* @category Do notation
|
|
1523
|
-
* @since
|
|
1509
|
+
* @since 2.0.0
|
|
1524
1510
|
*/
|
|
1525
1511
|
export declare const bind: {
|
|
1526
1512
|
/**
|
|
1527
1513
|
* Adds an `Effect` value to the do notation record under a given name.
|
|
1528
1514
|
*
|
|
1529
1515
|
* @category Do notation
|
|
1530
|
-
* @since
|
|
1516
|
+
* @since 2.0.0
|
|
1531
1517
|
*/
|
|
1532
1518
|
<N extends string, A extends Record<string, any>, B, E2, R2>(name: N, f: (a: NoInfer<A>) => Effect<B, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<Simplify<Omit<A, N> & Record<N, B>>, E | E2, R | R2>;
|
|
1533
1519
|
/**
|
|
1534
1520
|
* Adds an `Effect` value to the do notation record under a given name.
|
|
1535
1521
|
*
|
|
1536
1522
|
* @category Do notation
|
|
1537
|
-
* @since
|
|
1523
|
+
* @since 2.0.0
|
|
1538
1524
|
*/
|
|
1539
1525
|
<A extends Record<string, any>, E, R, B, E2, R2, N extends string>(self: Effect<A, E, R>, name: N, f: (a: NoInfer<A>) => Effect<B, E2, R2>): Effect<Simplify<Omit<A, N> & Record<N, B>>, E | E2, R | R2>;
|
|
1540
1526
|
};
|
|
@@ -1708,8 +1694,7 @@ export declare const gen: {
|
|
|
1708
1694
|
/**
|
|
1709
1695
|
* Type helpers for `Effect.gen` generator return signatures.
|
|
1710
1696
|
*
|
|
1711
|
-
* @
|
|
1712
|
-
* @since 4.0.0
|
|
1697
|
+
* @since 2.0.0
|
|
1713
1698
|
*/
|
|
1714
1699
|
export declare namespace gen {
|
|
1715
1700
|
/**
|
|
@@ -1727,7 +1712,7 @@ export declare namespace gen {
|
|
|
1727
1712
|
*
|
|
1728
1713
|
* Use this function to explicitly signal an error in an `Effect`. The error
|
|
1729
1714
|
* will keep propagating unless it is handled. You can handle the error with
|
|
1730
|
-
* functions like {@link
|
|
1715
|
+
* functions like {@link catchTag} or {@link catchTags}.
|
|
1731
1716
|
*
|
|
1732
1717
|
* @see {@link succeed} to create an effect that represents a successful value.
|
|
1733
1718
|
*
|
|
@@ -1835,8 +1820,7 @@ export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Ef
|
|
|
1835
1820
|
* The error channel of the resulting effect is of type `never`, indicating that
|
|
1836
1821
|
* it cannot recover from this failure.
|
|
1837
1822
|
*
|
|
1838
|
-
* @see {@link
|
|
1839
|
-
* @see {@link dieMessage} for a variant that throws a `RuntimeException` with a message.
|
|
1823
|
+
* @see {@link die} for a variant that dies with an already computed defect.
|
|
1840
1824
|
*
|
|
1841
1825
|
* **Example** (Terminating on Division by Zero with a Specified Error)
|
|
1842
1826
|
*
|
|
@@ -1970,7 +1954,7 @@ export declare const yieldNow: Effect<void>;
|
|
|
1970
1954
|
* ```
|
|
1971
1955
|
*
|
|
1972
1956
|
* @category Creating Effects
|
|
1973
|
-
* @since
|
|
1957
|
+
* @since 4.0.0
|
|
1974
1958
|
*/
|
|
1975
1959
|
export declare const yieldNowWith: (priority?: number) => Effect<void>;
|
|
1976
1960
|
/**
|
|
@@ -1990,7 +1974,7 @@ export declare const yieldNowWith: (priority?: number) => Effect<void>;
|
|
|
1990
1974
|
* ```
|
|
1991
1975
|
*
|
|
1992
1976
|
* @category Creating Effects
|
|
1993
|
-
* @since
|
|
1977
|
+
* @since 4.0.0
|
|
1994
1978
|
*/
|
|
1995
1979
|
export declare const withFiber: <A, E = never, R = never>(evaluate: (fiber: Fiber<unknown, unknown>) => Effect<A, E, R>) => Effect<A, E, R>;
|
|
1996
1980
|
/**
|
|
@@ -2012,7 +1996,7 @@ export declare const withFiber: <A, E = never, R = never>(evaluate: (fiber: Fibe
|
|
|
2012
1996
|
* // { _id: 'Exit', _tag: 'Failure', cause: { _id: 'Cause', _tag: 'Fail', failure: 'Something went wrong' } }
|
|
2013
1997
|
* ```
|
|
2014
1998
|
*
|
|
2015
|
-
* @category
|
|
1999
|
+
* @category converting
|
|
2016
2000
|
* @since 4.0.0
|
|
2017
2001
|
*/
|
|
2018
2002
|
export declare const fromResult: <A, E>(result: Result.Result<A, E>) => Effect<A, E>;
|
|
@@ -2038,7 +2022,7 @@ export declare const fromResult: <A, E>(result: Result.Result<A, E>) => Effect<A
|
|
|
2038
2022
|
* // { _id: 'Exit', _tag: 'Failure', cause: { _id: 'Cause', _tag: 'Fail', failure: { _id: 'NoSuchElementError' } } }
|
|
2039
2023
|
* ```
|
|
2040
2024
|
*
|
|
2041
|
-
* @category
|
|
2025
|
+
* @category converting
|
|
2042
2026
|
* @since 4.0.0
|
|
2043
2027
|
*/
|
|
2044
2028
|
export declare const fromOption: <A>(option: Option<A>) => Effect<A, Cause.NoSuchElementError>;
|
|
@@ -2064,7 +2048,7 @@ export declare const fromOption: <A>(option: Option<A>) => Effect<A, Cause.NoSuc
|
|
|
2064
2048
|
* // Output: hello
|
|
2065
2049
|
* ```
|
|
2066
2050
|
*
|
|
2067
|
-
* @category
|
|
2051
|
+
* @category converting
|
|
2068
2052
|
* @since 4.0.0
|
|
2069
2053
|
*/
|
|
2070
2054
|
export declare const fromNullishOr: <A>(value: A) => Effect<NonNullable<A>, Cause.NoSuchElementError>;
|
|
@@ -2129,7 +2113,7 @@ export declare const fromNullishOr: <A>(value: A) => Effect<NonNullable<A>, Caus
|
|
|
2129
2113
|
*
|
|
2130
2114
|
* @see {@link tap} for a version that ignores the result of the effect.
|
|
2131
2115
|
*
|
|
2132
|
-
* @category
|
|
2116
|
+
* @category sequencing
|
|
2133
2117
|
* @since 2.0.0
|
|
2134
2118
|
*/
|
|
2135
2119
|
export declare const flatMap: {
|
|
@@ -2194,7 +2178,7 @@ export declare const flatMap: {
|
|
|
2194
2178
|
*
|
|
2195
2179
|
* @see {@link tap} for a version that ignores the result of the effect.
|
|
2196
2180
|
*
|
|
2197
|
-
* @category
|
|
2181
|
+
* @category sequencing
|
|
2198
2182
|
* @since 2.0.0
|
|
2199
2183
|
*/
|
|
2200
2184
|
<A, B, E1, R1>(f: (a: A) => Effect<B, E1, R1>): <E, R>(self: Effect<A, E, R>) => Effect<B, E1 | E, R1 | R>;
|
|
@@ -2259,7 +2243,7 @@ export declare const flatMap: {
|
|
|
2259
2243
|
*
|
|
2260
2244
|
* @see {@link tap} for a version that ignores the result of the effect.
|
|
2261
2245
|
*
|
|
2262
|
-
* @category
|
|
2246
|
+
* @category sequencing
|
|
2263
2247
|
* @since 2.0.0
|
|
2264
2248
|
*/
|
|
2265
2249
|
<A, E, R, B, E1, R1>(self: Effect<A, E, R>, f: (a: A) => Effect<B, E1, R1>): Effect<B, E | E1, R | R1>;
|
|
@@ -2281,7 +2265,7 @@ export declare const flatMap: {
|
|
|
2281
2265
|
* })
|
|
2282
2266
|
* ```
|
|
2283
2267
|
*
|
|
2284
|
-
* @category
|
|
2268
|
+
* @category sequencing
|
|
2285
2269
|
* @since 2.0.0
|
|
2286
2270
|
*/
|
|
2287
2271
|
export declare const flatten: <A, E, R, E2, R2>(self: Effect<Effect<A, E, R>, E2, R2>) => Effect<A, E | E2, R | R2>;
|
|
@@ -2314,12 +2298,6 @@ export declare const flatten: <A, E, R, E2, R2>(self: Effect<Effect<A, E, R>, E2
|
|
|
2314
2298
|
* Failures or requirements from either effect are preserved in the returned
|
|
2315
2299
|
* effect.
|
|
2316
2300
|
*
|
|
2317
|
-
* **Previously Known As**
|
|
2318
|
-
*
|
|
2319
|
-
* This API replaces the following from Effect 3.x:
|
|
2320
|
-
*
|
|
2321
|
-
* - `Effect.zipRight`
|
|
2322
|
-
*
|
|
2323
2301
|
* **Example** (Applying a Discount Based on Fetched Amount)
|
|
2324
2302
|
*
|
|
2325
2303
|
* ```ts
|
|
@@ -2360,7 +2338,7 @@ export declare const flatten: <A, E, R, E2, R2>(self: Effect<Effect<A, E, R>, E2
|
|
|
2360
2338
|
* // Output: 190
|
|
2361
2339
|
* ```
|
|
2362
2340
|
*
|
|
2363
|
-
* @category
|
|
2341
|
+
* @category sequencing
|
|
2364
2342
|
* @since 2.0.0
|
|
2365
2343
|
*/
|
|
2366
2344
|
export declare const andThen: {
|
|
@@ -2393,12 +2371,6 @@ export declare const andThen: {
|
|
|
2393
2371
|
* Failures or requirements from either effect are preserved in the returned
|
|
2394
2372
|
* effect.
|
|
2395
2373
|
*
|
|
2396
|
-
* **Previously Known As**
|
|
2397
|
-
*
|
|
2398
|
-
* This API replaces the following from Effect 3.x:
|
|
2399
|
-
*
|
|
2400
|
-
* - `Effect.zipRight`
|
|
2401
|
-
*
|
|
2402
2374
|
* **Example** (Applying a Discount Based on Fetched Amount)
|
|
2403
2375
|
*
|
|
2404
2376
|
* ```ts
|
|
@@ -2439,7 +2411,7 @@ export declare const andThen: {
|
|
|
2439
2411
|
* // Output: 190
|
|
2440
2412
|
* ```
|
|
2441
2413
|
*
|
|
2442
|
-
* @category
|
|
2414
|
+
* @category sequencing
|
|
2443
2415
|
* @since 2.0.0
|
|
2444
2416
|
*/
|
|
2445
2417
|
<A, B, E2, R2>(f: (a: A) => Effect<B, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<B, E | E2, R | R2>;
|
|
@@ -2472,12 +2444,6 @@ export declare const andThen: {
|
|
|
2472
2444
|
* Failures or requirements from either effect are preserved in the returned
|
|
2473
2445
|
* effect.
|
|
2474
2446
|
*
|
|
2475
|
-
* **Previously Known As**
|
|
2476
|
-
*
|
|
2477
|
-
* This API replaces the following from Effect 3.x:
|
|
2478
|
-
*
|
|
2479
|
-
* - `Effect.zipRight`
|
|
2480
|
-
*
|
|
2481
2447
|
* **Example** (Applying a Discount Based on Fetched Amount)
|
|
2482
2448
|
*
|
|
2483
2449
|
* ```ts
|
|
@@ -2518,7 +2484,7 @@ export declare const andThen: {
|
|
|
2518
2484
|
* // Output: 190
|
|
2519
2485
|
* ```
|
|
2520
2486
|
*
|
|
2521
|
-
* @category
|
|
2487
|
+
* @category sequencing
|
|
2522
2488
|
* @since 2.0.0
|
|
2523
2489
|
*/
|
|
2524
2490
|
<B, E2, R2>(f: Effect<B, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<B, E | E2, R | R2>;
|
|
@@ -2551,12 +2517,6 @@ export declare const andThen: {
|
|
|
2551
2517
|
* Failures or requirements from either effect are preserved in the returned
|
|
2552
2518
|
* effect.
|
|
2553
2519
|
*
|
|
2554
|
-
* **Previously Known As**
|
|
2555
|
-
*
|
|
2556
|
-
* This API replaces the following from Effect 3.x:
|
|
2557
|
-
*
|
|
2558
|
-
* - `Effect.zipRight`
|
|
2559
|
-
*
|
|
2560
2520
|
* **Example** (Applying a Discount Based on Fetched Amount)
|
|
2561
2521
|
*
|
|
2562
2522
|
* ```ts
|
|
@@ -2597,7 +2557,7 @@ export declare const andThen: {
|
|
|
2597
2557
|
* // Output: 190
|
|
2598
2558
|
* ```
|
|
2599
2559
|
*
|
|
2600
|
-
* @category
|
|
2560
|
+
* @category sequencing
|
|
2601
2561
|
* @since 2.0.0
|
|
2602
2562
|
*/
|
|
2603
2563
|
<A, E, R, B, E2, R2>(self: Effect<A, E, R>, f: (a: A) => Effect<B, E2, R2>): Effect<B, E | E2, R | R2>;
|
|
@@ -2630,12 +2590,6 @@ export declare const andThen: {
|
|
|
2630
2590
|
* Failures or requirements from either effect are preserved in the returned
|
|
2631
2591
|
* effect.
|
|
2632
2592
|
*
|
|
2633
|
-
* **Previously Known As**
|
|
2634
|
-
*
|
|
2635
|
-
* This API replaces the following from Effect 3.x:
|
|
2636
|
-
*
|
|
2637
|
-
* - `Effect.zipRight`
|
|
2638
|
-
*
|
|
2639
2593
|
* **Example** (Applying a Discount Based on Fetched Amount)
|
|
2640
2594
|
*
|
|
2641
2595
|
* ```ts
|
|
@@ -2676,7 +2630,7 @@ export declare const andThen: {
|
|
|
2676
2630
|
* // Output: 190
|
|
2677
2631
|
* ```
|
|
2678
2632
|
*
|
|
2679
|
-
* @category
|
|
2633
|
+
* @category sequencing
|
|
2680
2634
|
* @since 2.0.0
|
|
2681
2635
|
*/
|
|
2682
2636
|
<A, E, R, B, E2, R2>(self: Effect<A, E, R>, f: Effect<B, E2, R2>): Effect<B, E | E2, R | R2>;
|
|
@@ -2698,17 +2652,10 @@ export declare const andThen: {
|
|
|
2698
2652
|
* next part of the chain. Note that if the side effect fails, the entire chain
|
|
2699
2653
|
* will fail too.
|
|
2700
2654
|
*
|
|
2701
|
-
* **Previously Known As**
|
|
2702
|
-
*
|
|
2703
|
-
* This API replaces the following from Effect 3.x:
|
|
2704
|
-
*
|
|
2705
|
-
* - `Effect.zipLeft`
|
|
2706
|
-
*
|
|
2707
2655
|
* **Example** (Logging a step in a pipeline)
|
|
2708
2656
|
*
|
|
2709
2657
|
* ```ts
|
|
2710
|
-
* import { Data, Effect, pipe } from "effect"
|
|
2711
|
-
* import { Console } from "effect"
|
|
2658
|
+
* import { Console, Data, Effect, pipe } from "effect"
|
|
2712
2659
|
*
|
|
2713
2660
|
* class DiscountRateError extends Data.TaggedError("DiscountRateError")<{}> {}
|
|
2714
2661
|
*
|
|
@@ -2738,7 +2685,7 @@ export declare const andThen: {
|
|
|
2738
2685
|
* // 95
|
|
2739
2686
|
* ```
|
|
2740
2687
|
*
|
|
2741
|
-
* @category
|
|
2688
|
+
* @category sequencing
|
|
2742
2689
|
* @since 2.0.0
|
|
2743
2690
|
*/
|
|
2744
2691
|
export declare const tap: {
|
|
@@ -2759,17 +2706,10 @@ export declare const tap: {
|
|
|
2759
2706
|
* next part of the chain. Note that if the side effect fails, the entire chain
|
|
2760
2707
|
* will fail too.
|
|
2761
2708
|
*
|
|
2762
|
-
* **Previously Known As**
|
|
2763
|
-
*
|
|
2764
|
-
* This API replaces the following from Effect 3.x:
|
|
2765
|
-
*
|
|
2766
|
-
* - `Effect.zipLeft`
|
|
2767
|
-
*
|
|
2768
2709
|
* **Example** (Logging a step in a pipeline)
|
|
2769
2710
|
*
|
|
2770
2711
|
* ```ts
|
|
2771
|
-
* import { Data, Effect, pipe } from "effect"
|
|
2772
|
-
* import { Console } from "effect"
|
|
2712
|
+
* import { Console, Data, Effect, pipe } from "effect"
|
|
2773
2713
|
*
|
|
2774
2714
|
* class DiscountRateError extends Data.TaggedError("DiscountRateError")<{}> {}
|
|
2775
2715
|
*
|
|
@@ -2799,7 +2739,7 @@ export declare const tap: {
|
|
|
2799
2739
|
* // 95
|
|
2800
2740
|
* ```
|
|
2801
2741
|
*
|
|
2802
|
-
* @category
|
|
2742
|
+
* @category sequencing
|
|
2803
2743
|
* @since 2.0.0
|
|
2804
2744
|
*/
|
|
2805
2745
|
<A, B, E2, R2>(f: (a: NoInfer<A>) => Effect<B, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R | R2>;
|
|
@@ -2820,17 +2760,10 @@ export declare const tap: {
|
|
|
2820
2760
|
* next part of the chain. Note that if the side effect fails, the entire chain
|
|
2821
2761
|
* will fail too.
|
|
2822
2762
|
*
|
|
2823
|
-
* **Previously Known As**
|
|
2824
|
-
*
|
|
2825
|
-
* This API replaces the following from Effect 3.x:
|
|
2826
|
-
*
|
|
2827
|
-
* - `Effect.zipLeft`
|
|
2828
|
-
*
|
|
2829
2763
|
* **Example** (Logging a step in a pipeline)
|
|
2830
2764
|
*
|
|
2831
2765
|
* ```ts
|
|
2832
|
-
* import { Data, Effect, pipe } from "effect"
|
|
2833
|
-
* import { Console } from "effect"
|
|
2766
|
+
* import { Console, Data, Effect, pipe } from "effect"
|
|
2834
2767
|
*
|
|
2835
2768
|
* class DiscountRateError extends Data.TaggedError("DiscountRateError")<{}> {}
|
|
2836
2769
|
*
|
|
@@ -2860,7 +2793,7 @@ export declare const tap: {
|
|
|
2860
2793
|
* // 95
|
|
2861
2794
|
* ```
|
|
2862
2795
|
*
|
|
2863
|
-
* @category
|
|
2796
|
+
* @category sequencing
|
|
2864
2797
|
* @since 2.0.0
|
|
2865
2798
|
*/
|
|
2866
2799
|
<B, E2, R2>(f: Effect<B, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R | R2>;
|
|
@@ -2881,17 +2814,10 @@ export declare const tap: {
|
|
|
2881
2814
|
* next part of the chain. Note that if the side effect fails, the entire chain
|
|
2882
2815
|
* will fail too.
|
|
2883
2816
|
*
|
|
2884
|
-
* **Previously Known As**
|
|
2885
|
-
*
|
|
2886
|
-
* This API replaces the following from Effect 3.x:
|
|
2887
|
-
*
|
|
2888
|
-
* - `Effect.zipLeft`
|
|
2889
|
-
*
|
|
2890
2817
|
* **Example** (Logging a step in a pipeline)
|
|
2891
2818
|
*
|
|
2892
2819
|
* ```ts
|
|
2893
|
-
* import { Data, Effect, pipe } from "effect"
|
|
2894
|
-
* import { Console } from "effect"
|
|
2820
|
+
* import { Console, Data, Effect, pipe } from "effect"
|
|
2895
2821
|
*
|
|
2896
2822
|
* class DiscountRateError extends Data.TaggedError("DiscountRateError")<{}> {}
|
|
2897
2823
|
*
|
|
@@ -2921,7 +2847,7 @@ export declare const tap: {
|
|
|
2921
2847
|
* // 95
|
|
2922
2848
|
* ```
|
|
2923
2849
|
*
|
|
2924
|
-
* @category
|
|
2850
|
+
* @category sequencing
|
|
2925
2851
|
* @since 2.0.0
|
|
2926
2852
|
*/
|
|
2927
2853
|
<A, E, R, B, E2, R2>(self: Effect<A, E, R>, f: (a: NoInfer<A>) => Effect<B, E2, R2>): Effect<A, E | E2, R | R2>;
|
|
@@ -2942,17 +2868,10 @@ export declare const tap: {
|
|
|
2942
2868
|
* next part of the chain. Note that if the side effect fails, the entire chain
|
|
2943
2869
|
* will fail too.
|
|
2944
2870
|
*
|
|
2945
|
-
* **Previously Known As**
|
|
2946
|
-
*
|
|
2947
|
-
* This API replaces the following from Effect 3.x:
|
|
2948
|
-
*
|
|
2949
|
-
* - `Effect.zipLeft`
|
|
2950
|
-
*
|
|
2951
2871
|
* **Example** (Logging a step in a pipeline)
|
|
2952
2872
|
*
|
|
2953
2873
|
* ```ts
|
|
2954
|
-
* import { Data, Effect, pipe } from "effect"
|
|
2955
|
-
* import { Console } from "effect"
|
|
2874
|
+
* import { Console, Data, Effect, pipe } from "effect"
|
|
2956
2875
|
*
|
|
2957
2876
|
* class DiscountRateError extends Data.TaggedError("DiscountRateError")<{}> {}
|
|
2958
2877
|
*
|
|
@@ -2982,7 +2901,7 @@ export declare const tap: {
|
|
|
2982
2901
|
* // 95
|
|
2983
2902
|
* ```
|
|
2984
2903
|
*
|
|
2985
|
-
* @category
|
|
2904
|
+
* @category sequencing
|
|
2986
2905
|
* @since 2.0.0
|
|
2987
2906
|
*/
|
|
2988
2907
|
<A, E, R, B, E2, R2>(self: Effect<A, E, R>, f: Effect<B, E2, R2>): Effect<A, E | E2, R | R2>;
|
|
@@ -3010,12 +2929,6 @@ export declare const tap: {
|
|
|
3010
2929
|
* The resulting effect cannot fail directly because all recoverable failures
|
|
3011
2930
|
* are represented inside the `Result` type.
|
|
3012
2931
|
*
|
|
3013
|
-
* **Previously Known As**
|
|
3014
|
-
*
|
|
3015
|
-
* This API replaces the following from Effect 3.x:
|
|
3016
|
-
*
|
|
3017
|
-
* - `Effect.either`
|
|
3018
|
-
*
|
|
3019
2932
|
* **Example** (Usage)
|
|
3020
2933
|
*
|
|
3021
2934
|
* ```ts
|
|
@@ -3156,7 +3069,7 @@ export declare const exit: <A, E, R>(self: Effect<A, E, R>) => Effect<Exit.Exit<
|
|
|
3156
3069
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
3157
3070
|
* @see {@link flatMap} or {@link andThen} for a version that can return a new effect.
|
|
3158
3071
|
*
|
|
3159
|
-
* @category
|
|
3072
|
+
* @category mapping
|
|
3160
3073
|
* @since 2.0.0
|
|
3161
3074
|
*/
|
|
3162
3075
|
export declare const map: {
|
|
@@ -3204,7 +3117,7 @@ export declare const map: {
|
|
|
3204
3117
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
3205
3118
|
* @see {@link flatMap} or {@link andThen} for a version that can return a new effect.
|
|
3206
3119
|
*
|
|
3207
|
-
* @category
|
|
3120
|
+
* @category mapping
|
|
3208
3121
|
* @since 2.0.0
|
|
3209
3122
|
*/
|
|
3210
3123
|
<A, B>(f: (a: A) => B): <E, R>(self: Effect<A, E, R>) => Effect<B, E, R>;
|
|
@@ -3252,7 +3165,7 @@ export declare const map: {
|
|
|
3252
3165
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
3253
3166
|
* @see {@link flatMap} or {@link andThen} for a version that can return a new effect.
|
|
3254
3167
|
*
|
|
3255
|
-
* @category
|
|
3168
|
+
* @category mapping
|
|
3256
3169
|
* @since 2.0.0
|
|
3257
3170
|
*/
|
|
3258
3171
|
<A, E, R, B>(self: Effect<A, E, R>, f: (a: A) => B): Effect<B, E, R>;
|
|
@@ -3275,7 +3188,7 @@ export declare const map: {
|
|
|
3275
3188
|
* // Output: "new value"
|
|
3276
3189
|
* ```
|
|
3277
3190
|
*
|
|
3278
|
-
* @category
|
|
3191
|
+
* @category mapping
|
|
3279
3192
|
* @since 2.0.0
|
|
3280
3193
|
*/
|
|
3281
3194
|
export declare const as: {
|
|
@@ -3297,7 +3210,7 @@ export declare const as: {
|
|
|
3297
3210
|
* // Output: "new value"
|
|
3298
3211
|
* ```
|
|
3299
3212
|
*
|
|
3300
|
-
* @category
|
|
3213
|
+
* @category mapping
|
|
3301
3214
|
* @since 2.0.0
|
|
3302
3215
|
*/
|
|
3303
3216
|
<B>(value: B): <A, E, R>(self: Effect<A, E, R>) => Effect<B, E, R>;
|
|
@@ -3319,7 +3232,7 @@ export declare const as: {
|
|
|
3319
3232
|
* // Output: "new value"
|
|
3320
3233
|
* ```
|
|
3321
3234
|
*
|
|
3322
|
-
* @category
|
|
3235
|
+
* @category mapping
|
|
3323
3236
|
* @since 2.0.0
|
|
3324
3237
|
*/
|
|
3325
3238
|
<A, E, R, B>(self: Effect<A, E, R>, value: B): Effect<B, E, R>;
|
|
@@ -3340,7 +3253,7 @@ export declare const as: {
|
|
|
3340
3253
|
* // { _id: 'Option', _tag: 'Some', value: 42 }
|
|
3341
3254
|
* ```
|
|
3342
3255
|
*
|
|
3343
|
-
* @category
|
|
3256
|
+
* @category mapping
|
|
3344
3257
|
* @since 2.0.0
|
|
3345
3258
|
*/
|
|
3346
3259
|
export declare const asSome: <A, E, R>(self: Effect<A, E, R>) => Effect<Option<A>, E, R>;
|
|
@@ -3361,7 +3274,7 @@ export declare const asSome: <A, E, R>(self: Effect<A, E, R>) => Effect<Option<A
|
|
|
3361
3274
|
* // undefined (void)
|
|
3362
3275
|
* ```
|
|
3363
3276
|
*
|
|
3364
|
-
* @category
|
|
3277
|
+
* @category mapping
|
|
3365
3278
|
* @since 2.0.0
|
|
3366
3279
|
*/
|
|
3367
3280
|
export declare const asVoid: <A, E, R>(self: Effect<A, E, R>) => Effect<void, E, R>;
|
|
@@ -3388,7 +3301,7 @@ export declare const asVoid: <A, E, R>(self: Effect<A, E, R>) => Effect<void, E,
|
|
|
3388
3301
|
* const flipped = Effect.flip(program)
|
|
3389
3302
|
* ```
|
|
3390
3303
|
*
|
|
3391
|
-
* @category
|
|
3304
|
+
* @category mapping
|
|
3392
3305
|
* @since 2.0.0
|
|
3393
3306
|
*/
|
|
3394
3307
|
export declare const flip: <A, E, R>(self: Effect<A, E, R>) => Effect<E, A, R>;
|
|
@@ -3457,7 +3370,7 @@ export declare const flip: <A, E, R>(self: Effect<A, E, R>) => Effect<E, A, R>;
|
|
|
3457
3370
|
* // [ 1, 'hello' ]
|
|
3458
3371
|
* ```
|
|
3459
3372
|
*
|
|
3460
|
-
* @category
|
|
3373
|
+
* @category zipping
|
|
3461
3374
|
* @since 2.0.0
|
|
3462
3375
|
*/
|
|
3463
3376
|
export declare const zip: {
|
|
@@ -3526,7 +3439,7 @@ export declare const zip: {
|
|
|
3526
3439
|
* // [ 1, 'hello' ]
|
|
3527
3440
|
* ```
|
|
3528
3441
|
*
|
|
3529
|
-
* @category
|
|
3442
|
+
* @category zipping
|
|
3530
3443
|
* @since 2.0.0
|
|
3531
3444
|
*/
|
|
3532
3445
|
<A2, E2, R2>(that: Effect<A2, E2, R2>, options?: {
|
|
@@ -3597,7 +3510,7 @@ export declare const zip: {
|
|
|
3597
3510
|
* // [ 1, 'hello' ]
|
|
3598
3511
|
* ```
|
|
3599
3512
|
*
|
|
3600
|
-
* @category
|
|
3513
|
+
* @category zipping
|
|
3601
3514
|
* @since 2.0.0
|
|
3602
3515
|
*/
|
|
3603
3516
|
<A, E, R, A2, E2, R2>(self: Effect<A, E, R>, that: Effect<A2, E2, R2>, options?: {
|
|
@@ -3647,7 +3560,7 @@ export declare const zip: {
|
|
|
3647
3560
|
* // 6
|
|
3648
3561
|
* ```
|
|
3649
3562
|
*
|
|
3650
|
-
* @category
|
|
3563
|
+
* @category zipping
|
|
3651
3564
|
* @since 2.0.0
|
|
3652
3565
|
*/
|
|
3653
3566
|
export declare const zipWith: {
|
|
@@ -3694,7 +3607,7 @@ export declare const zipWith: {
|
|
|
3694
3607
|
* // 6
|
|
3695
3608
|
* ```
|
|
3696
3609
|
*
|
|
3697
|
-
* @category
|
|
3610
|
+
* @category zipping
|
|
3698
3611
|
* @since 2.0.0
|
|
3699
3612
|
*/
|
|
3700
3613
|
<A2, E2, R2, A, B>(that: Effect<A2, E2, R2>, f: (a: A, b: A2) => B, options?: {
|
|
@@ -3743,7 +3656,7 @@ export declare const zipWith: {
|
|
|
3743
3656
|
* // 6
|
|
3744
3657
|
* ```
|
|
3745
3658
|
*
|
|
3746
|
-
* @category
|
|
3659
|
+
* @category zipping
|
|
3747
3660
|
* @since 2.0.0
|
|
3748
3661
|
*/
|
|
3749
3662
|
<A, E, R, A2, E2, R2, B>(self: Effect<A, E, R>, that: Effect<A2, E2, R2>, f: (a: A, b: A2) => B, options?: {
|
|
@@ -3770,13 +3683,7 @@ export {
|
|
|
3770
3683
|
*
|
|
3771
3684
|
* @see {@link catchCause} for a version that can recover from both recoverable and unrecoverable errors.
|
|
3772
3685
|
*
|
|
3773
|
-
*
|
|
3774
|
-
*
|
|
3775
|
-
* This API replaces the following from Effect 3.x:
|
|
3776
|
-
*
|
|
3777
|
-
* - `Effect.catchAll`
|
|
3778
|
-
*
|
|
3779
|
-
* @category Error Handling
|
|
3686
|
+
* @category error handling
|
|
3780
3687
|
* @since 4.0.0
|
|
3781
3688
|
*/
|
|
3782
3689
|
catch_ as catch };
|
|
@@ -3818,7 +3725,7 @@ catch_ as catch };
|
|
|
3818
3725
|
* )
|
|
3819
3726
|
* ```
|
|
3820
3727
|
*
|
|
3821
|
-
* @category
|
|
3728
|
+
* @category error handling
|
|
3822
3729
|
* @since 2.0.0
|
|
3823
3730
|
*/
|
|
3824
3731
|
export declare const catchTag: {
|
|
@@ -3860,7 +3767,7 @@ export declare const catchTag: {
|
|
|
3860
3767
|
* )
|
|
3861
3768
|
* ```
|
|
3862
3769
|
*
|
|
3863
|
-
* @category
|
|
3770
|
+
* @category error handling
|
|
3864
3771
|
* @since 2.0.0
|
|
3865
3772
|
*/
|
|
3866
3773
|
<const K extends Tags<E> | Arr.NonEmptyReadonlyArray<Tags<E>>, E, A1, E1, R1, A2 = never, E2 = ExcludeTag<E, K extends readonly [string, ...string[]] ? K[number] : K>, R2 = never>(k: K, f: (e: ExtractTag<NoInfer<E>, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Effect<A1, E1, R1>, orElse?: ((e: ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Effect<A2, E2, R2>) | undefined): <A, R>(self: Effect<A, E, R>) => Effect<A | A1 | A2, E1 | E2, R | R1 | R2>;
|
|
@@ -3902,7 +3809,7 @@ export declare const catchTag: {
|
|
|
3902
3809
|
* )
|
|
3903
3810
|
* ```
|
|
3904
3811
|
*
|
|
3905
|
-
* @category
|
|
3812
|
+
* @category error handling
|
|
3906
3813
|
* @since 2.0.0
|
|
3907
3814
|
*/
|
|
3908
3815
|
<A, E, R, const K extends Tags<E> | Arr.NonEmptyReadonlyArray<Tags<E>>, R1, E1, A1, A2 = never, E2 = ExcludeTag<E, K extends readonly [string, ...string[]] ? K[number] : K>, R2 = never>(self: Effect<A, E, R>, k: K, f: (e: ExtractTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Effect<A1, E1, R1>, orElse?: ((e: ExcludeTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Effect<A2, E2, R2>) | undefined): Effect<A | A1 | A2, E1 | E2, R | R1 | R2>;
|
|
@@ -3947,7 +3854,7 @@ export declare const catchTag: {
|
|
|
3947
3854
|
* })
|
|
3948
3855
|
* ```
|
|
3949
3856
|
*
|
|
3950
|
-
* @category
|
|
3857
|
+
* @category error handling
|
|
3951
3858
|
* @since 2.0.0
|
|
3952
3859
|
*/
|
|
3953
3860
|
export declare const catchTags: {
|
|
@@ -3991,7 +3898,7 @@ export declare const catchTags: {
|
|
|
3991
3898
|
* })
|
|
3992
3899
|
* ```
|
|
3993
3900
|
*
|
|
3994
|
-
* @category
|
|
3901
|
+
* @category error handling
|
|
3995
3902
|
* @since 2.0.0
|
|
3996
3903
|
*/
|
|
3997
3904
|
<E, Cases extends {
|
|
@@ -4055,7 +3962,7 @@ export declare const catchTags: {
|
|
|
4055
3962
|
* })
|
|
4056
3963
|
* ```
|
|
4057
3964
|
*
|
|
4058
|
-
* @category
|
|
3965
|
+
* @category error handling
|
|
4059
3966
|
* @since 2.0.0
|
|
4060
3967
|
*/
|
|
4061
3968
|
<R, E, A, Cases extends {
|
|
@@ -4113,7 +4020,7 @@ export declare const catchTags: {
|
|
|
4113
4020
|
* )
|
|
4114
4021
|
* ```
|
|
4115
4022
|
*
|
|
4116
|
-
* @category
|
|
4023
|
+
* @category error handling
|
|
4117
4024
|
* @since 4.0.0
|
|
4118
4025
|
*/
|
|
4119
4026
|
export declare const catchReason: {
|
|
@@ -4150,7 +4057,7 @@ export declare const catchReason: {
|
|
|
4150
4057
|
* )
|
|
4151
4058
|
* ```
|
|
4152
4059
|
*
|
|
4153
|
-
* @category
|
|
4060
|
+
* @category error handling
|
|
4154
4061
|
* @since 4.0.0
|
|
4155
4062
|
*/
|
|
4156
4063
|
<K extends Tags<E>, E, RK extends ReasonTags<ExtractTag<NoInfer<E>, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<NoInfer<E>, K>, RK>, error: NarrowReason<ExtractTag<NoInfer<E>, K>, RK>) => Effect<A2, E2, R2>, orElse?: ((reasons: ExcludeReason<ExtractTag<NoInfer<E>, K>, RK>, error: OmitReason<ExtractTag<NoInfer<E>, K>, RK>) => Effect<A3, E3, R3>) | undefined): <A, R>(self: Effect<A, E, R>) => Effect<A | A2 | Exclude<A3, unassigned>, (A3 extends unassigned ? E : ExcludeTag<E, K>) | E2 | E3, R | R2 | R3>;
|
|
@@ -4187,7 +4094,7 @@ export declare const catchReason: {
|
|
|
4187
4094
|
* )
|
|
4188
4095
|
* ```
|
|
4189
4096
|
*
|
|
4190
|
-
* @category
|
|
4097
|
+
* @category error handling
|
|
4191
4098
|
* @since 4.0.0
|
|
4192
4099
|
*/
|
|
4193
4100
|
<A, E, R, K extends Tags<E>, RK extends ReasonTags<ExtractTag<E, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(self: Effect<A, E, R>, errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<E, K>, RK>, error: NarrowReason<ExtractTag<E, K>, RK>) => Effect<A2, E2, R2>, orElse?: ((reasons: ExcludeReason<ExtractTag<E, K>, RK>, error: OmitReason<ExtractTag<E, K>, RK>) => Effect<A3, E3, R3>) | undefined): Effect<A | A2 | Exclude<A3, unassigned>, (A3 extends unassigned ? E : ExcludeTag<E, K>) | E2 | E3, R | R2 | R3>;
|
|
@@ -4224,7 +4131,7 @@ export declare const catchReason: {
|
|
|
4224
4131
|
* )
|
|
4225
4132
|
* ```
|
|
4226
4133
|
*
|
|
4227
|
-
* @category
|
|
4134
|
+
* @category error handling
|
|
4228
4135
|
* @since 4.0.0
|
|
4229
4136
|
*/
|
|
4230
4137
|
export declare const catchReasons: {
|
|
@@ -4260,7 +4167,7 @@ export declare const catchReasons: {
|
|
|
4260
4167
|
* )
|
|
4261
4168
|
* ```
|
|
4262
4169
|
*
|
|
4263
|
-
* @category
|
|
4170
|
+
* @category error handling
|
|
4264
4171
|
* @since 4.0.0
|
|
4265
4172
|
*/
|
|
4266
4173
|
<K extends Tags<E>, E, Cases extends {
|
|
@@ -4304,7 +4211,7 @@ export declare const catchReasons: {
|
|
|
4304
4211
|
* )
|
|
4305
4212
|
* ```
|
|
4306
4213
|
*
|
|
4307
|
-
* @category
|
|
4214
|
+
* @category error handling
|
|
4308
4215
|
* @since 4.0.0
|
|
4309
4216
|
*/
|
|
4310
4217
|
<A, E, R, K extends Tags<E>, Cases extends {
|
|
@@ -4322,7 +4229,7 @@ export declare const catchReasons: {
|
|
|
4322
4229
|
*
|
|
4323
4230
|
* Used by `catchReasons` and `unwrapReason` to constrain the parent error tag to reason-bearing errors.
|
|
4324
4231
|
*
|
|
4325
|
-
* @category
|
|
4232
|
+
* @category error handling
|
|
4326
4233
|
* @since 4.0.0
|
|
4327
4234
|
*/
|
|
4328
4235
|
export type TagsWithReason<E> = {
|
|
@@ -4356,7 +4263,7 @@ export type TagsWithReason<E> = {
|
|
|
4356
4263
|
* const unwrapped = program.pipe(Effect.unwrapReason("AiError"))
|
|
4357
4264
|
* ```
|
|
4358
4265
|
*
|
|
4359
|
-
* @category
|
|
4266
|
+
* @category error handling
|
|
4360
4267
|
* @since 4.0.0
|
|
4361
4268
|
*/
|
|
4362
4269
|
export declare const unwrapReason: {
|
|
@@ -4388,7 +4295,7 @@ export declare const unwrapReason: {
|
|
|
4388
4295
|
* const unwrapped = program.pipe(Effect.unwrapReason("AiError"))
|
|
4389
4296
|
* ```
|
|
4390
4297
|
*
|
|
4391
|
-
* @category
|
|
4298
|
+
* @category error handling
|
|
4392
4299
|
* @since 4.0.0
|
|
4393
4300
|
*/
|
|
4394
4301
|
<K extends TagsWithReason<E>, E>(errorTag: K): <A, R>(self: Effect<A, E, R>) => Effect<A, ExcludeTag<E, K> | ReasonOf<ExtractTag<E, K>>, R>;
|
|
@@ -4420,7 +4327,7 @@ export declare const unwrapReason: {
|
|
|
4420
4327
|
* const unwrapped = program.pipe(Effect.unwrapReason("AiError"))
|
|
4421
4328
|
* ```
|
|
4422
4329
|
*
|
|
4423
|
-
* @category
|
|
4330
|
+
* @category error handling
|
|
4424
4331
|
* @since 4.0.0
|
|
4425
4332
|
*/
|
|
4426
4333
|
<A, E, R, K extends TagsWithReason<E>>(self: Effect<A, E, R>, errorTag: K): Effect<A, ExcludeTag<E, K> | ReasonOf<ExtractTag<E, K>>, R>;
|
|
@@ -4442,12 +4349,6 @@ export declare const unwrapReason: {
|
|
|
4442
4349
|
* they often indicate serious issues. However, in some cases, such as
|
|
4443
4350
|
* dynamically loaded plugins, controlled recovery might be needed.
|
|
4444
4351
|
*
|
|
4445
|
-
* **Previously Known As**
|
|
4446
|
-
*
|
|
4447
|
-
* This API replaces the following from Effect 3.x:
|
|
4448
|
-
*
|
|
4449
|
-
* - `Effect.catchAllCause`
|
|
4450
|
-
*
|
|
4451
4352
|
* **Example** (Usage)
|
|
4452
4353
|
*
|
|
4453
4354
|
* ```ts
|
|
@@ -4467,7 +4368,7 @@ export declare const unwrapReason: {
|
|
|
4467
4368
|
* })
|
|
4468
4369
|
* ```
|
|
4469
4370
|
*
|
|
4470
|
-
* @category
|
|
4371
|
+
* @category error handling
|
|
4471
4372
|
* @since 4.0.0
|
|
4472
4373
|
*/
|
|
4473
4374
|
export declare const catchCause: {
|
|
@@ -4488,12 +4389,6 @@ export declare const catchCause: {
|
|
|
4488
4389
|
* they often indicate serious issues. However, in some cases, such as
|
|
4489
4390
|
* dynamically loaded plugins, controlled recovery might be needed.
|
|
4490
4391
|
*
|
|
4491
|
-
* **Previously Known As**
|
|
4492
|
-
*
|
|
4493
|
-
* This API replaces the following from Effect 3.x:
|
|
4494
|
-
*
|
|
4495
|
-
* - `Effect.catchAllCause`
|
|
4496
|
-
*
|
|
4497
4392
|
* **Example** (Usage)
|
|
4498
4393
|
*
|
|
4499
4394
|
* ```ts
|
|
@@ -4513,7 +4408,7 @@ export declare const catchCause: {
|
|
|
4513
4408
|
* })
|
|
4514
4409
|
* ```
|
|
4515
4410
|
*
|
|
4516
|
-
* @category
|
|
4411
|
+
* @category error handling
|
|
4517
4412
|
* @since 4.0.0
|
|
4518
4413
|
*/
|
|
4519
4414
|
<E, A2, E2, R2>(f: (cause: Cause.Cause<E>) => Effect<A2, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2, R2 | R>;
|
|
@@ -4534,12 +4429,6 @@ export declare const catchCause: {
|
|
|
4534
4429
|
* they often indicate serious issues. However, in some cases, such as
|
|
4535
4430
|
* dynamically loaded plugins, controlled recovery might be needed.
|
|
4536
4431
|
*
|
|
4537
|
-
* **Previously Known As**
|
|
4538
|
-
*
|
|
4539
|
-
* This API replaces the following from Effect 3.x:
|
|
4540
|
-
*
|
|
4541
|
-
* - `Effect.catchAllCause`
|
|
4542
|
-
*
|
|
4543
4432
|
* **Example** (Usage)
|
|
4544
4433
|
*
|
|
4545
4434
|
* ```ts
|
|
@@ -4559,7 +4448,7 @@ export declare const catchCause: {
|
|
|
4559
4448
|
* })
|
|
4560
4449
|
* ```
|
|
4561
4450
|
*
|
|
4562
|
-
* @category
|
|
4451
|
+
* @category error handling
|
|
4563
4452
|
* @since 4.0.0
|
|
4564
4453
|
*/
|
|
4565
4454
|
<A, E, R, A2, E2, R2>(self: Effect<A, E, R>, f: (cause: Cause.Cause<E>) => Effect<A2, E2, R2>): Effect<A | A2, E2, R | R2>;
|
|
@@ -4583,12 +4472,6 @@ export declare const catchCause: {
|
|
|
4583
4472
|
* they often indicate serious issues. In some cases, such as dynamically loaded
|
|
4584
4473
|
* plugins, controlled recovery may be needed.
|
|
4585
4474
|
*
|
|
4586
|
-
* **Previously Known As**
|
|
4587
|
-
*
|
|
4588
|
-
* This API replaces the following from Effect 3.x:
|
|
4589
|
-
*
|
|
4590
|
-
* - `Effect.catchAllDefect`
|
|
4591
|
-
*
|
|
4592
4475
|
* **Example** (Usage)
|
|
4593
4476
|
*
|
|
4594
4477
|
* ```ts
|
|
@@ -4607,7 +4490,7 @@ export declare const catchCause: {
|
|
|
4607
4490
|
* })
|
|
4608
4491
|
* ```
|
|
4609
4492
|
*
|
|
4610
|
-
* @category
|
|
4493
|
+
* @category error handling
|
|
4611
4494
|
* @since 4.0.0
|
|
4612
4495
|
*/
|
|
4613
4496
|
export declare const catchDefect: {
|
|
@@ -4630,12 +4513,6 @@ export declare const catchDefect: {
|
|
|
4630
4513
|
* they often indicate serious issues. In some cases, such as dynamically loaded
|
|
4631
4514
|
* plugins, controlled recovery may be needed.
|
|
4632
4515
|
*
|
|
4633
|
-
* **Previously Known As**
|
|
4634
|
-
*
|
|
4635
|
-
* This API replaces the following from Effect 3.x:
|
|
4636
|
-
*
|
|
4637
|
-
* - `Effect.catchAllDefect`
|
|
4638
|
-
*
|
|
4639
4516
|
* **Example** (Usage)
|
|
4640
4517
|
*
|
|
4641
4518
|
* ```ts
|
|
@@ -4654,7 +4531,7 @@ export declare const catchDefect: {
|
|
|
4654
4531
|
* })
|
|
4655
4532
|
* ```
|
|
4656
4533
|
*
|
|
4657
|
-
* @category
|
|
4534
|
+
* @category error handling
|
|
4658
4535
|
* @since 4.0.0
|
|
4659
4536
|
*/
|
|
4660
4537
|
<A2, E2, R2>(f: (defect: unknown) => Effect<A2, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2 | E, R2 | R>;
|
|
@@ -4677,12 +4554,6 @@ export declare const catchDefect: {
|
|
|
4677
4554
|
* they often indicate serious issues. In some cases, such as dynamically loaded
|
|
4678
4555
|
* plugins, controlled recovery may be needed.
|
|
4679
4556
|
*
|
|
4680
|
-
* **Previously Known As**
|
|
4681
|
-
*
|
|
4682
|
-
* This API replaces the following from Effect 3.x:
|
|
4683
|
-
*
|
|
4684
|
-
* - `Effect.catchAllDefect`
|
|
4685
|
-
*
|
|
4686
4557
|
* **Example** (Usage)
|
|
4687
4558
|
*
|
|
4688
4559
|
* ```ts
|
|
@@ -4701,7 +4572,7 @@ export declare const catchDefect: {
|
|
|
4701
4572
|
* })
|
|
4702
4573
|
* ```
|
|
4703
4574
|
*
|
|
4704
|
-
* @category
|
|
4575
|
+
* @category error handling
|
|
4705
4576
|
* @since 4.0.0
|
|
4706
4577
|
*/
|
|
4707
4578
|
<A, E, R, A2, E2, R2>(self: Effect<A, E, R>, f: (defect: unknown) => Effect<A2, E2, R2>): Effect<A | A2, E | E2, R | R2>;
|
|
@@ -4716,13 +4587,6 @@ export declare const catchDefect: {
|
|
|
4716
4587
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
4717
4588
|
* interrupts are not caught.
|
|
4718
4589
|
*
|
|
4719
|
-
* **Previously Known As**
|
|
4720
|
-
*
|
|
4721
|
-
* This API replaces the following:
|
|
4722
|
-
*
|
|
4723
|
-
* - `Effect.catchSome` (Effect 3.x)
|
|
4724
|
-
* - `Effect.catchIf`
|
|
4725
|
-
*
|
|
4726
4590
|
* **Example** (Usage)
|
|
4727
4591
|
*
|
|
4728
4592
|
* ```ts
|
|
@@ -4749,7 +4613,7 @@ export declare const catchDefect: {
|
|
|
4749
4613
|
* )
|
|
4750
4614
|
* ```
|
|
4751
4615
|
*
|
|
4752
|
-
* @category
|
|
4616
|
+
* @category error handling
|
|
4753
4617
|
* @since 2.0.0
|
|
4754
4618
|
*/
|
|
4755
4619
|
export declare const catchIf: {
|
|
@@ -4763,13 +4627,6 @@ export declare const catchIf: {
|
|
|
4763
4627
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
4764
4628
|
* interrupts are not caught.
|
|
4765
4629
|
*
|
|
4766
|
-
* **Previously Known As**
|
|
4767
|
-
*
|
|
4768
|
-
* This API replaces the following:
|
|
4769
|
-
*
|
|
4770
|
-
* - `Effect.catchSome` (Effect 3.x)
|
|
4771
|
-
* - `Effect.catchIf`
|
|
4772
|
-
*
|
|
4773
4630
|
* **Example** (Usage)
|
|
4774
4631
|
*
|
|
4775
4632
|
* ```ts
|
|
@@ -4796,7 +4653,7 @@ export declare const catchIf: {
|
|
|
4796
4653
|
* )
|
|
4797
4654
|
* ```
|
|
4798
4655
|
*
|
|
4799
|
-
* @category
|
|
4656
|
+
* @category error handling
|
|
4800
4657
|
* @since 2.0.0
|
|
4801
4658
|
*/
|
|
4802
4659
|
<E, EB extends E, A2, E2, R2, A3 = never, E3 = Exclude<E, EB>, R3 = never>(refinement: Predicate.Refinement<NoInfer<E>, EB>, f: (e: EB) => Effect<A2, E2, R2>, orElse?: ((e: Exclude<E, EB>) => Effect<A3, E3, R3>) | undefined): <A, R>(self: Effect<A, E, R>) => Effect<A | A2 | A3, E2 | E3, R | R2 | R3>;
|
|
@@ -4810,13 +4667,6 @@ export declare const catchIf: {
|
|
|
4810
4667
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
4811
4668
|
* interrupts are not caught.
|
|
4812
4669
|
*
|
|
4813
|
-
* **Previously Known As**
|
|
4814
|
-
*
|
|
4815
|
-
* This API replaces the following:
|
|
4816
|
-
*
|
|
4817
|
-
* - `Effect.catchSome` (Effect 3.x)
|
|
4818
|
-
* - `Effect.catchIf`
|
|
4819
|
-
*
|
|
4820
4670
|
* **Example** (Usage)
|
|
4821
4671
|
*
|
|
4822
4672
|
* ```ts
|
|
@@ -4843,7 +4693,7 @@ export declare const catchIf: {
|
|
|
4843
4693
|
* )
|
|
4844
4694
|
* ```
|
|
4845
4695
|
*
|
|
4846
|
-
* @category
|
|
4696
|
+
* @category error handling
|
|
4847
4697
|
* @since 2.0.0
|
|
4848
4698
|
*/
|
|
4849
4699
|
<E, A2, E2, R2, A3 = never, E3 = E, R3 = never>(predicate: Predicate.Predicate<NoInfer<E>>, f: (e: NoInfer<E>) => Effect<A2, E2, R2>, orElse?: ((e: NoInfer<E>) => Effect<A3, E3, R3>) | undefined): <A, R>(self: Effect<A, E, R>) => Effect<A | A2 | A3, E2 | E3, R | R2 | R3>;
|
|
@@ -4857,13 +4707,6 @@ export declare const catchIf: {
|
|
|
4857
4707
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
4858
4708
|
* interrupts are not caught.
|
|
4859
4709
|
*
|
|
4860
|
-
* **Previously Known As**
|
|
4861
|
-
*
|
|
4862
|
-
* This API replaces the following:
|
|
4863
|
-
*
|
|
4864
|
-
* - `Effect.catchSome` (Effect 3.x)
|
|
4865
|
-
* - `Effect.catchIf`
|
|
4866
|
-
*
|
|
4867
4710
|
* **Example** (Usage)
|
|
4868
4711
|
*
|
|
4869
4712
|
* ```ts
|
|
@@ -4890,7 +4733,7 @@ export declare const catchIf: {
|
|
|
4890
4733
|
* )
|
|
4891
4734
|
* ```
|
|
4892
4735
|
*
|
|
4893
|
-
* @category
|
|
4736
|
+
* @category error handling
|
|
4894
4737
|
* @since 2.0.0
|
|
4895
4738
|
*/
|
|
4896
4739
|
<A, E, R, EB extends E, A2, E2, R2, A3 = never, E3 = Exclude<E, EB>, R3 = never>(self: Effect<A, E, R>, refinement: Predicate.Refinement<E, EB>, f: (e: EB) => Effect<A2, E2, R2>, orElse?: ((e: Exclude<E, EB>) => Effect<A3, E3, R3>) | undefined): Effect<A | A2 | A3, E2 | E3, R | R2 | R3>;
|
|
@@ -4904,13 +4747,6 @@ export declare const catchIf: {
|
|
|
4904
4747
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
4905
4748
|
* interrupts are not caught.
|
|
4906
4749
|
*
|
|
4907
|
-
* **Previously Known As**
|
|
4908
|
-
*
|
|
4909
|
-
* This API replaces the following:
|
|
4910
|
-
*
|
|
4911
|
-
* - `Effect.catchSome` (Effect 3.x)
|
|
4912
|
-
* - `Effect.catchIf`
|
|
4913
|
-
*
|
|
4914
4750
|
* **Example** (Usage)
|
|
4915
4751
|
*
|
|
4916
4752
|
* ```ts
|
|
@@ -4937,7 +4773,7 @@ export declare const catchIf: {
|
|
|
4937
4773
|
* )
|
|
4938
4774
|
* ```
|
|
4939
4775
|
*
|
|
4940
|
-
* @category
|
|
4776
|
+
* @category error handling
|
|
4941
4777
|
* @since 2.0.0
|
|
4942
4778
|
*/
|
|
4943
4779
|
<A, E, R, A2, E2, R2, A3 = never, E3 = E, R3 = never>(self: Effect<A, E, R>, predicate: Predicate.Predicate<E>, f: (e: E) => Effect<A2, E2, R2>, orElse?: ((e: E) => Effect<A3, E3, R3>) | undefined): Effect<A | A2 | A3, E2 | E3, R | R2 | R3>;
|
|
@@ -4945,21 +4781,21 @@ export declare const catchIf: {
|
|
|
4945
4781
|
/**
|
|
4946
4782
|
* Recovers from specific errors using a `Filter`.
|
|
4947
4783
|
*
|
|
4948
|
-
* @category
|
|
4784
|
+
* @category error handling
|
|
4949
4785
|
* @since 4.0.0
|
|
4950
4786
|
*/
|
|
4951
4787
|
export declare const catchFilter: {
|
|
4952
4788
|
/**
|
|
4953
4789
|
* Recovers from specific errors using a `Filter`.
|
|
4954
4790
|
*
|
|
4955
|
-
* @category
|
|
4791
|
+
* @category error handling
|
|
4956
4792
|
* @since 4.0.0
|
|
4957
4793
|
*/
|
|
4958
4794
|
<E, EB, A2, E2, R2, X, A3 = never, E3 = X, R3 = never>(filter: Filter.Filter<NoInfer<E>, EB, X>, f: (e: EB) => Effect<A2, E2, R2>, orElse?: ((e: X) => Effect<A3, E3, R3>) | undefined): <A, R>(self: Effect<A, E, R>) => Effect<A | A2 | A3, E2 | E3, R | R2 | R3>;
|
|
4959
4795
|
/**
|
|
4960
4796
|
* Recovers from specific errors using a `Filter`.
|
|
4961
4797
|
*
|
|
4962
|
-
* @category
|
|
4798
|
+
* @category error handling
|
|
4963
4799
|
* @since 4.0.0
|
|
4964
4800
|
*/
|
|
4965
4801
|
<A, E, R, EB, A2, E2, R2, X, A3 = never, E3 = X, R3 = never>(self: Effect<A, E, R>, filter: Filter.Filter<NoInfer<E>, EB, X>, f: (e: EB) => Effect<A2, E2, R2>, orElse?: ((e: X) => Effect<A3, E3, R3>) | undefined): Effect<A | A2 | A3, E2 | E3, R | R2 | R3>;
|
|
@@ -4982,14 +4818,8 @@ export declare const catchFilter: {
|
|
|
4982
4818
|
* Effect.runPromise(none).then(console.log) // { _id: 'Option', _tag: 'None' }
|
|
4983
4819
|
* ```
|
|
4984
4820
|
*
|
|
4985
|
-
*
|
|
4986
|
-
*
|
|
4987
|
-
* This API replaces the following from Effect 3.x:
|
|
4988
|
-
*
|
|
4989
|
-
* - `Effect.optionFromOptional`
|
|
4990
|
-
*
|
|
4991
|
-
* @category Error Handling
|
|
4992
|
-
* @since 2.0.0
|
|
4821
|
+
* @category error handling
|
|
4822
|
+
* @since 4.0.0
|
|
4993
4823
|
*/
|
|
4994
4824
|
export declare const catchNoSuchElement: <A, E, R>(self: Effect<A, E, R>) => Effect<Option<A>, Exclude<E, Cause.NoSuchElementError>, R>;
|
|
4995
4825
|
/**
|
|
@@ -4999,12 +4829,6 @@ export declare const catchNoSuchElement: <A, E, R>(self: Effect<A, E, R>) => Eff
|
|
|
4999
4829
|
* that match a specific predicate. This is useful when you want to handle
|
|
5000
4830
|
* only certain types of errors while letting others propagate.
|
|
5001
4831
|
*
|
|
5002
|
-
* **Previously Known As**
|
|
5003
|
-
*
|
|
5004
|
-
* This API replaces the following from Effect 3.x:
|
|
5005
|
-
*
|
|
5006
|
-
* - `Effect.catchSomeCause`
|
|
5007
|
-
*
|
|
5008
4832
|
* **Example** (Usage)
|
|
5009
4833
|
*
|
|
5010
4834
|
* ```ts
|
|
@@ -5028,7 +4852,7 @@ export declare const catchNoSuchElement: <A, E, R>(self: Effect<A, E, R>) => Eff
|
|
|
5028
4852
|
* // Then: "Fallback response"
|
|
5029
4853
|
* ```
|
|
5030
4854
|
*
|
|
5031
|
-
* @category
|
|
4855
|
+
* @category error handling
|
|
5032
4856
|
* @since 4.0.0
|
|
5033
4857
|
*/
|
|
5034
4858
|
export declare const catchCauseIf: {
|
|
@@ -5039,12 +4863,6 @@ export declare const catchCauseIf: {
|
|
|
5039
4863
|
* that match a specific predicate. This is useful when you want to handle
|
|
5040
4864
|
* only certain types of errors while letting others propagate.
|
|
5041
4865
|
*
|
|
5042
|
-
* **Previously Known As**
|
|
5043
|
-
*
|
|
5044
|
-
* This API replaces the following from Effect 3.x:
|
|
5045
|
-
*
|
|
5046
|
-
* - `Effect.catchSomeCause`
|
|
5047
|
-
*
|
|
5048
4866
|
* **Example** (Usage)
|
|
5049
4867
|
*
|
|
5050
4868
|
* ```ts
|
|
@@ -5068,7 +4886,7 @@ export declare const catchCauseIf: {
|
|
|
5068
4886
|
* // Then: "Fallback response"
|
|
5069
4887
|
* ```
|
|
5070
4888
|
*
|
|
5071
|
-
* @category
|
|
4889
|
+
* @category error handling
|
|
5072
4890
|
* @since 4.0.0
|
|
5073
4891
|
*/
|
|
5074
4892
|
<E, B, E2, R2>(predicate: Predicate.Predicate<Cause.Cause<E>>, f: (cause: Cause.Cause<E>) => Effect<B, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A | B, E | E2, R | R2>;
|
|
@@ -5079,12 +4897,6 @@ export declare const catchCauseIf: {
|
|
|
5079
4897
|
* that match a specific predicate. This is useful when you want to handle
|
|
5080
4898
|
* only certain types of errors while letting others propagate.
|
|
5081
4899
|
*
|
|
5082
|
-
* **Previously Known As**
|
|
5083
|
-
*
|
|
5084
|
-
* This API replaces the following from Effect 3.x:
|
|
5085
|
-
*
|
|
5086
|
-
* - `Effect.catchSomeCause`
|
|
5087
|
-
*
|
|
5088
4900
|
* **Example** (Usage)
|
|
5089
4901
|
*
|
|
5090
4902
|
* ```ts
|
|
@@ -5108,7 +4920,7 @@ export declare const catchCauseIf: {
|
|
|
5108
4920
|
* // Then: "Fallback response"
|
|
5109
4921
|
* ```
|
|
5110
4922
|
*
|
|
5111
|
-
* @category
|
|
4923
|
+
* @category error handling
|
|
5112
4924
|
* @since 4.0.0
|
|
5113
4925
|
*/
|
|
5114
4926
|
<A, E, R, B, E2, R2>(self: Effect<A, E, R>, predicate: Predicate.Predicate<Cause.Cause<E>>, f: (cause: Cause.Cause<E>) => Effect<B, E2, R2>): Effect<A | B, E | E2, R | R2>;
|
|
@@ -5116,21 +4928,21 @@ export declare const catchCauseIf: {
|
|
|
5116
4928
|
/**
|
|
5117
4929
|
* Recovers from specific failures based on a `Filter`.
|
|
5118
4930
|
*
|
|
5119
|
-
* @category
|
|
4931
|
+
* @category error handling
|
|
5120
4932
|
* @since 4.0.0
|
|
5121
4933
|
*/
|
|
5122
4934
|
export declare const catchCauseFilter: {
|
|
5123
4935
|
/**
|
|
5124
4936
|
* Recovers from specific failures based on a `Filter`.
|
|
5125
4937
|
*
|
|
5126
|
-
* @category
|
|
4938
|
+
* @category error handling
|
|
5127
4939
|
* @since 4.0.0
|
|
5128
4940
|
*/
|
|
5129
4941
|
<E, B, E2, R2, EB, X extends Cause.Cause<any>>(filter: Filter.Filter<Cause.Cause<E>, EB, X>, f: (failure: EB, cause: Cause.Cause<E>) => Effect<B, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A | B, Cause.Cause.Error<X> | E2, R | R2>;
|
|
5130
4942
|
/**
|
|
5131
4943
|
* Recovers from specific failures based on a `Filter`.
|
|
5132
4944
|
*
|
|
5133
|
-
* @category
|
|
4945
|
+
* @category error handling
|
|
5134
4946
|
* @since 4.0.0
|
|
5135
4947
|
*/
|
|
5136
4948
|
<A, E, R, B, E2, R2, EB, X extends Cause.Cause<any>>(self: Effect<A, E, R>, filter: Filter.Filter<Cause.Cause<E>, EB, X>, f: (failure: EB, cause: Cause.Cause<E>) => Effect<B, E2, R2>): Effect<A | B, Cause.Cause.Error<X> | E2, R | R2>;
|
|
@@ -5146,7 +4958,7 @@ export declare const catchCauseFilter: {
|
|
|
5146
4958
|
*
|
|
5147
4959
|
* @see {@link map} for a version that operates on the success channel.
|
|
5148
4960
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
5149
|
-
* @see {@link
|
|
4961
|
+
* @see {@link mapError} if you want to replace the error with a new one.
|
|
5150
4962
|
*
|
|
5151
4963
|
* **Example** (Usage)
|
|
5152
4964
|
*
|
|
@@ -5167,7 +4979,7 @@ export declare const catchCauseFilter: {
|
|
|
5167
4979
|
* )
|
|
5168
4980
|
* ```
|
|
5169
4981
|
*
|
|
5170
|
-
* @category
|
|
4982
|
+
* @category error handling
|
|
5171
4983
|
* @since 2.0.0
|
|
5172
4984
|
*/
|
|
5173
4985
|
export declare const mapError: {
|
|
@@ -5182,7 +4994,7 @@ export declare const mapError: {
|
|
|
5182
4994
|
*
|
|
5183
4995
|
* @see {@link map} for a version that operates on the success channel.
|
|
5184
4996
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
5185
|
-
* @see {@link
|
|
4997
|
+
* @see {@link mapError} if you want to replace the error with a new one.
|
|
5186
4998
|
*
|
|
5187
4999
|
* **Example** (Usage)
|
|
5188
5000
|
*
|
|
@@ -5203,7 +5015,7 @@ export declare const mapError: {
|
|
|
5203
5015
|
* )
|
|
5204
5016
|
* ```
|
|
5205
5017
|
*
|
|
5206
|
-
* @category
|
|
5018
|
+
* @category error handling
|
|
5207
5019
|
* @since 2.0.0
|
|
5208
5020
|
*/
|
|
5209
5021
|
<E, E2>(f: (e: E) => E2): <A, R>(self: Effect<A, E, R>) => Effect<A, E2, R>;
|
|
@@ -5218,7 +5030,7 @@ export declare const mapError: {
|
|
|
5218
5030
|
*
|
|
5219
5031
|
* @see {@link map} for a version that operates on the success channel.
|
|
5220
5032
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
5221
|
-
* @see {@link
|
|
5033
|
+
* @see {@link mapError} if you want to replace the error with a new one.
|
|
5222
5034
|
*
|
|
5223
5035
|
* **Example** (Usage)
|
|
5224
5036
|
*
|
|
@@ -5239,7 +5051,7 @@ export declare const mapError: {
|
|
|
5239
5051
|
* )
|
|
5240
5052
|
* ```
|
|
5241
5053
|
*
|
|
5242
|
-
* @category
|
|
5054
|
+
* @category error handling
|
|
5243
5055
|
* @since 2.0.0
|
|
5244
5056
|
*/
|
|
5245
5057
|
<A, E, R, E2>(self: Effect<A, E, R>, f: (e: E) => E2): Effect<A, E2, R>;
|
|
@@ -5276,7 +5088,7 @@ export declare const mapError: {
|
|
|
5276
5088
|
* @see {@link map} for a version that operates on the success channel.
|
|
5277
5089
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
5278
5090
|
*
|
|
5279
|
-
* @category
|
|
5091
|
+
* @category mapping
|
|
5280
5092
|
* @since 2.0.0
|
|
5281
5093
|
*/
|
|
5282
5094
|
export declare const mapBoth: {
|
|
@@ -5312,7 +5124,7 @@ export declare const mapBoth: {
|
|
|
5312
5124
|
* @see {@link map} for a version that operates on the success channel.
|
|
5313
5125
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
5314
5126
|
*
|
|
5315
|
-
* @category
|
|
5127
|
+
* @category mapping
|
|
5316
5128
|
* @since 2.0.0
|
|
5317
5129
|
*/
|
|
5318
5130
|
<E, E2, A, A2>(options: {
|
|
@@ -5351,7 +5163,7 @@ export declare const mapBoth: {
|
|
|
5351
5163
|
* @see {@link map} for a version that operates on the success channel.
|
|
5352
5164
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
5353
5165
|
*
|
|
5354
|
-
* @category
|
|
5166
|
+
* @category mapping
|
|
5355
5167
|
* @since 2.0.0
|
|
5356
5168
|
*/
|
|
5357
5169
|
<A, E, R, E2, A2>(self: Effect<A, E, R>, options: {
|
|
@@ -5368,7 +5180,7 @@ export declare const mapBoth: {
|
|
|
5368
5180
|
* Use `orDie` when a typed failure represents an unrecoverable bug or invalid
|
|
5369
5181
|
* state and should not be handled as a recoverable error.
|
|
5370
5182
|
*
|
|
5371
|
-
* @see {@link
|
|
5183
|
+
* @see {@link mapError} to transform the error before converting it into a defect with {@link orDie}.
|
|
5372
5184
|
*
|
|
5373
5185
|
* **Example** (Propagating an Error as a Defect)
|
|
5374
5186
|
*
|
|
@@ -5425,7 +5237,7 @@ export declare const orDie: <A, E, R>(self: Effect<A, E, R>) => Effect<A, never,
|
|
|
5425
5237
|
* // expected error: NetworkError
|
|
5426
5238
|
* ```
|
|
5427
5239
|
*
|
|
5428
|
-
* @category
|
|
5240
|
+
* @category sequencing
|
|
5429
5241
|
* @since 2.0.0
|
|
5430
5242
|
*/
|
|
5431
5243
|
export declare const tapError: {
|
|
@@ -5458,7 +5270,7 @@ export declare const tapError: {
|
|
|
5458
5270
|
* // expected error: NetworkError
|
|
5459
5271
|
* ```
|
|
5460
5272
|
*
|
|
5461
|
-
* @category
|
|
5273
|
+
* @category sequencing
|
|
5462
5274
|
* @since 2.0.0
|
|
5463
5275
|
*/
|
|
5464
5276
|
<E, X, E2, R2>(f: (e: NoInfer<E>) => Effect<X, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R2 | R>;
|
|
@@ -5491,7 +5303,7 @@ export declare const tapError: {
|
|
|
5491
5303
|
* // expected error: NetworkError
|
|
5492
5304
|
* ```
|
|
5493
5305
|
*
|
|
5494
|
-
* @category
|
|
5306
|
+
* @category sequencing
|
|
5495
5307
|
* @since 2.0.0
|
|
5496
5308
|
*/
|
|
5497
5309
|
<A, E, R, X, E2, R2>(self: Effect<A, E, R>, f: (e: E) => Effect<X, E2, R2>): Effect<A, E | E2, R | R2>;
|
|
@@ -5528,7 +5340,7 @@ export declare const tapError: {
|
|
|
5528
5340
|
* // expected error: 504
|
|
5529
5341
|
* ```
|
|
5530
5342
|
*
|
|
5531
|
-
* @category
|
|
5343
|
+
* @category sequencing
|
|
5532
5344
|
* @since 2.0.0
|
|
5533
5345
|
*/
|
|
5534
5346
|
export declare const tapErrorTag: {
|
|
@@ -5564,7 +5376,7 @@ export declare const tapErrorTag: {
|
|
|
5564
5376
|
* // expected error: 504
|
|
5565
5377
|
* ```
|
|
5566
5378
|
*
|
|
5567
|
-
* @category
|
|
5379
|
+
* @category sequencing
|
|
5568
5380
|
* @since 2.0.0
|
|
5569
5381
|
*/
|
|
5570
5382
|
<const K extends Tags<E> | Arr.NonEmptyReadonlyArray<Tags<E>>, E, A1, E1, R1>(k: K, f: (e: ExtractTag<NoInfer<E>, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Effect<A1, E1, R1>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E1, R1 | R>;
|
|
@@ -5600,7 +5412,7 @@ export declare const tapErrorTag: {
|
|
|
5600
5412
|
* // expected error: 504
|
|
5601
5413
|
* ```
|
|
5602
5414
|
*
|
|
5603
|
-
* @category
|
|
5415
|
+
* @category sequencing
|
|
5604
5416
|
* @since 2.0.0
|
|
5605
5417
|
*/
|
|
5606
5418
|
<A, E, R, const K extends Tags<E> | Arr.NonEmptyReadonlyArray<Tags<E>>, R1, E1, A1>(self: Effect<A, E, R>, k: K, f: (e: ExtractTag<E, K extends Arr.NonEmptyReadonlyArray<string> ? K[number] : K>) => Effect<A1, E1, R1>): Effect<A, E | E1, R | R1>;
|
|
@@ -5615,12 +5427,6 @@ export declare const tapErrorTag: {
|
|
|
5615
5427
|
* the operation succeeds, the original cause is preserved. If the operation
|
|
5616
5428
|
* fails, its error is also represented in the returned effect.
|
|
5617
5429
|
*
|
|
5618
|
-
* **Previously Known As**
|
|
5619
|
-
*
|
|
5620
|
-
* This API replaces the following from Effect 3.x:
|
|
5621
|
-
*
|
|
5622
|
-
* - `Effect.tapErrorCause`
|
|
5623
|
-
*
|
|
5624
5430
|
* **Example** (Usage)
|
|
5625
5431
|
*
|
|
5626
5432
|
* ```ts
|
|
@@ -5638,8 +5444,8 @@ export declare const tapErrorTag: {
|
|
|
5638
5444
|
* // Then: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
5639
5445
|
* ```
|
|
5640
5446
|
*
|
|
5641
|
-
* @category
|
|
5642
|
-
* @since
|
|
5447
|
+
* @category sequencing
|
|
5448
|
+
* @since 4.0.0
|
|
5643
5449
|
*/
|
|
5644
5450
|
export declare const tapCause: {
|
|
5645
5451
|
/**
|
|
@@ -5652,12 +5458,6 @@ export declare const tapCause: {
|
|
|
5652
5458
|
* the operation succeeds, the original cause is preserved. If the operation
|
|
5653
5459
|
* fails, its error is also represented in the returned effect.
|
|
5654
5460
|
*
|
|
5655
|
-
* **Previously Known As**
|
|
5656
|
-
*
|
|
5657
|
-
* This API replaces the following from Effect 3.x:
|
|
5658
|
-
*
|
|
5659
|
-
* - `Effect.tapErrorCause`
|
|
5660
|
-
*
|
|
5661
5461
|
* **Example** (Usage)
|
|
5662
5462
|
*
|
|
5663
5463
|
* ```ts
|
|
@@ -5675,8 +5475,8 @@ export declare const tapCause: {
|
|
|
5675
5475
|
* // Then: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
5676
5476
|
* ```
|
|
5677
5477
|
*
|
|
5678
|
-
* @category
|
|
5679
|
-
* @since
|
|
5478
|
+
* @category sequencing
|
|
5479
|
+
* @since 4.0.0
|
|
5680
5480
|
*/
|
|
5681
5481
|
<E, X, E2, R2>(f: (cause: Cause.Cause<NoInfer<E>>) => Effect<X, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R2 | R>;
|
|
5682
5482
|
/**
|
|
@@ -5689,12 +5489,6 @@ export declare const tapCause: {
|
|
|
5689
5489
|
* the operation succeeds, the original cause is preserved. If the operation
|
|
5690
5490
|
* fails, its error is also represented in the returned effect.
|
|
5691
5491
|
*
|
|
5692
|
-
* **Previously Known As**
|
|
5693
|
-
*
|
|
5694
|
-
* This API replaces the following from Effect 3.x:
|
|
5695
|
-
*
|
|
5696
|
-
* - `Effect.tapErrorCause`
|
|
5697
|
-
*
|
|
5698
5492
|
* **Example** (Usage)
|
|
5699
5493
|
*
|
|
5700
5494
|
* ```ts
|
|
@@ -5712,8 +5506,8 @@ export declare const tapCause: {
|
|
|
5712
5506
|
* // Then: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
5713
5507
|
* ```
|
|
5714
5508
|
*
|
|
5715
|
-
* @category
|
|
5716
|
-
* @since
|
|
5509
|
+
* @category sequencing
|
|
5510
|
+
* @since 4.0.0
|
|
5717
5511
|
*/
|
|
5718
5512
|
<A, E, R, X, E2, R2>(self: Effect<A, E, R>, f: (cause: Cause.Cause<E>) => Effect<X, E2, R2>): Effect<A, E | E2, R | R2>;
|
|
5719
5513
|
};
|
|
@@ -5743,7 +5537,7 @@ export declare const tapCause: {
|
|
|
5743
5537
|
* // Then: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
5744
5538
|
* ```
|
|
5745
5539
|
*
|
|
5746
|
-
* @category
|
|
5540
|
+
* @category sequencing
|
|
5747
5541
|
* @since 4.0.0
|
|
5748
5542
|
*/
|
|
5749
5543
|
export declare const tapCauseIf: {
|
|
@@ -5773,7 +5567,7 @@ export declare const tapCauseIf: {
|
|
|
5773
5567
|
* // Then: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
5774
5568
|
* ```
|
|
5775
5569
|
*
|
|
5776
|
-
* @category
|
|
5570
|
+
* @category sequencing
|
|
5777
5571
|
* @since 4.0.0
|
|
5778
5572
|
*/
|
|
5779
5573
|
<E, B, E2, R2>(predicate: Predicate.Predicate<Cause.Cause<E>>, f: (cause: Cause.Cause<E>) => Effect<B, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R | R2>;
|
|
@@ -5803,7 +5597,7 @@ export declare const tapCauseIf: {
|
|
|
5803
5597
|
* // Then: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
5804
5598
|
* ```
|
|
5805
5599
|
*
|
|
5806
|
-
* @category
|
|
5600
|
+
* @category sequencing
|
|
5807
5601
|
* @since 4.0.0
|
|
5808
5602
|
*/
|
|
5809
5603
|
<A, E, R, B, E2, R2>(self: Effect<A, E, R>, predicate: Predicate.Predicate<Cause.Cause<E>>, f: (cause: Cause.Cause<E>) => Effect<B, E2, R2>): Effect<A, E | E2, R | R2>;
|
|
@@ -5811,21 +5605,21 @@ export declare const tapCauseIf: {
|
|
|
5811
5605
|
/**
|
|
5812
5606
|
* Conditionally executes a side effect based on the cause of a failed effect.
|
|
5813
5607
|
*
|
|
5814
|
-
* @category
|
|
5608
|
+
* @category sequencing
|
|
5815
5609
|
* @since 4.0.0
|
|
5816
5610
|
*/
|
|
5817
5611
|
export declare const tapCauseFilter: {
|
|
5818
5612
|
/**
|
|
5819
5613
|
* Conditionally executes a side effect based on the cause of a failed effect.
|
|
5820
5614
|
*
|
|
5821
|
-
* @category
|
|
5615
|
+
* @category sequencing
|
|
5822
5616
|
* @since 4.0.0
|
|
5823
5617
|
*/
|
|
5824
5618
|
<E, B, E2, R2, EB, X extends Cause.Cause<any>>(filter: Filter.Filter<Cause.Cause<E>, EB, X>, f: (a: EB, cause: Cause.Cause<E>) => Effect<B, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R | R2>;
|
|
5825
5619
|
/**
|
|
5826
5620
|
* Conditionally executes a side effect based on the cause of a failed effect.
|
|
5827
5621
|
*
|
|
5828
|
-
* @category
|
|
5622
|
+
* @category sequencing
|
|
5829
5623
|
* @since 4.0.0
|
|
5830
5624
|
*/
|
|
5831
5625
|
<A, E, R, B, E2, R2, EB, X extends Cause.Cause<any>>(self: Effect<A, E, R>, filter: Filter.Filter<Cause.Cause<E>, EB, X>, f: (a: EB, cause: Cause.Cause<E>) => Effect<B, E2, R2>): Effect<A, E | E2, R | R2>;
|
|
@@ -5874,7 +5668,7 @@ export declare const tapCauseFilter: {
|
|
|
5874
5668
|
* // ... stack trace ...
|
|
5875
5669
|
* ```
|
|
5876
5670
|
*
|
|
5877
|
-
* @category
|
|
5671
|
+
* @category sequencing
|
|
5878
5672
|
* @since 2.0.0
|
|
5879
5673
|
*/
|
|
5880
5674
|
export declare const tapDefect: {
|
|
@@ -5922,7 +5716,7 @@ export declare const tapDefect: {
|
|
|
5922
5716
|
* // ... stack trace ...
|
|
5923
5717
|
* ```
|
|
5924
5718
|
*
|
|
5925
|
-
* @category
|
|
5719
|
+
* @category sequencing
|
|
5926
5720
|
* @since 2.0.0
|
|
5927
5721
|
*/
|
|
5928
5722
|
<E, B, E2, R2>(f: (defect: unknown) => Effect<B, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R | R2>;
|
|
@@ -5970,7 +5764,7 @@ export declare const tapDefect: {
|
|
|
5970
5764
|
* // ... stack trace ...
|
|
5971
5765
|
* ```
|
|
5972
5766
|
*
|
|
5973
|
-
* @category
|
|
5767
|
+
* @category sequencing
|
|
5974
5768
|
* @since 2.0.0
|
|
5975
5769
|
*/
|
|
5976
5770
|
<A, E, R, B, E2, R2>(self: Effect<A, E, R>, f: (defect: unknown) => Effect<B, E2, R2>): Effect<A, E | E2, R | R2>;
|
|
@@ -6013,14 +5807,13 @@ export declare const eventually: <A, E, R>(self: Effect<A, E, R>) => Effect<A, n
|
|
|
6013
5807
|
/**
|
|
6014
5808
|
* Type helpers for retrying effects.
|
|
6015
5809
|
*
|
|
6016
|
-
* @category Error Handling
|
|
6017
5810
|
* @since 2.0.0
|
|
6018
5811
|
*/
|
|
6019
5812
|
export declare namespace Retry {
|
|
6020
5813
|
/**
|
|
6021
5814
|
* Computes the result type of `Effect.retry` from the original effect and retry options.
|
|
6022
5815
|
*
|
|
6023
|
-
* @category
|
|
5816
|
+
* @category error handling
|
|
6024
5817
|
* @since 2.0.0
|
|
6025
5818
|
*/
|
|
6026
5819
|
type Return<R, E, A, O extends Options<E>> = Effect<A, (O extends {
|
|
@@ -6047,7 +5840,7 @@ export declare namespace Retry {
|
|
|
6047
5840
|
/**
|
|
6048
5841
|
* Options that control whether and how a failing effect is retried.
|
|
6049
5842
|
*
|
|
6050
|
-
* @category
|
|
5843
|
+
* @category error handling
|
|
6051
5844
|
* @since 2.0.0
|
|
6052
5845
|
*/
|
|
6053
5846
|
interface Options<E> {
|
|
@@ -6101,7 +5894,7 @@ export declare namespace Retry {
|
|
|
6101
5894
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6102
5895
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6103
5896
|
*
|
|
6104
|
-
* @category
|
|
5897
|
+
* @category error handling
|
|
6105
5898
|
* @since 2.0.0
|
|
6106
5899
|
*/
|
|
6107
5900
|
export declare const retry: {
|
|
@@ -6149,7 +5942,7 @@ export declare const retry: {
|
|
|
6149
5942
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6150
5943
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6151
5944
|
*
|
|
6152
|
-
* @category
|
|
5945
|
+
* @category error handling
|
|
6153
5946
|
* @since 2.0.0
|
|
6154
5947
|
*/
|
|
6155
5948
|
<E, O extends Retry.Options<E>>(options: O): <A, R>(self: Effect<A, E, R>) => Retry.Return<R, E, A, O>;
|
|
@@ -6197,7 +5990,7 @@ export declare const retry: {
|
|
|
6197
5990
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6198
5991
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6199
5992
|
*
|
|
6200
|
-
* @category
|
|
5993
|
+
* @category error handling
|
|
6201
5994
|
* @since 2.0.0
|
|
6202
5995
|
*/
|
|
6203
5996
|
<B, E, Error, Env>(policy: Schedule<B, NoInfer<E>, Error, Env>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | Error, R | Env>;
|
|
@@ -6245,7 +6038,7 @@ export declare const retry: {
|
|
|
6245
6038
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6246
6039
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6247
6040
|
*
|
|
6248
|
-
* @category
|
|
6041
|
+
* @category error handling
|
|
6249
6042
|
* @since 2.0.0
|
|
6250
6043
|
*/
|
|
6251
6044
|
<B, E, Error, Env>(builder: ($: <O, SE, R>(_: Schedule<O, NoInfer<E>, SE, R>) => Schedule<O, E, SE, R>) => Schedule<B, NoInfer<E>, Error, Env>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | Error, R | Env>;
|
|
@@ -6293,7 +6086,7 @@ export declare const retry: {
|
|
|
6293
6086
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6294
6087
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6295
6088
|
*
|
|
6296
|
-
* @category
|
|
6089
|
+
* @category error handling
|
|
6297
6090
|
* @since 2.0.0
|
|
6298
6091
|
*/
|
|
6299
6092
|
<A, E, R, O extends Retry.Options<E>>(self: Effect<A, E, R>, options: O): Retry.Return<R, E, A, O>;
|
|
@@ -6341,7 +6134,7 @@ export declare const retry: {
|
|
|
6341
6134
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6342
6135
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6343
6136
|
*
|
|
6344
|
-
* @category
|
|
6137
|
+
* @category error handling
|
|
6345
6138
|
* @since 2.0.0
|
|
6346
6139
|
*/
|
|
6347
6140
|
<A, E, R, B, Error, Env>(self: Effect<A, E, R>, policy: Schedule<B, NoInfer<E>, Error, Env>): Effect<A, E | Error, R | Env>;
|
|
@@ -6389,7 +6182,7 @@ export declare const retry: {
|
|
|
6389
6182
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6390
6183
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6391
6184
|
*
|
|
6392
|
-
* @category
|
|
6185
|
+
* @category error handling
|
|
6393
6186
|
* @since 2.0.0
|
|
6394
6187
|
*/
|
|
6395
6188
|
<A, E, R, B, Error, Env>(self: Effect<A, E, R>, builder: ($: <O, SE, R>(_: Schedule<O, NoInfer<E>, SE, R>) => Schedule<O, E, SE, R>) => Schedule<B, NoInfer<E>, Error, Env>): Effect<A, E | Error, R | Env>;
|
|
@@ -6448,7 +6241,7 @@ export declare const retry: {
|
|
|
6448
6241
|
* // Network data
|
|
6449
6242
|
* ```
|
|
6450
6243
|
*
|
|
6451
|
-
* @category
|
|
6244
|
+
* @category error handling
|
|
6452
6245
|
* @since 2.0.0
|
|
6453
6246
|
*/
|
|
6454
6247
|
export declare const retryOrElse: {
|
|
@@ -6506,7 +6299,7 @@ export declare const retryOrElse: {
|
|
|
6506
6299
|
* // Network data
|
|
6507
6300
|
* ```
|
|
6508
6301
|
*
|
|
6509
|
-
* @category
|
|
6302
|
+
* @category error handling
|
|
6510
6303
|
* @since 2.0.0
|
|
6511
6304
|
*/
|
|
6512
6305
|
<A1, E, E1, R1, A2, E2, R2>(policy: Schedule<A1, NoInfer<E>, E1, R1>, orElse: (e: NoInfer<E>, out: A1) => Effect<A2, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A | A2, E1 | E2, R | R1 | R2>;
|
|
@@ -6564,7 +6357,7 @@ export declare const retryOrElse: {
|
|
|
6564
6357
|
* // Network data
|
|
6565
6358
|
* ```
|
|
6566
6359
|
*
|
|
6567
|
-
* @category
|
|
6360
|
+
* @category error handling
|
|
6568
6361
|
* @since 2.0.0
|
|
6569
6362
|
*/
|
|
6570
6363
|
<A, E, R, A1, E1, R1, A2, E2, R2>(self: Effect<A, E, R>, policy: Schedule<A1, NoInfer<E>, E1, R1>, orElse: (e: NoInfer<E>, out: A1) => Effect<A2, E2, R2>): Effect<A | A2, E1 | E2, R | R1 | R2>;
|
|
@@ -6595,9 +6388,9 @@ export declare const retryOrElse: {
|
|
|
6595
6388
|
* // Output: "Caught cause: Something went wrong"
|
|
6596
6389
|
* ```
|
|
6597
6390
|
*
|
|
6598
|
-
* @see {@link
|
|
6391
|
+
* @see {@link sandbox} to expose failures as full causes.
|
|
6599
6392
|
*
|
|
6600
|
-
* @category
|
|
6393
|
+
* @category error handling
|
|
6601
6394
|
* @since 2.0.0
|
|
6602
6395
|
*/
|
|
6603
6396
|
export declare const sandbox: <A, E, R>(self: Effect<A, E, R>) => Effect<A, Cause.Cause<E>, R>;
|
|
@@ -6638,13 +6431,7 @@ export declare const sandbox: <A, E, R>(self: Effect<A, E, R>) => Effect<A, Caus
|
|
|
6638
6431
|
* const programWarn = task.pipe(Effect.ignore({ log: "Warn", message: "Ignoring task failure" }))
|
|
6639
6432
|
* ```
|
|
6640
6433
|
*
|
|
6641
|
-
*
|
|
6642
|
-
*
|
|
6643
|
-
* This API replaces the following from Effect 3.x:
|
|
6644
|
-
*
|
|
6645
|
-
* - `Effect.ignoreLogged`
|
|
6646
|
-
*
|
|
6647
|
-
* @category Error Handling
|
|
6434
|
+
* @category error handling
|
|
6648
6435
|
* @since 2.0.0
|
|
6649
6436
|
*/
|
|
6650
6437
|
export declare const ignore: <Arg extends Effect<any, any, any> | {
|
|
@@ -6674,7 +6461,7 @@ export declare const ignore: <Arg extends Effect<any, any, any> | {
|
|
|
6674
6461
|
* const programLog = task.pipe(Effect.ignoreCause({ log: true, message: "Ignoring failure cause" }))
|
|
6675
6462
|
* ```
|
|
6676
6463
|
*
|
|
6677
|
-
* @category
|
|
6464
|
+
* @category error handling
|
|
6678
6465
|
* @since 4.0.0
|
|
6679
6466
|
*/
|
|
6680
6467
|
export declare const ignoreCause: <Arg extends Effect<any, any, any> | {
|
|
@@ -6698,7 +6485,7 @@ export declare const ignoreCause: <Arg extends Effect<any, any, any> | {
|
|
|
6698
6485
|
* **Example** (Usage)
|
|
6699
6486
|
*
|
|
6700
6487
|
* ```ts
|
|
6701
|
-
* import { Effect, ExecutionPlan, Layer
|
|
6488
|
+
* import { Context, Effect, ExecutionPlan, Layer } from "effect"
|
|
6702
6489
|
*
|
|
6703
6490
|
* const Endpoint = Context.Service<{ url: string }>("Endpoint")
|
|
6704
6491
|
*
|
|
@@ -6733,7 +6520,7 @@ export declare const withExecutionPlan: {
|
|
|
6733
6520
|
* **Example** (Usage)
|
|
6734
6521
|
*
|
|
6735
6522
|
* ```ts
|
|
6736
|
-
* import { Effect, ExecutionPlan, Layer
|
|
6523
|
+
* import { Context, Effect, ExecutionPlan, Layer } from "effect"
|
|
6737
6524
|
*
|
|
6738
6525
|
* const Endpoint = Context.Service<{ url: string }>("Endpoint")
|
|
6739
6526
|
*
|
|
@@ -6773,7 +6560,7 @@ export declare const withExecutionPlan: {
|
|
|
6773
6560
|
* **Example** (Usage)
|
|
6774
6561
|
*
|
|
6775
6562
|
* ```ts
|
|
6776
|
-
* import { Effect, ExecutionPlan, Layer
|
|
6563
|
+
* import { Context, Effect, ExecutionPlan, Layer } from "effect"
|
|
6777
6564
|
*
|
|
6778
6565
|
* const Endpoint = Context.Service<{ url: string }>("Endpoint")
|
|
6779
6566
|
*
|
|
@@ -6809,7 +6596,7 @@ export declare const withExecutionPlan: {
|
|
|
6809
6596
|
* If the `defectsOnly` option is set to `true`, only defects (unrecoverable
|
|
6810
6597
|
* errors) will be reported, while regular failures will be ignored.
|
|
6811
6598
|
*
|
|
6812
|
-
* @category
|
|
6599
|
+
* @category error handling
|
|
6813
6600
|
* @since 4.0.0
|
|
6814
6601
|
*/
|
|
6815
6602
|
export declare const withErrorReporting: <Arg extends Effect<any, any, any> | {
|
|
@@ -6986,9 +6773,7 @@ export declare const firstSuccessOf: <Eff extends Effect<any, any, any>>(effects
|
|
|
6986
6773
|
* your program waits for a task to finish, ensuring that it doesn't hang
|
|
6987
6774
|
* indefinitely if the task takes too long.
|
|
6988
6775
|
*
|
|
6989
|
-
* @see {@link
|
|
6990
|
-
* @see {@link timeoutFailCause} for a version that raises a custom defect.
|
|
6991
|
-
* @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
|
|
6776
|
+
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
6992
6777
|
*
|
|
6993
6778
|
* **Example** (Usage)
|
|
6994
6779
|
*
|
|
@@ -7034,9 +6819,7 @@ export declare const timeout: {
|
|
|
7034
6819
|
* your program waits for a task to finish, ensuring that it doesn't hang
|
|
7035
6820
|
* indefinitely if the task takes too long.
|
|
7036
6821
|
*
|
|
7037
|
-
* @see {@link
|
|
7038
|
-
* @see {@link timeoutFailCause} for a version that raises a custom defect.
|
|
7039
|
-
* @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
|
|
6822
|
+
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7040
6823
|
*
|
|
7041
6824
|
* **Example** (Usage)
|
|
7042
6825
|
*
|
|
@@ -7082,9 +6865,7 @@ export declare const timeout: {
|
|
|
7082
6865
|
* your program waits for a task to finish, ensuring that it doesn't hang
|
|
7083
6866
|
* indefinitely if the task takes too long.
|
|
7084
6867
|
*
|
|
7085
|
-
* @see {@link
|
|
7086
|
-
* @see {@link timeoutFailCause} for a version that raises a custom defect.
|
|
7087
|
-
* @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
|
|
6868
|
+
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7088
6869
|
*
|
|
7089
6870
|
* **Example** (Usage)
|
|
7090
6871
|
*
|
|
@@ -7133,9 +6914,7 @@ export declare const timeout: {
|
|
|
7133
6914
|
* source effect fails before the timeout, that failure is preserved.
|
|
7134
6915
|
*
|
|
7135
6916
|
* @see {@link timeout} for a version that raises a `TimeoutException`.
|
|
7136
|
-
* @see {@link
|
|
7137
|
-
* @see {@link timeoutFailCause} for a version that raises a custom defect.
|
|
7138
|
-
* @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
|
|
6917
|
+
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7139
6918
|
*
|
|
7140
6919
|
* **Example** (Usage)
|
|
7141
6920
|
*
|
|
@@ -7181,9 +6960,7 @@ export declare const timeoutOption: {
|
|
|
7181
6960
|
* source effect fails before the timeout, that failure is preserved.
|
|
7182
6961
|
*
|
|
7183
6962
|
* @see {@link timeout} for a version that raises a `TimeoutException`.
|
|
7184
|
-
* @see {@link
|
|
7185
|
-
* @see {@link timeoutFailCause} for a version that raises a custom defect.
|
|
7186
|
-
* @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
|
|
6963
|
+
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7187
6964
|
*
|
|
7188
6965
|
* **Example** (Usage)
|
|
7189
6966
|
*
|
|
@@ -7229,9 +7006,7 @@ export declare const timeoutOption: {
|
|
|
7229
7006
|
* source effect fails before the timeout, that failure is preserved.
|
|
7230
7007
|
*
|
|
7231
7008
|
* @see {@link timeout} for a version that raises a `TimeoutException`.
|
|
7232
|
-
* @see {@link
|
|
7233
|
-
* @see {@link timeoutFailCause} for a version that raises a custom defect.
|
|
7234
|
-
* @see {@link timeoutTo} for a version that allows specifying both success and timeout handlers.
|
|
7009
|
+
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7235
7010
|
*
|
|
7236
7011
|
* **Example** (Usage)
|
|
7237
7012
|
*
|
|
@@ -7301,7 +7076,7 @@ export declare const timeoutOption: {
|
|
|
7301
7076
|
* ```
|
|
7302
7077
|
*
|
|
7303
7078
|
* @category Delays & Timeouts
|
|
7304
|
-
* @since
|
|
7079
|
+
* @since 4.0.0
|
|
7305
7080
|
*/
|
|
7306
7081
|
export declare const timeoutOrElse: {
|
|
7307
7082
|
/**
|
|
@@ -7339,7 +7114,7 @@ export declare const timeoutOrElse: {
|
|
|
7339
7114
|
* ```
|
|
7340
7115
|
*
|
|
7341
7116
|
* @category Delays & Timeouts
|
|
7342
|
-
* @since
|
|
7117
|
+
* @since 4.0.0
|
|
7343
7118
|
*/
|
|
7344
7119
|
<A2, E2, R2>(options: {
|
|
7345
7120
|
readonly duration: Duration.Input;
|
|
@@ -7380,7 +7155,7 @@ export declare const timeoutOrElse: {
|
|
|
7380
7155
|
* ```
|
|
7381
7156
|
*
|
|
7382
7157
|
* @category Delays & Timeouts
|
|
7383
|
-
* @since
|
|
7158
|
+
* @since 4.0.0
|
|
7384
7159
|
*/
|
|
7385
7160
|
<A, E, R, A2, E2, R2>(self: Effect<A, E, R>, options: {
|
|
7386
7161
|
readonly duration: Duration.Input;
|
|
@@ -7793,7 +7568,7 @@ export declare const raceFirst: {
|
|
|
7793
7568
|
* // Use Effect.filterMapEffect for effectful Filter.Filter callbacks
|
|
7794
7569
|
* ```
|
|
7795
7570
|
*
|
|
7796
|
-
* @category
|
|
7571
|
+
* @category filtering
|
|
7797
7572
|
* @since 2.0.0
|
|
7798
7573
|
*/
|
|
7799
7574
|
export declare const filter: {
|
|
@@ -7815,7 +7590,7 @@ export declare const filter: {
|
|
|
7815
7590
|
* // Use Effect.filterMapEffect for effectful Filter.Filter callbacks
|
|
7816
7591
|
* ```
|
|
7817
7592
|
*
|
|
7818
|
-
* @category
|
|
7593
|
+
* @category filtering
|
|
7819
7594
|
* @since 2.0.0
|
|
7820
7595
|
*/
|
|
7821
7596
|
<A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (elements: Iterable<A>) => Effect<Array<B>>;
|
|
@@ -7837,7 +7612,7 @@ export declare const filter: {
|
|
|
7837
7612
|
* // Use Effect.filterMapEffect for effectful Filter.Filter callbacks
|
|
7838
7613
|
* ```
|
|
7839
7614
|
*
|
|
7840
|
-
* @category
|
|
7615
|
+
* @category filtering
|
|
7841
7616
|
* @since 2.0.0
|
|
7842
7617
|
*/
|
|
7843
7618
|
<A>(predicate: Predicate.Predicate<NoInfer<A>>): (elements: Iterable<A>) => Effect<Array<A>>;
|
|
@@ -7859,7 +7634,7 @@ export declare const filter: {
|
|
|
7859
7634
|
* // Use Effect.filterMapEffect for effectful Filter.Filter callbacks
|
|
7860
7635
|
* ```
|
|
7861
7636
|
*
|
|
7862
|
-
* @category
|
|
7637
|
+
* @category filtering
|
|
7863
7638
|
* @since 2.0.0
|
|
7864
7639
|
*/
|
|
7865
7640
|
<A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
|
|
@@ -7883,7 +7658,7 @@ export declare const filter: {
|
|
|
7883
7658
|
* // Use Effect.filterMapEffect for effectful Filter.Filter callbacks
|
|
7884
7659
|
* ```
|
|
7885
7660
|
*
|
|
7886
|
-
* @category
|
|
7661
|
+
* @category filtering
|
|
7887
7662
|
* @since 2.0.0
|
|
7888
7663
|
*/
|
|
7889
7664
|
<A, B extends A>(elements: Iterable<A>, refinement: Predicate.Refinement<A, B>): Effect<Array<B>>;
|
|
@@ -7905,7 +7680,7 @@ export declare const filter: {
|
|
|
7905
7680
|
* // Use Effect.filterMapEffect for effectful Filter.Filter callbacks
|
|
7906
7681
|
* ```
|
|
7907
7682
|
*
|
|
7908
|
-
* @category
|
|
7683
|
+
* @category filtering
|
|
7909
7684
|
* @since 2.0.0
|
|
7910
7685
|
*/
|
|
7911
7686
|
<A>(elements: Iterable<A>, predicate: Predicate.Predicate<A>): Effect<Array<A>>;
|
|
@@ -7927,7 +7702,7 @@ export declare const filter: {
|
|
|
7927
7702
|
* // Use Effect.filterMapEffect for effectful Filter.Filter callbacks
|
|
7928
7703
|
* ```
|
|
7929
7704
|
*
|
|
7930
|
-
* @category
|
|
7705
|
+
* @category filtering
|
|
7931
7706
|
* @since 2.0.0
|
|
7932
7707
|
*/
|
|
7933
7708
|
<A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
|
|
@@ -7937,36 +7712,36 @@ export declare const filter: {
|
|
|
7937
7712
|
/**
|
|
7938
7713
|
* Filters and maps elements of an iterable with a `Filter`.
|
|
7939
7714
|
*
|
|
7940
|
-
* @category
|
|
7941
|
-
* @since
|
|
7715
|
+
* @category filtering
|
|
7716
|
+
* @since 2.0.0
|
|
7942
7717
|
*/
|
|
7943
7718
|
export declare const filterMap: {
|
|
7944
7719
|
/**
|
|
7945
7720
|
* Filters and maps elements of an iterable with a `Filter`.
|
|
7946
7721
|
*
|
|
7947
|
-
* @category
|
|
7948
|
-
* @since
|
|
7722
|
+
* @category filtering
|
|
7723
|
+
* @since 2.0.0
|
|
7949
7724
|
*/
|
|
7950
7725
|
<A, B, X>(filter: Filter.Filter<NoInfer<A>, B, X>): (elements: Iterable<A>) => Effect<Array<B>>;
|
|
7951
7726
|
/**
|
|
7952
7727
|
* Filters and maps elements of an iterable with a `Filter`.
|
|
7953
7728
|
*
|
|
7954
|
-
* @category
|
|
7955
|
-
* @since
|
|
7729
|
+
* @category filtering
|
|
7730
|
+
* @since 2.0.0
|
|
7956
7731
|
*/
|
|
7957
7732
|
<A, B, X>(elements: Iterable<A>, filter: Filter.Filter<NoInfer<A>, B, X>): Effect<Array<B>>;
|
|
7958
7733
|
};
|
|
7959
7734
|
/**
|
|
7960
7735
|
* Effectfully filters and maps elements of an iterable with a `FilterEffect`.
|
|
7961
7736
|
*
|
|
7962
|
-
* @category
|
|
7737
|
+
* @category filtering
|
|
7963
7738
|
* @since 4.0.0
|
|
7964
7739
|
*/
|
|
7965
7740
|
export declare const filterMapEffect: {
|
|
7966
7741
|
/**
|
|
7967
7742
|
* Effectfully filters and maps elements of an iterable with a `FilterEffect`.
|
|
7968
7743
|
*
|
|
7969
|
-
* @category
|
|
7744
|
+
* @category filtering
|
|
7970
7745
|
* @since 4.0.0
|
|
7971
7746
|
*/
|
|
7972
7747
|
<A, B, X, E, R>(filter: Filter.FilterEffect<NoInfer<A>, B, X, E, R>, options?: {
|
|
@@ -7975,7 +7750,7 @@ export declare const filterMapEffect: {
|
|
|
7975
7750
|
/**
|
|
7976
7751
|
* Effectfully filters and maps elements of an iterable with a `FilterEffect`.
|
|
7977
7752
|
*
|
|
7978
|
-
* @category
|
|
7753
|
+
* @category filtering
|
|
7979
7754
|
* @since 4.0.0
|
|
7980
7755
|
*/
|
|
7981
7756
|
<A, B, X, E, R>(elements: Iterable<A>, filter: Filter.FilterEffect<NoInfer<A>, B, X, E, R>, options?: {
|
|
@@ -8010,7 +7785,7 @@ export declare const filterMapEffect: {
|
|
|
8010
7785
|
* // Result: "Number 5 is odd" (since 5 is not even)
|
|
8011
7786
|
* ```
|
|
8012
7787
|
*
|
|
8013
|
-
* @category
|
|
7788
|
+
* @category filtering
|
|
8014
7789
|
* @since 2.0.0
|
|
8015
7790
|
*/
|
|
8016
7791
|
export declare const filterOrElse: {
|
|
@@ -8042,7 +7817,7 @@ export declare const filterOrElse: {
|
|
|
8042
7817
|
* // Result: "Number 5 is odd" (since 5 is not even)
|
|
8043
7818
|
* ```
|
|
8044
7819
|
*
|
|
8045
|
-
* @category
|
|
7820
|
+
* @category filtering
|
|
8046
7821
|
* @since 2.0.0
|
|
8047
7822
|
*/
|
|
8048
7823
|
<A, C, E2, R2, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>, orElse: (a: EqualsWith<A, B, NoInfer<A>, Exclude<NoInfer<A>, B>>) => Effect<C, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<B | C, E2 | E, R2 | R>;
|
|
@@ -8074,7 +7849,7 @@ export declare const filterOrElse: {
|
|
|
8074
7849
|
* // Result: "Number 5 is odd" (since 5 is not even)
|
|
8075
7850
|
* ```
|
|
8076
7851
|
*
|
|
8077
|
-
* @category
|
|
7852
|
+
* @category filtering
|
|
8078
7853
|
* @since 2.0.0
|
|
8079
7854
|
*/
|
|
8080
7855
|
<A, C, E2, R2>(predicate: Predicate.Predicate<NoInfer<A>>, orElse: (a: NoInfer<A>) => Effect<C, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<A | C, E2 | E, R2 | R>;
|
|
@@ -8106,7 +7881,7 @@ export declare const filterOrElse: {
|
|
|
8106
7881
|
* // Result: "Number 5 is odd" (since 5 is not even)
|
|
8107
7882
|
* ```
|
|
8108
7883
|
*
|
|
8109
|
-
* @category
|
|
7884
|
+
* @category filtering
|
|
8110
7885
|
* @since 2.0.0
|
|
8111
7886
|
*/
|
|
8112
7887
|
<A, E, R, C, E2, R2, B extends A>(self: Effect<A, E, R>, refinement: Predicate.Refinement<A, B>, orElse: (a: EqualsWith<A, B, A, Exclude<A, B>>) => Effect<C, E2, R2>): Effect<B | C, E | E2, R | R2>;
|
|
@@ -8138,7 +7913,7 @@ export declare const filterOrElse: {
|
|
|
8138
7913
|
* // Result: "Number 5 is odd" (since 5 is not even)
|
|
8139
7914
|
* ```
|
|
8140
7915
|
*
|
|
8141
|
-
* @category
|
|
7916
|
+
* @category filtering
|
|
8142
7917
|
* @since 2.0.0
|
|
8143
7918
|
*/
|
|
8144
7919
|
<A, E, R, C, E2, R2>(self: Effect<A, E, R>, predicate: Predicate.Predicate<NoInfer<A>>, orElse: (a: NoInfer<A>) => Effect<C, E2, R2>): Effect<A | C, E | E2, R | R2>;
|
|
@@ -8146,21 +7921,21 @@ export declare const filterOrElse: {
|
|
|
8146
7921
|
/**
|
|
8147
7922
|
* Filters an effect with a `Filter`, providing an alternative effect on failure.
|
|
8148
7923
|
*
|
|
8149
|
-
* @category
|
|
7924
|
+
* @category filtering
|
|
8150
7925
|
* @since 4.0.0
|
|
8151
7926
|
*/
|
|
8152
7927
|
export declare const filterMapOrElse: {
|
|
8153
7928
|
/**
|
|
8154
7929
|
* Filters an effect with a `Filter`, providing an alternative effect on failure.
|
|
8155
7930
|
*
|
|
8156
|
-
* @category
|
|
7931
|
+
* @category filtering
|
|
8157
7932
|
* @since 4.0.0
|
|
8158
7933
|
*/
|
|
8159
7934
|
<A, B, X, C, E2, R2>(filter: Filter.Filter<NoInfer<A>, B, X>, orElse: (x: X) => Effect<C, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<B | C, E2 | E, R2 | R>;
|
|
8160
7935
|
/**
|
|
8161
7936
|
* Filters an effect with a `Filter`, providing an alternative effect on failure.
|
|
8162
7937
|
*
|
|
8163
|
-
* @category
|
|
7938
|
+
* @category filtering
|
|
8164
7939
|
* @since 4.0.0
|
|
8165
7940
|
*/
|
|
8166
7941
|
<A, E, R, B, X, C, E2, R2>(self: Effect<A, E, R>, filter: Filter.Filter<NoInfer<A>, B, X>, orElse: (x: X) => Effect<C, E2, R2>): Effect<B | C, E | E2, R | R2>;
|
|
@@ -8192,7 +7967,7 @@ export declare const filterMapOrElse: {
|
|
|
8192
7967
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8193
7968
|
* ```
|
|
8194
7969
|
*
|
|
8195
|
-
* @category
|
|
7970
|
+
* @category filtering
|
|
8196
7971
|
* @since 2.0.0
|
|
8197
7972
|
*/
|
|
8198
7973
|
export declare const filterOrFail: {
|
|
@@ -8223,7 +7998,7 @@ export declare const filterOrFail: {
|
|
|
8223
7998
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8224
7999
|
* ```
|
|
8225
8000
|
*
|
|
8226
|
-
* @category
|
|
8001
|
+
* @category filtering
|
|
8227
8002
|
* @since 2.0.0
|
|
8228
8003
|
*/
|
|
8229
8004
|
<A, E2, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>, orFailWith: (a: NoInfer<A>) => E2): <E, R>(self: Effect<A, E, R>) => Effect<B, E2 | E, R>;
|
|
@@ -8254,7 +8029,7 @@ export declare const filterOrFail: {
|
|
|
8254
8029
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8255
8030
|
* ```
|
|
8256
8031
|
*
|
|
8257
|
-
* @category
|
|
8032
|
+
* @category filtering
|
|
8258
8033
|
* @since 2.0.0
|
|
8259
8034
|
*/
|
|
8260
8035
|
<A, E2>(predicate: Predicate.Predicate<NoInfer<A>>, orFailWith: (a: NoInfer<A>) => E2): <E, R>(self: Effect<A, E, R>) => Effect<A, E2 | E, R>;
|
|
@@ -8285,7 +8060,7 @@ export declare const filterOrFail: {
|
|
|
8285
8060
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8286
8061
|
* ```
|
|
8287
8062
|
*
|
|
8288
|
-
* @category
|
|
8063
|
+
* @category filtering
|
|
8289
8064
|
* @since 2.0.0
|
|
8290
8065
|
*/
|
|
8291
8066
|
<A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): <E, R>(self: Effect<A, E, R>) => Effect<B, Cause.NoSuchElementError | E, R>;
|
|
@@ -8316,7 +8091,7 @@ export declare const filterOrFail: {
|
|
|
8316
8091
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8317
8092
|
* ```
|
|
8318
8093
|
*
|
|
8319
|
-
* @category
|
|
8094
|
+
* @category filtering
|
|
8320
8095
|
* @since 2.0.0
|
|
8321
8096
|
*/
|
|
8322
8097
|
<A>(predicate: Predicate.Predicate<NoInfer<A>>): <E, R>(self: Effect<A, E, R>) => Effect<A, Cause.NoSuchElementError | E, R>;
|
|
@@ -8347,7 +8122,7 @@ export declare const filterOrFail: {
|
|
|
8347
8122
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8348
8123
|
* ```
|
|
8349
8124
|
*
|
|
8350
|
-
* @category
|
|
8125
|
+
* @category filtering
|
|
8351
8126
|
* @since 2.0.0
|
|
8352
8127
|
*/
|
|
8353
8128
|
<A, E, R, E2, B extends A>(self: Effect<A, E, R>, refinement: Predicate.Refinement<NoInfer<A>, B>, orFailWith: (a: NoInfer<A>) => E2): Effect<B, E2 | E, R>;
|
|
@@ -8378,7 +8153,7 @@ export declare const filterOrFail: {
|
|
|
8378
8153
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8379
8154
|
* ```
|
|
8380
8155
|
*
|
|
8381
|
-
* @category
|
|
8156
|
+
* @category filtering
|
|
8382
8157
|
* @since 2.0.0
|
|
8383
8158
|
*/
|
|
8384
8159
|
<A, E, R, E2>(self: Effect<A, E, R>, predicate: Predicate.Predicate<NoInfer<A>>, orFailWith: (a: NoInfer<A>) => E2): Effect<A, E2 | E, R>;
|
|
@@ -8409,7 +8184,7 @@ export declare const filterOrFail: {
|
|
|
8409
8184
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8410
8185
|
* ```
|
|
8411
8186
|
*
|
|
8412
|
-
* @category
|
|
8187
|
+
* @category filtering
|
|
8413
8188
|
* @since 2.0.0
|
|
8414
8189
|
*/
|
|
8415
8190
|
<A, E, R, B extends A>(self: Effect<A, E, R>, refinement: Predicate.Refinement<NoInfer<A>, B>): Effect<B, E | Cause.NoSuchElementError, R>;
|
|
@@ -8440,7 +8215,7 @@ export declare const filterOrFail: {
|
|
|
8440
8215
|
* // Result: Effect.fail("Expected even number, got 5")
|
|
8441
8216
|
* ```
|
|
8442
8217
|
*
|
|
8443
|
-
* @category
|
|
8218
|
+
* @category filtering
|
|
8444
8219
|
* @since 2.0.0
|
|
8445
8220
|
*/
|
|
8446
8221
|
<A, E, R>(self: Effect<A, E, R>, predicate: Predicate.Predicate<NoInfer<A>>): Effect<A, E | Cause.NoSuchElementError, R>;
|
|
@@ -8448,35 +8223,35 @@ export declare const filterOrFail: {
|
|
|
8448
8223
|
/**
|
|
8449
8224
|
* Filters an effect with a `Filter`, failing when the filter fails.
|
|
8450
8225
|
*
|
|
8451
|
-
* @category
|
|
8226
|
+
* @category filtering
|
|
8452
8227
|
* @since 4.0.0
|
|
8453
8228
|
*/
|
|
8454
8229
|
export declare const filterMapOrFail: {
|
|
8455
8230
|
/**
|
|
8456
8231
|
* Filters an effect with a `Filter`, failing when the filter fails.
|
|
8457
8232
|
*
|
|
8458
|
-
* @category
|
|
8233
|
+
* @category filtering
|
|
8459
8234
|
* @since 4.0.0
|
|
8460
8235
|
*/
|
|
8461
8236
|
<A, B, X, E2>(filter: Filter.Filter<NoInfer<A>, B, X>, orFailWith: (x: X) => E2): <E, R>(self: Effect<A, E, R>) => Effect<B, E2 | E, R>;
|
|
8462
8237
|
/**
|
|
8463
8238
|
* Filters an effect with a `Filter`, failing when the filter fails.
|
|
8464
8239
|
*
|
|
8465
|
-
* @category
|
|
8240
|
+
* @category filtering
|
|
8466
8241
|
* @since 4.0.0
|
|
8467
8242
|
*/
|
|
8468
8243
|
<A, B, X>(filter: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Effect<A, E, R>) => Effect<B, Cause.NoSuchElementError | E, R>;
|
|
8469
8244
|
/**
|
|
8470
8245
|
* Filters an effect with a `Filter`, failing when the filter fails.
|
|
8471
8246
|
*
|
|
8472
|
-
* @category
|
|
8247
|
+
* @category filtering
|
|
8473
8248
|
* @since 4.0.0
|
|
8474
8249
|
*/
|
|
8475
8250
|
<A, E, R, B, X, E2>(self: Effect<A, E, R>, filter: Filter.Filter<A, B, X>, orFailWith: (x: X) => E2): Effect<B, E2 | E, R>;
|
|
8476
8251
|
/**
|
|
8477
8252
|
* Filters an effect with a `Filter`, failing when the filter fails.
|
|
8478
8253
|
*
|
|
8479
|
-
* @category
|
|
8254
|
+
* @category filtering
|
|
8480
8255
|
* @since 4.0.0
|
|
8481
8256
|
*/
|
|
8482
8257
|
<A, E, R, B, X>(self: Effect<A, E, R>, filter: Filter.Filter<A, B, X>): Effect<B, Cause.NoSuchElementError | E, R>;
|
|
@@ -8514,8 +8289,7 @@ export declare const filterMapOrFail: {
|
|
|
8514
8289
|
* // { _id: 'Option', _tag: 'Some', value: undefined }
|
|
8515
8290
|
* ```
|
|
8516
8291
|
*
|
|
8517
|
-
* @see {@link
|
|
8518
|
-
* @see {@link unless} for a version that executes the effect when the condition is `false`.
|
|
8292
|
+
* @see {@link when} for conditional execution with a boolean condition.
|
|
8519
8293
|
*
|
|
8520
8294
|
* @category Conditional Operators
|
|
8521
8295
|
* @since 2.0.0
|
|
@@ -8554,8 +8328,7 @@ export declare const when: {
|
|
|
8554
8328
|
* // { _id: 'Option', _tag: 'Some', value: undefined }
|
|
8555
8329
|
* ```
|
|
8556
8330
|
*
|
|
8557
|
-
* @see {@link
|
|
8558
|
-
* @see {@link unless} for a version that executes the effect when the condition is `false`.
|
|
8331
|
+
* @see {@link when} for conditional execution with a boolean condition.
|
|
8559
8332
|
*
|
|
8560
8333
|
* @category Conditional Operators
|
|
8561
8334
|
* @since 2.0.0
|
|
@@ -8594,8 +8367,7 @@ export declare const when: {
|
|
|
8594
8367
|
* // { _id: 'Option', _tag: 'Some', value: undefined }
|
|
8595
8368
|
* ```
|
|
8596
8369
|
*
|
|
8597
|
-
* @see {@link
|
|
8598
|
-
* @see {@link unless} for a version that executes the effect when the condition is `false`.
|
|
8370
|
+
* @see {@link when} for conditional execution with a boolean condition.
|
|
8599
8371
|
*
|
|
8600
8372
|
* @category Conditional Operators
|
|
8601
8373
|
* @since 2.0.0
|
|
@@ -8806,7 +8578,7 @@ export declare const match: {
|
|
|
8806
8578
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
8807
8579
|
*
|
|
8808
8580
|
* @category Pattern Matching
|
|
8809
|
-
* @since
|
|
8581
|
+
* @since 4.0.0
|
|
8810
8582
|
*/
|
|
8811
8583
|
export declare const matchEager: {
|
|
8812
8584
|
/**
|
|
@@ -8844,7 +8616,7 @@ export declare const matchEager: {
|
|
|
8844
8616
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
8845
8617
|
*
|
|
8846
8618
|
* @category Pattern Matching
|
|
8847
|
-
* @since
|
|
8619
|
+
* @since 4.0.0
|
|
8848
8620
|
*/
|
|
8849
8621
|
<E, A2, A, A3>(options: {
|
|
8850
8622
|
readonly onFailure: (error: E) => A2;
|
|
@@ -8885,7 +8657,7 @@ export declare const matchEager: {
|
|
|
8885
8657
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
8886
8658
|
*
|
|
8887
8659
|
* @category Pattern Matching
|
|
8888
|
-
* @since
|
|
8660
|
+
* @since 4.0.0
|
|
8889
8661
|
*/
|
|
8890
8662
|
<A, E, R, A2, A3>(self: Effect<A, E, R>, options: {
|
|
8891
8663
|
readonly onFailure: (error: E) => A2;
|
|
@@ -9040,7 +8812,7 @@ export declare const matchCause: {
|
|
|
9040
8812
|
* ```
|
|
9041
8813
|
*
|
|
9042
8814
|
* @category Pattern Matching
|
|
9043
|
-
* @since
|
|
8815
|
+
* @since 4.0.0
|
|
9044
8816
|
*/
|
|
9045
8817
|
export declare const matchCauseEager: {
|
|
9046
8818
|
/**
|
|
@@ -9070,7 +8842,7 @@ export declare const matchCauseEager: {
|
|
|
9070
8842
|
* ```
|
|
9071
8843
|
*
|
|
9072
8844
|
* @category Pattern Matching
|
|
9073
|
-
* @since
|
|
8845
|
+
* @since 4.0.0
|
|
9074
8846
|
*/
|
|
9075
8847
|
<E, A2, A, A3>(options: {
|
|
9076
8848
|
readonly onFailure: (cause: Cause.Cause<E>) => A2;
|
|
@@ -9103,7 +8875,7 @@ export declare const matchCauseEager: {
|
|
|
9103
8875
|
* ```
|
|
9104
8876
|
*
|
|
9105
8877
|
* @category Pattern Matching
|
|
9106
|
-
* @since
|
|
8878
|
+
* @since 4.0.0
|
|
9107
8879
|
*/
|
|
9108
8880
|
<A, E, R, A2, A3>(self: Effect<A, E, R>, options: {
|
|
9109
8881
|
readonly onFailure: (cause: Cause.Cause<E>) => A2;
|
|
@@ -9570,7 +9342,7 @@ export declare const isSuccess: <A, E, R>(self: Effect<A, E, R>) => Effect<boole
|
|
|
9570
9342
|
* **Example** (Usage)
|
|
9571
9343
|
*
|
|
9572
9344
|
* ```ts
|
|
9573
|
-
* import { Console, Effect, Option
|
|
9345
|
+
* import { Console, Context, Effect, Option } from "effect"
|
|
9574
9346
|
*
|
|
9575
9347
|
* const Logger = Context.Service<{
|
|
9576
9348
|
* log: (msg: string) => void
|
|
@@ -9610,7 +9382,7 @@ export declare const context: <R = never>() => Effect<Context.Context<R>, never,
|
|
|
9610
9382
|
* **Example** (Usage)
|
|
9611
9383
|
*
|
|
9612
9384
|
* ```ts
|
|
9613
|
-
* import { Console, Effect, Option
|
|
9385
|
+
* import { Console, Context, Effect, Option } from "effect"
|
|
9614
9386
|
*
|
|
9615
9387
|
* const Logger = Context.Service<{
|
|
9616
9388
|
* log: (msg: string) => void
|
|
@@ -9654,7 +9426,7 @@ export declare const contextWith: <R, A, E, R2>(f: (context: Context.Context<R>)
|
|
|
9654
9426
|
* **Example** (Usage)
|
|
9655
9427
|
*
|
|
9656
9428
|
* ```ts
|
|
9657
|
-
* import { Effect, Layer
|
|
9429
|
+
* import { Context, Effect, Layer } from "effect"
|
|
9658
9430
|
*
|
|
9659
9431
|
* interface Database {
|
|
9660
9432
|
* readonly query: (sql: string) => Effect.Effect<string>
|
|
@@ -9689,7 +9461,7 @@ export declare const provide: {
|
|
|
9689
9461
|
* **Example** (Usage)
|
|
9690
9462
|
*
|
|
9691
9463
|
* ```ts
|
|
9692
|
-
* import { Effect, Layer
|
|
9464
|
+
* import { Context, Effect, Layer } from "effect"
|
|
9693
9465
|
*
|
|
9694
9466
|
* interface Database {
|
|
9695
9467
|
* readonly query: (sql: string) => Effect.Effect<string>
|
|
@@ -9726,7 +9498,7 @@ export declare const provide: {
|
|
|
9726
9498
|
* **Example** (Usage)
|
|
9727
9499
|
*
|
|
9728
9500
|
* ```ts
|
|
9729
|
-
* import { Effect, Layer
|
|
9501
|
+
* import { Context, Effect, Layer } from "effect"
|
|
9730
9502
|
*
|
|
9731
9503
|
* interface Database {
|
|
9732
9504
|
* readonly query: (sql: string) => Effect.Effect<string>
|
|
@@ -9763,7 +9535,7 @@ export declare const provide: {
|
|
|
9763
9535
|
* **Example** (Usage)
|
|
9764
9536
|
*
|
|
9765
9537
|
* ```ts
|
|
9766
|
-
* import { Effect, Layer
|
|
9538
|
+
* import { Context, Effect, Layer } from "effect"
|
|
9767
9539
|
*
|
|
9768
9540
|
* interface Database {
|
|
9769
9541
|
* readonly query: (sql: string) => Effect.Effect<string>
|
|
@@ -9798,7 +9570,7 @@ export declare const provide: {
|
|
|
9798
9570
|
* **Example** (Usage)
|
|
9799
9571
|
*
|
|
9800
9572
|
* ```ts
|
|
9801
|
-
* import { Effect, Layer
|
|
9573
|
+
* import { Context, Effect, Layer } from "effect"
|
|
9802
9574
|
*
|
|
9803
9575
|
* interface Database {
|
|
9804
9576
|
* readonly query: (sql: string) => Effect.Effect<string>
|
|
@@ -9835,7 +9607,7 @@ export declare const provide: {
|
|
|
9835
9607
|
* **Example** (Usage)
|
|
9836
9608
|
*
|
|
9837
9609
|
* ```ts
|
|
9838
|
-
* import { Effect, Layer
|
|
9610
|
+
* import { Context, Effect, Layer } from "effect"
|
|
9839
9611
|
*
|
|
9840
9612
|
* interface Database {
|
|
9841
9613
|
* readonly query: (sql: string) => Effect.Effect<string>
|
|
@@ -9872,7 +9644,7 @@ export declare const provide: {
|
|
|
9872
9644
|
* **Example** (Usage)
|
|
9873
9645
|
*
|
|
9874
9646
|
* ```ts
|
|
9875
|
-
* import { Effect, Layer
|
|
9647
|
+
* import { Context, Effect, Layer } from "effect"
|
|
9876
9648
|
*
|
|
9877
9649
|
* interface Database {
|
|
9878
9650
|
* readonly query: (sql: string) => Effect.Effect<string>
|
|
@@ -9912,7 +9684,7 @@ export declare const provide: {
|
|
|
9912
9684
|
* **Example** (Usage)
|
|
9913
9685
|
*
|
|
9914
9686
|
* ```ts
|
|
9915
|
-
* import {
|
|
9687
|
+
* import { Context, Effect } from "effect"
|
|
9916
9688
|
*
|
|
9917
9689
|
* // Define service keys
|
|
9918
9690
|
* const Logger = Context.Service<{
|
|
@@ -9938,7 +9710,7 @@ export declare const provide: {
|
|
|
9938
9710
|
* ```
|
|
9939
9711
|
*
|
|
9940
9712
|
* @category Environment
|
|
9941
|
-
* @since
|
|
9713
|
+
* @since 4.0.0
|
|
9942
9714
|
*/
|
|
9943
9715
|
export declare const provideContext: {
|
|
9944
9716
|
/**
|
|
@@ -9953,7 +9725,7 @@ export declare const provideContext: {
|
|
|
9953
9725
|
* **Example** (Usage)
|
|
9954
9726
|
*
|
|
9955
9727
|
* ```ts
|
|
9956
|
-
* import {
|
|
9728
|
+
* import { Context, Effect } from "effect"
|
|
9957
9729
|
*
|
|
9958
9730
|
* // Define service keys
|
|
9959
9731
|
* const Logger = Context.Service<{
|
|
@@ -9979,7 +9751,7 @@ export declare const provideContext: {
|
|
|
9979
9751
|
* ```
|
|
9980
9752
|
*
|
|
9981
9753
|
* @category Environment
|
|
9982
|
-
* @since
|
|
9754
|
+
* @since 4.0.0
|
|
9983
9755
|
*/
|
|
9984
9756
|
<XR>(context: Context.Context<XR>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, XR>>;
|
|
9985
9757
|
/**
|
|
@@ -9994,7 +9766,7 @@ export declare const provideContext: {
|
|
|
9994
9766
|
* **Example** (Usage)
|
|
9995
9767
|
*
|
|
9996
9768
|
* ```ts
|
|
9997
|
-
* import {
|
|
9769
|
+
* import { Context, Effect } from "effect"
|
|
9998
9770
|
*
|
|
9999
9771
|
* // Define service keys
|
|
10000
9772
|
* const Logger = Context.Service<{
|
|
@@ -10020,7 +9792,7 @@ export declare const provideContext: {
|
|
|
10020
9792
|
* ```
|
|
10021
9793
|
*
|
|
10022
9794
|
* @category Environment
|
|
10023
|
-
* @since
|
|
9795
|
+
* @since 4.0.0
|
|
10024
9796
|
*/
|
|
10025
9797
|
<A, E, R, XR>(self: Effect<A, E, R>, context: Context.Context<XR>): Effect<A, E, Exclude<R, XR>>;
|
|
10026
9798
|
};
|
|
@@ -10030,7 +9802,7 @@ export declare const provideContext: {
|
|
|
10030
9802
|
* **Example** (Usage)
|
|
10031
9803
|
*
|
|
10032
9804
|
* ```ts
|
|
10033
|
-
* import {
|
|
9805
|
+
* import { Context, Effect } from "effect"
|
|
10034
9806
|
*
|
|
10035
9807
|
* interface Database {
|
|
10036
9808
|
* readonly query: (sql: string) => Effect.Effect<string>
|
|
@@ -10061,7 +9833,7 @@ export declare const service: <I, S>(service: Context.Key<I, S>) => Effect<S, ne
|
|
|
10061
9833
|
* **Example** (Usage)
|
|
10062
9834
|
*
|
|
10063
9835
|
* ```ts
|
|
10064
|
-
* import { Effect, Option
|
|
9836
|
+
* import { Context, Effect, Option } from "effect"
|
|
10065
9837
|
*
|
|
10066
9838
|
* // Define a service key
|
|
10067
9839
|
* const Logger = Context.Service<{
|
|
@@ -10095,7 +9867,7 @@ export declare const serviceOption: <I, S>(key: Context.Key<I, S>) => Effect<Opt
|
|
|
10095
9867
|
* **Example** (Usage)
|
|
10096
9868
|
*
|
|
10097
9869
|
* ```ts
|
|
10098
|
-
* import {
|
|
9870
|
+
* import { Context, Effect } from "effect"
|
|
10099
9871
|
*
|
|
10100
9872
|
* // Define services
|
|
10101
9873
|
* const Logger = Context.Service<{
|
|
@@ -10137,7 +9909,7 @@ export declare const updateContext: {
|
|
|
10137
9909
|
* **Example** (Usage)
|
|
10138
9910
|
*
|
|
10139
9911
|
* ```ts
|
|
10140
|
-
* import {
|
|
9912
|
+
* import { Context, Effect } from "effect"
|
|
10141
9913
|
*
|
|
10142
9914
|
* // Define services
|
|
10143
9915
|
* const Logger = Context.Service<{
|
|
@@ -10179,7 +9951,7 @@ export declare const updateContext: {
|
|
|
10179
9951
|
* **Example** (Usage)
|
|
10180
9952
|
*
|
|
10181
9953
|
* ```ts
|
|
10182
|
-
* import {
|
|
9954
|
+
* import { Context, Effect } from "effect"
|
|
10183
9955
|
*
|
|
10184
9956
|
* // Define services
|
|
10185
9957
|
* const Logger = Context.Service<{
|
|
@@ -10221,7 +9993,7 @@ export declare const updateContext: {
|
|
|
10221
9993
|
* **Example** (Usage)
|
|
10222
9994
|
*
|
|
10223
9995
|
* ```ts
|
|
10224
|
-
* import { Console,
|
|
9996
|
+
* import { Console, Context, Effect } from "effect"
|
|
10225
9997
|
*
|
|
10226
9998
|
* // Define a counter service
|
|
10227
9999
|
* const Counter = Context.Service<{ count: number }>("Counter")
|
|
@@ -10255,7 +10027,7 @@ export declare const updateService: {
|
|
|
10255
10027
|
* **Example** (Usage)
|
|
10256
10028
|
*
|
|
10257
10029
|
* ```ts
|
|
10258
|
-
* import { Console,
|
|
10030
|
+
* import { Console, Context, Effect } from "effect"
|
|
10259
10031
|
*
|
|
10260
10032
|
* // Define a counter service
|
|
10261
10033
|
* const Counter = Context.Service<{ count: number }>("Counter")
|
|
@@ -10289,7 +10061,7 @@ export declare const updateService: {
|
|
|
10289
10061
|
* **Example** (Usage)
|
|
10290
10062
|
*
|
|
10291
10063
|
* ```ts
|
|
10292
|
-
* import { Console,
|
|
10064
|
+
* import { Console, Context, Effect } from "effect"
|
|
10293
10065
|
*
|
|
10294
10066
|
* // Define a counter service
|
|
10295
10067
|
* const Counter = Context.Service<{ count: number }>("Counter")
|
|
@@ -10329,7 +10101,7 @@ export declare const updateService: {
|
|
|
10329
10101
|
* **Example** (Usage)
|
|
10330
10102
|
*
|
|
10331
10103
|
* ```ts
|
|
10332
|
-
* import { Console,
|
|
10104
|
+
* import { Console, Context, Effect } from "effect"
|
|
10333
10105
|
*
|
|
10334
10106
|
* // Define a service for configuration
|
|
10335
10107
|
* const Config = Context.Service<{
|
|
@@ -10376,7 +10148,7 @@ export declare const provideService: {
|
|
|
10376
10148
|
* **Example** (Usage)
|
|
10377
10149
|
*
|
|
10378
10150
|
* ```ts
|
|
10379
|
-
* import { Console,
|
|
10151
|
+
* import { Console, Context, Effect } from "effect"
|
|
10380
10152
|
*
|
|
10381
10153
|
* // Define a service for configuration
|
|
10382
10154
|
* const Config = Context.Service<{
|
|
@@ -10423,7 +10195,7 @@ export declare const provideService: {
|
|
|
10423
10195
|
* **Example** (Usage)
|
|
10424
10196
|
*
|
|
10425
10197
|
* ```ts
|
|
10426
|
-
* import { Console,
|
|
10198
|
+
* import { Console, Context, Effect } from "effect"
|
|
10427
10199
|
*
|
|
10428
10200
|
* // Define a service for configuration
|
|
10429
10201
|
* const Config = Context.Service<{
|
|
@@ -10470,7 +10242,7 @@ export declare const provideService: {
|
|
|
10470
10242
|
* **Example** (Usage)
|
|
10471
10243
|
*
|
|
10472
10244
|
* ```ts
|
|
10473
|
-
* import { Console,
|
|
10245
|
+
* import { Console, Context, Effect } from "effect"
|
|
10474
10246
|
*
|
|
10475
10247
|
* // Define a service for configuration
|
|
10476
10248
|
* const Config = Context.Service<{
|
|
@@ -10518,7 +10290,7 @@ export declare const provideService: {
|
|
|
10518
10290
|
* **Example** (Usage)
|
|
10519
10291
|
*
|
|
10520
10292
|
* ```ts
|
|
10521
|
-
* import { Console,
|
|
10293
|
+
* import { Console, Context, Effect } from "effect"
|
|
10522
10294
|
*
|
|
10523
10295
|
* // Define a service for configuration
|
|
10524
10296
|
* const Config = Context.Service<{
|
|
@@ -10565,7 +10337,7 @@ export declare const provideService: {
|
|
|
10565
10337
|
* **Example** (Usage)
|
|
10566
10338
|
*
|
|
10567
10339
|
* ```ts
|
|
10568
|
-
* import { Console,
|
|
10340
|
+
* import { Console, Context, Effect } from "effect"
|
|
10569
10341
|
*
|
|
10570
10342
|
* // Define a service for configuration
|
|
10571
10343
|
* const Config = Context.Service<{
|
|
@@ -10611,7 +10383,7 @@ export declare const provideService: {
|
|
|
10611
10383
|
* **Example** (Usage)
|
|
10612
10384
|
*
|
|
10613
10385
|
* ```ts
|
|
10614
|
-
* import { Console,
|
|
10386
|
+
* import { Console, Context, Effect } from "effect"
|
|
10615
10387
|
*
|
|
10616
10388
|
* // Define a database connection service
|
|
10617
10389
|
* interface DatabaseConnection {
|
|
@@ -10665,7 +10437,7 @@ export declare const provideServiceEffect: {
|
|
|
10665
10437
|
* **Example** (Usage)
|
|
10666
10438
|
*
|
|
10667
10439
|
* ```ts
|
|
10668
|
-
* import { Console,
|
|
10440
|
+
* import { Console, Context, Effect } from "effect"
|
|
10669
10441
|
*
|
|
10670
10442
|
* // Define a database connection service
|
|
10671
10443
|
* interface DatabaseConnection {
|
|
@@ -10719,7 +10491,7 @@ export declare const provideServiceEffect: {
|
|
|
10719
10491
|
* **Example** (Usage)
|
|
10720
10492
|
*
|
|
10721
10493
|
* ```ts
|
|
10722
|
-
* import { Console,
|
|
10494
|
+
* import { Console, Context, Effect } from "effect"
|
|
10723
10495
|
*
|
|
10724
10496
|
* // Define a database connection service
|
|
10725
10497
|
* interface DatabaseConnection {
|
|
@@ -10790,7 +10562,7 @@ export declare const provideServiceEffect: {
|
|
|
10790
10562
|
* // [1, 2, 3, 4, 5]
|
|
10791
10563
|
* ```
|
|
10792
10564
|
*
|
|
10793
|
-
* @category
|
|
10565
|
+
* @category references
|
|
10794
10566
|
* @since 2.0.0
|
|
10795
10567
|
*/
|
|
10796
10568
|
export declare const withConcurrency: {
|
|
@@ -10823,7 +10595,7 @@ export declare const withConcurrency: {
|
|
|
10823
10595
|
* // [1, 2, 3, 4, 5]
|
|
10824
10596
|
* ```
|
|
10825
10597
|
*
|
|
10826
|
-
* @category
|
|
10598
|
+
* @category references
|
|
10827
10599
|
* @since 2.0.0
|
|
10828
10600
|
*/
|
|
10829
10601
|
(concurrency: number | "unbounded"): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
|
|
@@ -10856,7 +10628,7 @@ export declare const withConcurrency: {
|
|
|
10856
10628
|
* // [1, 2, 3, 4, 5]
|
|
10857
10629
|
* ```
|
|
10858
10630
|
*
|
|
10859
|
-
* @category
|
|
10631
|
+
* @category references
|
|
10860
10632
|
* @since 2.0.0
|
|
10861
10633
|
*/
|
|
10862
10634
|
<A, E, R>(self: Effect<A, E, R>, concurrency: number | "unbounded"): Effect<A, E, R>;
|
|
@@ -10890,7 +10662,7 @@ export declare const withConcurrency: {
|
|
|
10890
10662
|
* // Releasing resource
|
|
10891
10663
|
* ```
|
|
10892
10664
|
*
|
|
10893
|
-
* @category
|
|
10665
|
+
* @category resource management
|
|
10894
10666
|
* @since 2.0.0
|
|
10895
10667
|
*/
|
|
10896
10668
|
export declare const scope: Effect<Scope, never, Scope>;
|
|
@@ -10923,7 +10695,7 @@ export declare const scope: Effect<Scope, never, Scope>;
|
|
|
10923
10695
|
* // Output: "Releasing resource"
|
|
10924
10696
|
* ```
|
|
10925
10697
|
*
|
|
10926
|
-
* @category
|
|
10698
|
+
* @category resource management
|
|
10927
10699
|
* @since 2.0.0
|
|
10928
10700
|
*/
|
|
10929
10701
|
export declare const scoped: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, Scope>>;
|
|
@@ -10963,8 +10735,8 @@ export declare const scoped: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Ex
|
|
|
10963
10735
|
* // Manual finalizer
|
|
10964
10736
|
* ```
|
|
10965
10737
|
*
|
|
10966
|
-
* @category
|
|
10967
|
-
* @since
|
|
10738
|
+
* @category resource management
|
|
10739
|
+
* @since 3.11.0
|
|
10968
10740
|
*/
|
|
10969
10741
|
export declare const scopedWith: <A, E, R>(f: (scope: Scope) => Effect<A, E, R>) => Effect<A, E, R>;
|
|
10970
10742
|
/**
|
|
@@ -11018,7 +10790,7 @@ export declare const scopedWith: <A, E, R>(f: (scope: Scope) => Effect<A, E, R>)
|
|
|
11018
10790
|
* )
|
|
11019
10791
|
* ```
|
|
11020
10792
|
*
|
|
11021
|
-
* @category
|
|
10793
|
+
* @category resource management
|
|
11022
10794
|
* @since 2.0.0
|
|
11023
10795
|
*/
|
|
11024
10796
|
export declare const acquireRelease: <A, E, R, R2>(acquire: Effect<A, E, R>, release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect<unknown, never, R2>, options?: {
|
|
@@ -11037,13 +10809,13 @@ export declare const acquireRelease: <A, E, R, R2>(acquire: Effect<A, E, R>, rel
|
|
|
11037
10809
|
* JavaScript disposal protocal instead of requiring an explicit release
|
|
11038
10810
|
* function.
|
|
11039
10811
|
*
|
|
11040
|
-
* @see
|
|
10812
|
+
* @see [JavaScript `using` declarations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/using)
|
|
11041
10813
|
*
|
|
11042
10814
|
* **Example** (Usage)
|
|
11043
10815
|
*
|
|
11044
10816
|
* ```ts
|
|
11045
10817
|
* import sqlite from "node:sqlite";
|
|
11046
|
-
* import { Effect } from "effect"
|
|
10818
|
+
* import { Effect } from "effect"
|
|
11047
10819
|
*
|
|
11048
10820
|
* const program = Effect.scoped(
|
|
11049
10821
|
* Effect.gen(function* () {
|
|
@@ -11059,7 +10831,7 @@ export declare const acquireRelease: <A, E, R, R2>(acquire: Effect<A, E, R>, rel
|
|
|
11059
10831
|
* )
|
|
11060
10832
|
* ```
|
|
11061
10833
|
*
|
|
11062
|
-
* @category
|
|
10834
|
+
* @category resource management
|
|
11063
10835
|
* @since 4.0.0
|
|
11064
10836
|
*/
|
|
11065
10837
|
export declare const acquireDisposable: <A extends AsyncDisposable | Disposable, E, R>(acquire: Effect<A, E, R>) => Effect<A, E, R | Scope>;
|
|
@@ -11132,7 +10904,7 @@ export declare const acquireDisposable: <A extends AsyncDisposable | Disposable,
|
|
|
11132
10904
|
* // Closing connection to db://localhost:5432 (success)
|
|
11133
10905
|
* ```
|
|
11134
10906
|
*
|
|
11135
|
-
* @category
|
|
10907
|
+
* @category resource management
|
|
11136
10908
|
* @since 2.0.0
|
|
11137
10909
|
*/
|
|
11138
10910
|
export declare const acquireUseRelease: <Resource, E, R, A, E2, R2, E3, R3>(acquire: Effect<Resource, E, R>, use: (a: Resource) => Effect<A, E2, R2>, release: (a: Resource, exit: Exit.Exit<A, E2>) => Effect<void, E3, R3>) => Effect<A, E | E2 | E3, R | R2 | R3>;
|
|
@@ -11175,7 +10947,7 @@ export declare const acquireUseRelease: <Resource, E, R, A, E2, R2, E3, R3>(acqu
|
|
|
11175
10947
|
* // operation result
|
|
11176
10948
|
* ```
|
|
11177
10949
|
*
|
|
11178
|
-
* @category
|
|
10950
|
+
* @category resource management
|
|
11179
10951
|
* @since 2.0.0
|
|
11180
10952
|
*/
|
|
11181
10953
|
export declare const addFinalizer: <R>(finalizer: (exit: Exit.Exit<unknown, unknown>) => Effect<void, never, R>) => Effect<void, never, R | Scope>;
|
|
@@ -11216,7 +10988,7 @@ export declare const addFinalizer: <R>(finalizer: (exit: Exit.Exit<unknown, unkn
|
|
|
11216
10988
|
* // 42
|
|
11217
10989
|
* ```
|
|
11218
10990
|
*
|
|
11219
|
-
* @category
|
|
10991
|
+
* @category resource management
|
|
11220
10992
|
* @since 2.0.0
|
|
11221
10993
|
*/
|
|
11222
10994
|
export declare const ensuring: {
|
|
@@ -11257,7 +11029,7 @@ export declare const ensuring: {
|
|
|
11257
11029
|
* // 42
|
|
11258
11030
|
* ```
|
|
11259
11031
|
*
|
|
11260
|
-
* @category
|
|
11032
|
+
* @category resource management
|
|
11261
11033
|
* @since 2.0.0
|
|
11262
11034
|
*/
|
|
11263
11035
|
<X, R1>(finalizer: Effect<X, never, R1>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R1 | R>;
|
|
@@ -11298,7 +11070,7 @@ export declare const ensuring: {
|
|
|
11298
11070
|
* // 42
|
|
11299
11071
|
* ```
|
|
11300
11072
|
*
|
|
11301
|
-
* @category
|
|
11073
|
+
* @category resource management
|
|
11302
11074
|
* @since 2.0.0
|
|
11303
11075
|
*/
|
|
11304
11076
|
<A, E, R, X, R1>(self: Effect<A, E, R>, finalizer: Effect<X, never, R1>): Effect<A, E, R1 | R>;
|
|
@@ -11310,7 +11082,7 @@ export declare const ensuring: {
|
|
|
11310
11082
|
* **Example** (Usage)
|
|
11311
11083
|
*
|
|
11312
11084
|
* ```ts
|
|
11313
|
-
* import { Cause,
|
|
11085
|
+
* import { Cause, Console, Data, Effect } from "effect"
|
|
11314
11086
|
*
|
|
11315
11087
|
* class TaskError extends Data.TaggedError("TaskError")<{ readonly message: string }> {}
|
|
11316
11088
|
*
|
|
@@ -11327,7 +11099,7 @@ export declare const ensuring: {
|
|
|
11327
11099
|
* // TaskError: Something went wrong
|
|
11328
11100
|
* ```
|
|
11329
11101
|
*
|
|
11330
|
-
* @category
|
|
11102
|
+
* @category resource management
|
|
11331
11103
|
* @since 2.0.0
|
|
11332
11104
|
*/
|
|
11333
11105
|
export declare const onError: {
|
|
@@ -11338,7 +11110,7 @@ export declare const onError: {
|
|
|
11338
11110
|
* **Example** (Usage)
|
|
11339
11111
|
*
|
|
11340
11112
|
* ```ts
|
|
11341
|
-
* import { Cause,
|
|
11113
|
+
* import { Cause, Console, Data, Effect } from "effect"
|
|
11342
11114
|
*
|
|
11343
11115
|
* class TaskError extends Data.TaggedError("TaskError")<{ readonly message: string }> {}
|
|
11344
11116
|
*
|
|
@@ -11355,7 +11127,7 @@ export declare const onError: {
|
|
|
11355
11127
|
* // TaskError: Something went wrong
|
|
11356
11128
|
* ```
|
|
11357
11129
|
*
|
|
11358
|
-
* @category
|
|
11130
|
+
* @category resource management
|
|
11359
11131
|
* @since 2.0.0
|
|
11360
11132
|
*/
|
|
11361
11133
|
<E, X, R2>(cleanup: (cause: Cause.Cause<E>) => Effect<X, never, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E, R2 | R>;
|
|
@@ -11366,7 +11138,7 @@ export declare const onError: {
|
|
|
11366
11138
|
* **Example** (Usage)
|
|
11367
11139
|
*
|
|
11368
11140
|
* ```ts
|
|
11369
|
-
* import { Cause,
|
|
11141
|
+
* import { Cause, Console, Data, Effect } from "effect"
|
|
11370
11142
|
*
|
|
11371
11143
|
* class TaskError extends Data.TaggedError("TaskError")<{ readonly message: string }> {}
|
|
11372
11144
|
*
|
|
@@ -11383,7 +11155,7 @@ export declare const onError: {
|
|
|
11383
11155
|
* // TaskError: Something went wrong
|
|
11384
11156
|
* ```
|
|
11385
11157
|
*
|
|
11386
|
-
* @category
|
|
11158
|
+
* @category resource management
|
|
11387
11159
|
* @since 2.0.0
|
|
11388
11160
|
*/
|
|
11389
11161
|
<A, E, R, X, R2>(self: Effect<A, E, R>, cleanup: (cause: Cause.Cause<E>) => Effect<X, never, R2>): Effect<A, E, R2 | R>;
|
|
@@ -11409,7 +11181,7 @@ export declare const onError: {
|
|
|
11409
11181
|
* )
|
|
11410
11182
|
* ```
|
|
11411
11183
|
*
|
|
11412
|
-
* @category
|
|
11184
|
+
* @category resource management
|
|
11413
11185
|
* @since 4.0.0
|
|
11414
11186
|
*/
|
|
11415
11187
|
export declare const onErrorIf: {
|
|
@@ -11434,7 +11206,7 @@ export declare const onErrorIf: {
|
|
|
11434
11206
|
* )
|
|
11435
11207
|
* ```
|
|
11436
11208
|
*
|
|
11437
|
-
* @category
|
|
11209
|
+
* @category resource management
|
|
11438
11210
|
* @since 4.0.0
|
|
11439
11211
|
*/
|
|
11440
11212
|
<E, XE, XR>(predicate: Predicate.Predicate<Cause.Cause<E>>, f: (cause: Cause.Cause<E>) => Effect<void, XE, XR>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | XE, R | XR>;
|
|
@@ -11459,7 +11231,7 @@ export declare const onErrorIf: {
|
|
|
11459
11231
|
* )
|
|
11460
11232
|
* ```
|
|
11461
11233
|
*
|
|
11462
|
-
* @category
|
|
11234
|
+
* @category resource management
|
|
11463
11235
|
* @since 4.0.0
|
|
11464
11236
|
*/
|
|
11465
11237
|
<A, E, R, XE, XR>(self: Effect<A, E, R>, predicate: Predicate.Predicate<Cause.Cause<E>>, f: (cause: Cause.Cause<E>) => Effect<void, XE, XR>): Effect<A, E | XE, R | XR>;
|
|
@@ -11467,21 +11239,21 @@ export declare const onErrorIf: {
|
|
|
11467
11239
|
/**
|
|
11468
11240
|
* Runs the finalizer only when this effect fails and the cause matches the provided `Filter`.
|
|
11469
11241
|
*
|
|
11470
|
-
* @category
|
|
11242
|
+
* @category resource management
|
|
11471
11243
|
* @since 4.0.0
|
|
11472
11244
|
*/
|
|
11473
11245
|
export declare const onErrorFilter: {
|
|
11474
11246
|
/**
|
|
11475
11247
|
* Runs the finalizer only when this effect fails and the cause matches the provided `Filter`.
|
|
11476
11248
|
*
|
|
11477
|
-
* @category
|
|
11249
|
+
* @category resource management
|
|
11478
11250
|
* @since 4.0.0
|
|
11479
11251
|
*/
|
|
11480
11252
|
<A, E, EB, X, XE, XR>(filter: Filter.Filter<Cause.Cause<E>, EB, X>, f: (failure: EB, cause: Cause.Cause<E>) => Effect<void, XE, XR>): <R>(self: Effect<A, E, R>) => Effect<A, E | XE, R | XR>;
|
|
11481
11253
|
/**
|
|
11482
11254
|
* Runs the finalizer only when this effect fails and the cause matches the provided `Filter`.
|
|
11483
11255
|
*
|
|
11484
|
-
* @category
|
|
11256
|
+
* @category resource management
|
|
11485
11257
|
* @since 4.0.0
|
|
11486
11258
|
*/
|
|
11487
11259
|
<A, E, R, EB, X, XE, XR>(self: Effect<A, E, R>, filter: Filter.Filter<Cause.Cause<E>, EB, X>, f: (failure: EB, cause: Cause.Cause<E>) => Effect<void, XE, XR>): Effect<A, E | XE, R | XR>;
|
|
@@ -11495,8 +11267,8 @@ export declare const onErrorFilter: {
|
|
|
11495
11267
|
* This low-level operator preserves the source effect's result unless the
|
|
11496
11268
|
* finalizer fails. Prefer `onExit` for normal cleanup logic.
|
|
11497
11269
|
*
|
|
11498
|
-
* @category
|
|
11499
|
-
* @since
|
|
11270
|
+
* @category resource management
|
|
11271
|
+
* @since 4.0.0
|
|
11500
11272
|
*/
|
|
11501
11273
|
export declare const onExitPrimitive: <A, E, R, XE = never, XR = never>(self: Effect<A, E, R>, f: (exit: Exit.Exit<A, E>) => Effect<void, XE, XR> | undefined, interruptible?: boolean) => Effect<A, E | XE, R | XR>;
|
|
11502
11274
|
/**
|
|
@@ -11523,7 +11295,7 @@ export declare const onExitPrimitive: <A, E, R, XE = never, XR = never>(self: Ef
|
|
|
11523
11295
|
* // 42
|
|
11524
11296
|
* ```
|
|
11525
11297
|
*
|
|
11526
|
-
* @category
|
|
11298
|
+
* @category resource management
|
|
11527
11299
|
* @since 2.0.0
|
|
11528
11300
|
*/
|
|
11529
11301
|
export declare const onExit: {
|
|
@@ -11551,7 +11323,7 @@ export declare const onExit: {
|
|
|
11551
11323
|
* // 42
|
|
11552
11324
|
* ```
|
|
11553
11325
|
*
|
|
11554
|
-
* @category
|
|
11326
|
+
* @category resource management
|
|
11555
11327
|
* @since 2.0.0
|
|
11556
11328
|
*/
|
|
11557
11329
|
<A, E, XE = never, XR = never>(f: (exit: Exit.Exit<A, E>) => Effect<void, XE, XR>): <R>(self: Effect<A, E, R>) => Effect<A, E | XE, R | XR>;
|
|
@@ -11579,7 +11351,7 @@ export declare const onExit: {
|
|
|
11579
11351
|
* // 42
|
|
11580
11352
|
* ```
|
|
11581
11353
|
*
|
|
11582
|
-
* @category
|
|
11354
|
+
* @category resource management
|
|
11583
11355
|
* @since 2.0.0
|
|
11584
11356
|
*/
|
|
11585
11357
|
<A, E, R, XE = never, XR = never>(self: Effect<A, E, R>, f: (exit: Exit.Exit<A, E>) => Effect<void, XE, XR>): Effect<A, E | XE, R | XR>;
|
|
@@ -11603,7 +11375,7 @@ export declare const onExit: {
|
|
|
11603
11375
|
* )
|
|
11604
11376
|
* ```
|
|
11605
11377
|
*
|
|
11606
|
-
* @category
|
|
11378
|
+
* @category resource management
|
|
11607
11379
|
* @since 4.0.0
|
|
11608
11380
|
*/
|
|
11609
11381
|
export declare const onExitIf: {
|
|
@@ -11626,7 +11398,7 @@ export declare const onExitIf: {
|
|
|
11626
11398
|
* )
|
|
11627
11399
|
* ```
|
|
11628
11400
|
*
|
|
11629
|
-
* @category
|
|
11401
|
+
* @category resource management
|
|
11630
11402
|
* @since 4.0.0
|
|
11631
11403
|
*/
|
|
11632
11404
|
<A, E, XE, XR>(predicate: Predicate.Predicate<Exit.Exit<NoInfer<A>, NoInfer<E>>>, f: (exit: Exit.Exit<NoInfer<A>, NoInfer<E>>) => Effect<void, XE, XR>): <R>(self: Effect<A, E, R>) => Effect<A, E | XE, R | XR>;
|
|
@@ -11649,7 +11421,7 @@ export declare const onExitIf: {
|
|
|
11649
11421
|
* )
|
|
11650
11422
|
* ```
|
|
11651
11423
|
*
|
|
11652
|
-
* @category
|
|
11424
|
+
* @category resource management
|
|
11653
11425
|
* @since 4.0.0
|
|
11654
11426
|
*/
|
|
11655
11427
|
<A, E, R, XE, XR>(self: Effect<A, E, R>, predicate: Predicate.Predicate<Exit.Exit<NoInfer<A>, NoInfer<E>>>, f: (exit: Exit.Exit<NoInfer<A>, NoInfer<E>>) => Effect<void, XE, XR>): Effect<A, E | XE, R | XR>;
|
|
@@ -11657,21 +11429,21 @@ export declare const onExitIf: {
|
|
|
11657
11429
|
/**
|
|
11658
11430
|
* Runs the cleanup effect only when the `Exit` matches the provided `Filter`.
|
|
11659
11431
|
*
|
|
11660
|
-
* @category
|
|
11432
|
+
* @category resource management
|
|
11661
11433
|
* @since 4.0.0
|
|
11662
11434
|
*/
|
|
11663
11435
|
export declare const onExitFilter: {
|
|
11664
11436
|
/**
|
|
11665
11437
|
* Runs the cleanup effect only when the `Exit` matches the provided `Filter`.
|
|
11666
11438
|
*
|
|
11667
|
-
* @category
|
|
11439
|
+
* @category resource management
|
|
11668
11440
|
* @since 4.0.0
|
|
11669
11441
|
*/
|
|
11670
11442
|
<A, E, XE, XR, B, X>(filter: Filter.Filter<Exit.Exit<NoInfer<A>, NoInfer<E>>, B, X>, f: (b: B, exit: Exit.Exit<NoInfer<A>, NoInfer<E>>) => Effect<void, XE, XR>): <R>(self: Effect<A, E, R>) => Effect<A, E | XE, R | XR>;
|
|
11671
11443
|
/**
|
|
11672
11444
|
* Runs the cleanup effect only when the `Exit` matches the provided `Filter`.
|
|
11673
11445
|
*
|
|
11674
|
-
* @category
|
|
11446
|
+
* @category resource management
|
|
11675
11447
|
* @since 4.0.0
|
|
11676
11448
|
*/
|
|
11677
11449
|
<A, E, R, XE, XR, B, X>(self: Effect<A, E, R>, filter: Filter.Filter<Exit.Exit<NoInfer<A>, NoInfer<E>>, B, X>, f: (b: B, exit: Exit.Exit<NoInfer<A>, NoInfer<E>>) => Effect<void, XE, XR>): Effect<A, E | XE, R | XR>;
|
|
@@ -12376,7 +12148,6 @@ export declare const abortSignal: Effect<AbortSignal, never, Scope>;
|
|
|
12376
12148
|
/**
|
|
12377
12149
|
* Type helpers for repeating effects.
|
|
12378
12150
|
*
|
|
12379
|
-
* @category Repetition / Recursion
|
|
12380
12151
|
* @since 2.0.0
|
|
12381
12152
|
*/
|
|
12382
12153
|
export declare namespace Repeat {
|
|
@@ -12479,9 +12250,7 @@ export declare const forever: <Arg extends Effect<any, any, any> | {
|
|
|
12479
12250
|
*
|
|
12480
12251
|
* ```ts
|
|
12481
12252
|
* // Success Example
|
|
12482
|
-
* import { Effect } from "effect"
|
|
12483
|
-
* import { Schedule } from "effect"
|
|
12484
|
-
* import { Console } from "effect"
|
|
12253
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
12485
12254
|
*
|
|
12486
12255
|
* const action = Console.log("success")
|
|
12487
12256
|
* const policy = Schedule.addDelay(Schedule.recurs(2), () => Effect.succeed("100 millis"))
|
|
@@ -12494,8 +12263,7 @@ export declare const forever: <Arg extends Effect<any, any, any> | {
|
|
|
12494
12263
|
*
|
|
12495
12264
|
* ```ts
|
|
12496
12265
|
* // Failure Example
|
|
12497
|
-
* import { Effect } from "effect"
|
|
12498
|
-
* import { Schedule } from "effect"
|
|
12266
|
+
* import { Effect, Schedule } from "effect"
|
|
12499
12267
|
*
|
|
12500
12268
|
* let count = 0
|
|
12501
12269
|
*
|
|
@@ -12547,9 +12315,7 @@ export declare const repeat: {
|
|
|
12547
12315
|
*
|
|
12548
12316
|
* ```ts
|
|
12549
12317
|
* // Success Example
|
|
12550
|
-
* import { Effect } from "effect"
|
|
12551
|
-
* import { Schedule } from "effect"
|
|
12552
|
-
* import { Console } from "effect"
|
|
12318
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
12553
12319
|
*
|
|
12554
12320
|
* const action = Console.log("success")
|
|
12555
12321
|
* const policy = Schedule.addDelay(Schedule.recurs(2), () => Effect.succeed("100 millis"))
|
|
@@ -12562,8 +12328,7 @@ export declare const repeat: {
|
|
|
12562
12328
|
*
|
|
12563
12329
|
* ```ts
|
|
12564
12330
|
* // Failure Example
|
|
12565
|
-
* import { Effect } from "effect"
|
|
12566
|
-
* import { Schedule } from "effect"
|
|
12331
|
+
* import { Effect, Schedule } from "effect"
|
|
12567
12332
|
*
|
|
12568
12333
|
* let count = 0
|
|
12569
12334
|
*
|
|
@@ -12615,9 +12380,7 @@ export declare const repeat: {
|
|
|
12615
12380
|
*
|
|
12616
12381
|
* ```ts
|
|
12617
12382
|
* // Success Example
|
|
12618
|
-
* import { Effect } from "effect"
|
|
12619
|
-
* import { Schedule } from "effect"
|
|
12620
|
-
* import { Console } from "effect"
|
|
12383
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
12621
12384
|
*
|
|
12622
12385
|
* const action = Console.log("success")
|
|
12623
12386
|
* const policy = Schedule.addDelay(Schedule.recurs(2), () => Effect.succeed("100 millis"))
|
|
@@ -12630,8 +12393,7 @@ export declare const repeat: {
|
|
|
12630
12393
|
*
|
|
12631
12394
|
* ```ts
|
|
12632
12395
|
* // Failure Example
|
|
12633
|
-
* import { Effect } from "effect"
|
|
12634
|
-
* import { Schedule } from "effect"
|
|
12396
|
+
* import { Effect, Schedule } from "effect"
|
|
12635
12397
|
*
|
|
12636
12398
|
* let count = 0
|
|
12637
12399
|
*
|
|
@@ -12683,9 +12445,7 @@ export declare const repeat: {
|
|
|
12683
12445
|
*
|
|
12684
12446
|
* ```ts
|
|
12685
12447
|
* // Success Example
|
|
12686
|
-
* import { Effect } from "effect"
|
|
12687
|
-
* import { Schedule } from "effect"
|
|
12688
|
-
* import { Console } from "effect"
|
|
12448
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
12689
12449
|
*
|
|
12690
12450
|
* const action = Console.log("success")
|
|
12691
12451
|
* const policy = Schedule.addDelay(Schedule.recurs(2), () => Effect.succeed("100 millis"))
|
|
@@ -12698,8 +12458,7 @@ export declare const repeat: {
|
|
|
12698
12458
|
*
|
|
12699
12459
|
* ```ts
|
|
12700
12460
|
* // Failure Example
|
|
12701
|
-
* import { Effect } from "effect"
|
|
12702
|
-
* import { Schedule } from "effect"
|
|
12461
|
+
* import { Effect, Schedule } from "effect"
|
|
12703
12462
|
*
|
|
12704
12463
|
* let count = 0
|
|
12705
12464
|
*
|
|
@@ -12751,9 +12510,7 @@ export declare const repeat: {
|
|
|
12751
12510
|
*
|
|
12752
12511
|
* ```ts
|
|
12753
12512
|
* // Success Example
|
|
12754
|
-
* import { Effect } from "effect"
|
|
12755
|
-
* import { Schedule } from "effect"
|
|
12756
|
-
* import { Console } from "effect"
|
|
12513
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
12757
12514
|
*
|
|
12758
12515
|
* const action = Console.log("success")
|
|
12759
12516
|
* const policy = Schedule.addDelay(Schedule.recurs(2), () => Effect.succeed("100 millis"))
|
|
@@ -12766,8 +12523,7 @@ export declare const repeat: {
|
|
|
12766
12523
|
*
|
|
12767
12524
|
* ```ts
|
|
12768
12525
|
* // Failure Example
|
|
12769
|
-
* import { Effect } from "effect"
|
|
12770
|
-
* import { Schedule } from "effect"
|
|
12526
|
+
* import { Effect, Schedule } from "effect"
|
|
12771
12527
|
*
|
|
12772
12528
|
* let count = 0
|
|
12773
12529
|
*
|
|
@@ -12819,9 +12575,7 @@ export declare const repeat: {
|
|
|
12819
12575
|
*
|
|
12820
12576
|
* ```ts
|
|
12821
12577
|
* // Success Example
|
|
12822
|
-
* import { Effect } from "effect"
|
|
12823
|
-
* import { Schedule } from "effect"
|
|
12824
|
-
* import { Console } from "effect"
|
|
12578
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
12825
12579
|
*
|
|
12826
12580
|
* const action = Console.log("success")
|
|
12827
12581
|
* const policy = Schedule.addDelay(Schedule.recurs(2), () => Effect.succeed("100 millis"))
|
|
@@ -12834,8 +12588,7 @@ export declare const repeat: {
|
|
|
12834
12588
|
*
|
|
12835
12589
|
* ```ts
|
|
12836
12590
|
* // Failure Example
|
|
12837
|
-
* import { Effect } from "effect"
|
|
12838
|
-
* import { Schedule } from "effect"
|
|
12591
|
+
* import { Effect, Schedule } from "effect"
|
|
12839
12592
|
*
|
|
12840
12593
|
* let count = 0
|
|
12841
12594
|
*
|
|
@@ -12887,9 +12640,7 @@ export declare const repeat: {
|
|
|
12887
12640
|
*
|
|
12888
12641
|
* ```ts
|
|
12889
12642
|
* // Success Example
|
|
12890
|
-
* import { Effect } from "effect"
|
|
12891
|
-
* import { Schedule } from "effect"
|
|
12892
|
-
* import { Console } from "effect"
|
|
12643
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
12893
12644
|
*
|
|
12894
12645
|
* const action = Console.log("success")
|
|
12895
12646
|
* const policy = Schedule.addDelay(Schedule.recurs(2), () => Effect.succeed("100 millis"))
|
|
@@ -12902,8 +12653,7 @@ export declare const repeat: {
|
|
|
12902
12653
|
*
|
|
12903
12654
|
* ```ts
|
|
12904
12655
|
* // Failure Example
|
|
12905
|
-
* import { Effect } from "effect"
|
|
12906
|
-
* import { Schedule } from "effect"
|
|
12656
|
+
* import { Effect, Schedule } from "effect"
|
|
12907
12657
|
*
|
|
12908
12658
|
* let count = 0
|
|
12909
12659
|
*
|
|
@@ -12944,8 +12694,7 @@ export declare const repeat: {
|
|
|
12944
12694
|
* **Example** (Usage)
|
|
12945
12695
|
*
|
|
12946
12696
|
* ```ts
|
|
12947
|
-
* import { Console, Effect, Schedule } from "effect"
|
|
12948
|
-
* import * as Option from "effect/Option"
|
|
12697
|
+
* import { Console, Effect, Option, Schedule } from "effect"
|
|
12949
12698
|
*
|
|
12950
12699
|
* let attempt = 0
|
|
12951
12700
|
* const task = Effect.gen(function*() {
|
|
@@ -12988,8 +12737,7 @@ export declare const repeatOrElse: {
|
|
|
12988
12737
|
* **Example** (Usage)
|
|
12989
12738
|
*
|
|
12990
12739
|
* ```ts
|
|
12991
|
-
* import { Console, Effect, Schedule } from "effect"
|
|
12992
|
-
* import * as Option from "effect/Option"
|
|
12740
|
+
* import { Console, Effect, Option, Schedule } from "effect"
|
|
12993
12741
|
*
|
|
12994
12742
|
* let attempt = 0
|
|
12995
12743
|
* const task = Effect.gen(function*() {
|
|
@@ -13032,8 +12780,7 @@ export declare const repeatOrElse: {
|
|
|
13032
12780
|
* **Example** (Usage)
|
|
13033
12781
|
*
|
|
13034
12782
|
* ```ts
|
|
13035
|
-
* import { Console, Effect, Schedule } from "effect"
|
|
13036
|
-
* import * as Option from "effect/Option"
|
|
12783
|
+
* import { Console, Effect, Option, Schedule } from "effect"
|
|
13037
12784
|
*
|
|
13038
12785
|
* let attempt = 0
|
|
13039
12786
|
* const task = Effect.gen(function*() {
|
|
@@ -13464,7 +13211,7 @@ export declare const scheduleFrom: {
|
|
|
13464
13211
|
* })
|
|
13465
13212
|
* ```
|
|
13466
13213
|
*
|
|
13467
|
-
* @category
|
|
13214
|
+
* @category tracing
|
|
13468
13215
|
* @since 2.0.0
|
|
13469
13216
|
*/
|
|
13470
13217
|
export declare const tracer: Effect<Tracer>;
|
|
@@ -13485,7 +13232,7 @@ export declare const tracer: Effect<Tracer>;
|
|
|
13485
13232
|
* // const traced = Effect.withTracer(program, customTracer)
|
|
13486
13233
|
* ```
|
|
13487
13234
|
*
|
|
13488
|
-
* @category
|
|
13235
|
+
* @category tracing
|
|
13489
13236
|
* @since 2.0.0
|
|
13490
13237
|
*/
|
|
13491
13238
|
export declare const withTracer: {
|
|
@@ -13506,7 +13253,7 @@ export declare const withTracer: {
|
|
|
13506
13253
|
* // const traced = Effect.withTracer(program, customTracer)
|
|
13507
13254
|
* ```
|
|
13508
13255
|
*
|
|
13509
|
-
* @category
|
|
13256
|
+
* @category tracing
|
|
13510
13257
|
* @since 2.0.0
|
|
13511
13258
|
*/
|
|
13512
13259
|
(value: Tracer): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
|
|
@@ -13527,7 +13274,7 @@ export declare const withTracer: {
|
|
|
13527
13274
|
* // const traced = Effect.withTracer(program, customTracer)
|
|
13528
13275
|
* ```
|
|
13529
13276
|
*
|
|
13530
|
-
* @category
|
|
13277
|
+
* @category tracing
|
|
13531
13278
|
* @since 2.0.0
|
|
13532
13279
|
*/
|
|
13533
13280
|
<A, E, R>(effect: Effect<A, E, R>, value: Tracer): Effect<A, E, R>;
|
|
@@ -13552,7 +13299,7 @@ export declare const withTracer: {
|
|
|
13552
13299
|
* )
|
|
13553
13300
|
* ```
|
|
13554
13301
|
*
|
|
13555
|
-
* @category
|
|
13302
|
+
* @category tracing
|
|
13556
13303
|
* @since 2.0.0
|
|
13557
13304
|
*/
|
|
13558
13305
|
export declare const withTracerEnabled: {
|
|
@@ -13576,7 +13323,7 @@ export declare const withTracerEnabled: {
|
|
|
13576
13323
|
* )
|
|
13577
13324
|
* ```
|
|
13578
13325
|
*
|
|
13579
|
-
* @category
|
|
13326
|
+
* @category tracing
|
|
13580
13327
|
* @since 2.0.0
|
|
13581
13328
|
*/
|
|
13582
13329
|
(enabled: boolean): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
|
|
@@ -13600,7 +13347,7 @@ export declare const withTracerEnabled: {
|
|
|
13600
13347
|
* )
|
|
13601
13348
|
* ```
|
|
13602
13349
|
*
|
|
13603
|
-
* @category
|
|
13350
|
+
* @category tracing
|
|
13604
13351
|
* @since 2.0.0
|
|
13605
13352
|
*/
|
|
13606
13353
|
<A, E, R>(effect: Effect<A, E, R>, enabled: boolean): Effect<A, E, R>;
|
|
@@ -13620,7 +13367,7 @@ export declare const withTracerEnabled: {
|
|
|
13620
13367
|
* )
|
|
13621
13368
|
* ```
|
|
13622
13369
|
*
|
|
13623
|
-
* @category
|
|
13370
|
+
* @category tracing
|
|
13624
13371
|
* @since 2.0.0
|
|
13625
13372
|
*/
|
|
13626
13373
|
export declare const withTracerTiming: {
|
|
@@ -13639,7 +13386,7 @@ export declare const withTracerTiming: {
|
|
|
13639
13386
|
* )
|
|
13640
13387
|
* ```
|
|
13641
13388
|
*
|
|
13642
|
-
* @category
|
|
13389
|
+
* @category tracing
|
|
13643
13390
|
* @since 2.0.0
|
|
13644
13391
|
*/
|
|
13645
13392
|
(enabled: boolean): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
|
|
@@ -13658,7 +13405,7 @@ export declare const withTracerTiming: {
|
|
|
13658
13405
|
* )
|
|
13659
13406
|
* ```
|
|
13660
13407
|
*
|
|
13661
|
-
* @category
|
|
13408
|
+
* @category tracing
|
|
13662
13409
|
* @since 2.0.0
|
|
13663
13410
|
*/
|
|
13664
13411
|
<A, E, R>(effect: Effect<A, E, R>, enabled: boolean): Effect<A, E, R>;
|
|
@@ -13687,7 +13434,7 @@ export declare const withTracerTiming: {
|
|
|
13687
13434
|
* })
|
|
13688
13435
|
* ```
|
|
13689
13436
|
*
|
|
13690
|
-
* @category
|
|
13437
|
+
* @category tracing
|
|
13691
13438
|
* @since 2.0.0
|
|
13692
13439
|
*/
|
|
13693
13440
|
export declare const annotateSpans: {
|
|
@@ -13715,7 +13462,7 @@ export declare const annotateSpans: {
|
|
|
13715
13462
|
* })
|
|
13716
13463
|
* ```
|
|
13717
13464
|
*
|
|
13718
|
-
* @category
|
|
13465
|
+
* @category tracing
|
|
13719
13466
|
* @since 2.0.0
|
|
13720
13467
|
*/
|
|
13721
13468
|
(key: string, value: unknown): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
|
|
@@ -13743,7 +13490,7 @@ export declare const annotateSpans: {
|
|
|
13743
13490
|
* })
|
|
13744
13491
|
* ```
|
|
13745
13492
|
*
|
|
13746
|
-
* @category
|
|
13493
|
+
* @category tracing
|
|
13747
13494
|
* @since 2.0.0
|
|
13748
13495
|
*/
|
|
13749
13496
|
(values: Record<string, unknown>): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
|
|
@@ -13771,7 +13518,7 @@ export declare const annotateSpans: {
|
|
|
13771
13518
|
* })
|
|
13772
13519
|
* ```
|
|
13773
13520
|
*
|
|
13774
|
-
* @category
|
|
13521
|
+
* @category tracing
|
|
13775
13522
|
* @since 2.0.0
|
|
13776
13523
|
*/
|
|
13777
13524
|
<A, E, R>(effect: Effect<A, E, R>, key: string, value: unknown): Effect<A, E, R>;
|
|
@@ -13799,7 +13546,7 @@ export declare const annotateSpans: {
|
|
|
13799
13546
|
* })
|
|
13800
13547
|
* ```
|
|
13801
13548
|
*
|
|
13802
|
-
* @category
|
|
13549
|
+
* @category tracing
|
|
13803
13550
|
* @since 2.0.0
|
|
13804
13551
|
*/
|
|
13805
13552
|
<A, E, R>(effect: Effect<A, E, R>, values: Record<string, unknown>): Effect<A, E, R>;
|
|
@@ -13825,7 +13572,7 @@ export declare const annotateSpans: {
|
|
|
13825
13572
|
* const traced = Effect.withSpan(program, "user-operation")
|
|
13826
13573
|
* ```
|
|
13827
13574
|
*
|
|
13828
|
-
* @category
|
|
13575
|
+
* @category tracing
|
|
13829
13576
|
* @since 2.0.0
|
|
13830
13577
|
*/
|
|
13831
13578
|
export declare const annotateCurrentSpan: {
|
|
@@ -13850,7 +13597,7 @@ export declare const annotateCurrentSpan: {
|
|
|
13850
13597
|
* const traced = Effect.withSpan(program, "user-operation")
|
|
13851
13598
|
* ```
|
|
13852
13599
|
*
|
|
13853
|
-
* @category
|
|
13600
|
+
* @category tracing
|
|
13854
13601
|
* @since 2.0.0
|
|
13855
13602
|
*/
|
|
13856
13603
|
(key: string, value: unknown): Effect<void>;
|
|
@@ -13875,7 +13622,7 @@ export declare const annotateCurrentSpan: {
|
|
|
13875
13622
|
* const traced = Effect.withSpan(program, "user-operation")
|
|
13876
13623
|
* ```
|
|
13877
13624
|
*
|
|
13878
|
-
* @category
|
|
13625
|
+
* @category tracing
|
|
13879
13626
|
* @since 2.0.0
|
|
13880
13627
|
*/
|
|
13881
13628
|
(values: Record<string, unknown>): Effect<void>;
|
|
@@ -13902,7 +13649,7 @@ export declare const annotateCurrentSpan: {
|
|
|
13902
13649
|
* const traced = Effect.withSpan(program, "my-span")
|
|
13903
13650
|
* ```
|
|
13904
13651
|
*
|
|
13905
|
-
* @category
|
|
13652
|
+
* @category tracing
|
|
13906
13653
|
* @since 2.0.0
|
|
13907
13654
|
*/
|
|
13908
13655
|
export declare const currentSpan: Effect<Span, Cause.NoSuchElementError>;
|
|
@@ -13934,7 +13681,7 @@ export declare const currentSpan: Effect<Span, Cause.NoSuchElementError>;
|
|
|
13934
13681
|
* const traced = Effect.withSpan(program, "parent-span")
|
|
13935
13682
|
* ```
|
|
13936
13683
|
*
|
|
13937
|
-
* @category
|
|
13684
|
+
* @category tracing
|
|
13938
13685
|
* @since 2.0.0
|
|
13939
13686
|
*/
|
|
13940
13687
|
export declare const currentParentSpan: Effect<AnySpan, Cause.NoSuchElementError>;
|
|
@@ -13967,7 +13714,7 @@ export declare const currentParentSpan: Effect<AnySpan, Cause.NoSuchElementError
|
|
|
13967
13714
|
* // Output: Current span annotations: { userId: "123", operation: "data-processing" }
|
|
13968
13715
|
* ```
|
|
13969
13716
|
*
|
|
13970
|
-
* @category
|
|
13717
|
+
* @category tracing
|
|
13971
13718
|
* @since 2.0.0
|
|
13972
13719
|
*/
|
|
13973
13720
|
export declare const spanAnnotations: Effect<Readonly<Record<string, unknown>>>;
|
|
@@ -13992,7 +13739,7 @@ export declare const spanAnnotations: Effect<Readonly<Record<string, unknown>>>;
|
|
|
13992
13739
|
* })
|
|
13993
13740
|
* ```
|
|
13994
13741
|
*
|
|
13995
|
-
* @category
|
|
13742
|
+
* @category tracing
|
|
13996
13743
|
* @since 2.0.0
|
|
13997
13744
|
*/
|
|
13998
13745
|
export declare const spanLinks: Effect<ReadonlyArray<SpanLink>>;
|
|
@@ -14045,7 +13792,7 @@ export declare const spanLinks: Effect<ReadonlyArray<SpanLink>>;
|
|
|
14045
13792
|
* })
|
|
14046
13793
|
* ```
|
|
14047
13794
|
*
|
|
14048
|
-
* @category
|
|
13795
|
+
* @category tracing
|
|
14049
13796
|
* @since 2.0.0
|
|
14050
13797
|
*/
|
|
14051
13798
|
export declare const linkSpans: {
|
|
@@ -14098,7 +13845,7 @@ export declare const linkSpans: {
|
|
|
14098
13845
|
* })
|
|
14099
13846
|
* ```
|
|
14100
13847
|
*
|
|
14101
|
-
* @category
|
|
13848
|
+
* @category tracing
|
|
14102
13849
|
* @since 2.0.0
|
|
14103
13850
|
*/
|
|
14104
13851
|
(span: AnySpan | ReadonlyArray<AnySpan>, attributes?: Record<string, unknown>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
|
|
@@ -14151,7 +13898,7 @@ export declare const linkSpans: {
|
|
|
14151
13898
|
* })
|
|
14152
13899
|
* ```
|
|
14153
13900
|
*
|
|
14154
|
-
* @category
|
|
13901
|
+
* @category tracing
|
|
14155
13902
|
* @since 2.0.0
|
|
14156
13903
|
*/
|
|
14157
13904
|
<A, E, R>(self: Effect<A, E, R>, span: AnySpan | ReadonlyArray<AnySpan>, attributes?: Record<string, unknown>): Effect<A, E, R>;
|
|
@@ -14177,7 +13924,7 @@ export declare const linkSpans: {
|
|
|
14177
13924
|
* })
|
|
14178
13925
|
* ```
|
|
14179
13926
|
*
|
|
14180
|
-
* @category
|
|
13927
|
+
* @category tracing
|
|
14181
13928
|
* @since 2.0.0
|
|
14182
13929
|
*/
|
|
14183
13930
|
export declare const makeSpan: (name: string, options?: SpanOptionsNoTrace) => Effect<Span>;
|
|
@@ -14203,7 +13950,7 @@ export declare const makeSpan: (name: string, options?: SpanOptionsNoTrace) => E
|
|
|
14203
13950
|
* )
|
|
14204
13951
|
* ```
|
|
14205
13952
|
*
|
|
14206
|
-
* @category
|
|
13953
|
+
* @category tracing
|
|
14207
13954
|
* @since 2.0.0
|
|
14208
13955
|
*/
|
|
14209
13956
|
export declare const makeSpanScoped: (name: string, options?: SpanOptionsNoTrace | undefined) => Effect<Span, never, Scope>;
|
|
@@ -14229,7 +13976,7 @@ export declare const makeSpanScoped: (name: string, options?: SpanOptionsNoTrace
|
|
|
14229
13976
|
* )
|
|
14230
13977
|
* ```
|
|
14231
13978
|
*
|
|
14232
|
-
* @category
|
|
13979
|
+
* @category tracing
|
|
14233
13980
|
* @since 2.0.0
|
|
14234
13981
|
*/
|
|
14235
13982
|
export declare const useSpan: {
|
|
@@ -14255,7 +14002,7 @@ export declare const useSpan: {
|
|
|
14255
14002
|
* )
|
|
14256
14003
|
* ```
|
|
14257
14004
|
*
|
|
14258
|
-
* @category
|
|
14005
|
+
* @category tracing
|
|
14259
14006
|
* @since 2.0.0
|
|
14260
14007
|
*/
|
|
14261
14008
|
<A, E, R>(name: string, evaluate: (span: Span) => Effect<A, E, R>): Effect<A, E, R>;
|
|
@@ -14281,7 +14028,7 @@ export declare const useSpan: {
|
|
|
14281
14028
|
* )
|
|
14282
14029
|
* ```
|
|
14283
14030
|
*
|
|
14284
|
-
* @category
|
|
14031
|
+
* @category tracing
|
|
14285
14032
|
* @since 2.0.0
|
|
14286
14033
|
*/
|
|
14287
14034
|
<A, E, R>(name: string, options: SpanOptionsNoTrace, evaluate: (span: Span) => Effect<A, E, R>): Effect<A, E, R>;
|
|
@@ -14304,7 +14051,7 @@ export declare const useSpan: {
|
|
|
14304
14051
|
* })
|
|
14305
14052
|
* ```
|
|
14306
14053
|
*
|
|
14307
|
-
* @category
|
|
14054
|
+
* @category tracing
|
|
14308
14055
|
* @since 2.0.0
|
|
14309
14056
|
*/
|
|
14310
14057
|
export declare const withSpan: {
|
|
@@ -14326,7 +14073,7 @@ export declare const withSpan: {
|
|
|
14326
14073
|
* })
|
|
14327
14074
|
* ```
|
|
14328
14075
|
*
|
|
14329
|
-
* @category
|
|
14076
|
+
* @category tracing
|
|
14330
14077
|
* @since 2.0.0
|
|
14331
14078
|
*/
|
|
14332
14079
|
<Args extends ReadonlyArray<any>>(name: string, options?: SpanOptionsNoTrace | ((...args: NoInfer<Args>) => SpanOptionsNoTrace) | undefined, traceOptions?: TraceOptions | undefined): <A, E, R>(self: Effect<A, E, R>, ...args: Args) => Effect<A, E, Exclude<R, ParentSpan>>;
|
|
@@ -14348,7 +14095,7 @@ export declare const withSpan: {
|
|
|
14348
14095
|
* })
|
|
14349
14096
|
* ```
|
|
14350
14097
|
*
|
|
14351
|
-
* @category
|
|
14098
|
+
* @category tracing
|
|
14352
14099
|
* @since 2.0.0
|
|
14353
14100
|
*/
|
|
14354
14101
|
<A, E, R>(self: Effect<A, E, R>, name: string, options?: SpanOptions | undefined): Effect<A, E, Exclude<R, ParentSpan>>;
|
|
@@ -14372,7 +14119,7 @@ export declare const withSpan: {
|
|
|
14372
14119
|
* )
|
|
14373
14120
|
* ```
|
|
14374
14121
|
*
|
|
14375
|
-
* @category
|
|
14122
|
+
* @category tracing
|
|
14376
14123
|
* @since 2.0.0
|
|
14377
14124
|
*/
|
|
14378
14125
|
export declare const withSpanScoped: {
|
|
@@ -14395,7 +14142,7 @@ export declare const withSpanScoped: {
|
|
|
14395
14142
|
* )
|
|
14396
14143
|
* ```
|
|
14397
14144
|
*
|
|
14398
|
-
* @category
|
|
14145
|
+
* @category tracing
|
|
14399
14146
|
* @since 2.0.0
|
|
14400
14147
|
*/
|
|
14401
14148
|
(name: string, options?: SpanOptions): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, ParentSpan> | Scope>;
|
|
@@ -14418,7 +14165,7 @@ export declare const withSpanScoped: {
|
|
|
14418
14165
|
* )
|
|
14419
14166
|
* ```
|
|
14420
14167
|
*
|
|
14421
|
-
* @category
|
|
14168
|
+
* @category tracing
|
|
14422
14169
|
* @since 2.0.0
|
|
14423
14170
|
*/
|
|
14424
14171
|
<A, E, R>(self: Effect<A, E, R>, name: string, options?: SpanOptions): Effect<A, E, Exclude<R, ParentSpan> | Scope>;
|
|
@@ -14439,7 +14186,7 @@ export declare const withSpanScoped: {
|
|
|
14439
14186
|
* })
|
|
14440
14187
|
* ```
|
|
14441
14188
|
*
|
|
14442
|
-
* @category
|
|
14189
|
+
* @category tracing
|
|
14443
14190
|
* @since 2.0.0
|
|
14444
14191
|
*/
|
|
14445
14192
|
export declare const withParentSpan: {
|
|
@@ -14459,7 +14206,7 @@ export declare const withParentSpan: {
|
|
|
14459
14206
|
* })
|
|
14460
14207
|
* ```
|
|
14461
14208
|
*
|
|
14462
|
-
* @category
|
|
14209
|
+
* @category tracing
|
|
14463
14210
|
* @since 2.0.0
|
|
14464
14211
|
*/
|
|
14465
14212
|
(value: AnySpan, options?: TraceOptions): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, ParentSpan>>;
|
|
@@ -14479,7 +14226,7 @@ export declare const withParentSpan: {
|
|
|
14479
14226
|
* })
|
|
14480
14227
|
* ```
|
|
14481
14228
|
*
|
|
14482
|
-
* @category
|
|
14229
|
+
* @category tracing
|
|
14483
14230
|
* @since 2.0.0
|
|
14484
14231
|
*/
|
|
14485
14232
|
<A, E, R>(self: Effect<A, E, R>, value: AnySpan, options?: TraceOptions): Effect<A, E, Exclude<R, ParentSpan>>;
|
|
@@ -14820,7 +14567,7 @@ export declare const forkScoped: <Arg extends Effect<any, any, any> | {
|
|
|
14820
14567
|
* ```
|
|
14821
14568
|
*
|
|
14822
14569
|
* @category Supervision & Fibers
|
|
14823
|
-
* @since
|
|
14570
|
+
* @since 4.0.0
|
|
14824
14571
|
*/
|
|
14825
14572
|
export declare const forkDetach: <Arg extends Effect<any, any, any> | {
|
|
14826
14573
|
readonly startImmediately?: boolean | undefined;
|
|
@@ -14878,7 +14625,7 @@ export declare const fiber: Effect<Fiber<unknown, unknown>>;
|
|
|
14878
14625
|
* ```
|
|
14879
14626
|
*
|
|
14880
14627
|
* @category Supervision & Fibers
|
|
14881
|
-
* @since
|
|
14628
|
+
* @since 2.0.0
|
|
14882
14629
|
*/
|
|
14883
14630
|
export declare const fiberId: Effect<number>;
|
|
14884
14631
|
/**
|
|
@@ -14910,10 +14657,7 @@ export interface RunOptions {
|
|
|
14910
14657
|
* **Example** (Running an Effect in the Background)
|
|
14911
14658
|
*
|
|
14912
14659
|
* ```ts
|
|
14913
|
-
* import { Effect } from "effect"
|
|
14914
|
-
* import { Schedule } from "effect"
|
|
14915
|
-
* import { Fiber } from "effect"
|
|
14916
|
-
* import { Console } from "effect"
|
|
14660
|
+
* import { Console, Effect, Fiber, Schedule } from "effect"
|
|
14917
14661
|
*
|
|
14918
14662
|
* // ┌─── Effect<number, never, never>
|
|
14919
14663
|
* // ▼
|
|
@@ -14941,7 +14685,7 @@ export declare const runFork: <A, E>(effect: Effect<A, E, never>, options?: RunO
|
|
|
14941
14685
|
* **Example** (Usage)
|
|
14942
14686
|
*
|
|
14943
14687
|
* ```ts
|
|
14944
|
-
* import {
|
|
14688
|
+
* import { Context, Effect } from "effect"
|
|
14945
14689
|
*
|
|
14946
14690
|
* interface Logger {
|
|
14947
14691
|
* log: (message: string) => void
|
|
@@ -14974,7 +14718,7 @@ export declare const runForkWith: <R>(context: Context.Context<R>) => <A, E>(eff
|
|
|
14974
14718
|
* **Example** (Usage)
|
|
14975
14719
|
*
|
|
14976
14720
|
* ```ts
|
|
14977
|
-
* import { Console, Effect, Exit
|
|
14721
|
+
* import { Console, Context, Effect, Exit } from "effect"
|
|
14978
14722
|
*
|
|
14979
14723
|
* interface Logger {
|
|
14980
14724
|
* log: (message: string) => Effect.Effect<void>
|
|
@@ -15046,7 +14790,7 @@ export declare const runCallbackWith: <R>(context: Context.Context<R>) => <A, E>
|
|
|
15046
14790
|
* ```
|
|
15047
14791
|
*
|
|
15048
14792
|
* @category Running Effects
|
|
15049
|
-
* @since
|
|
14793
|
+
* @since 2.0.0
|
|
15050
14794
|
*/
|
|
15051
14795
|
export declare const runCallback: <A, E>(effect: Effect<A, E, never>, options?: (RunOptions & {
|
|
15052
14796
|
readonly onExit: (exit: Exit.Exit<A, E>) => void;
|
|
@@ -15095,7 +14839,7 @@ export declare const runPromise: <A, E>(effect: Effect<A, E>, options?: RunOptio
|
|
|
15095
14839
|
* **Example** (Usage)
|
|
15096
14840
|
*
|
|
15097
14841
|
* ```ts
|
|
15098
|
-
* import {
|
|
14842
|
+
* import { Context, Effect } from "effect"
|
|
15099
14843
|
*
|
|
15100
14844
|
* interface Config {
|
|
15101
14845
|
* apiUrl: string
|
|
@@ -15173,7 +14917,7 @@ export declare const runPromiseExit: <A, E>(effect: Effect<A, E>, options?: RunO
|
|
|
15173
14917
|
* **Example** (Usage)
|
|
15174
14918
|
*
|
|
15175
14919
|
* ```ts
|
|
15176
|
-
* import { Effect, Exit
|
|
14920
|
+
* import { Context, Effect, Exit } from "effect"
|
|
15177
14921
|
*
|
|
15178
14922
|
* interface Database {
|
|
15179
14923
|
* query: (sql: string) => string
|
|
@@ -15268,7 +15012,7 @@ export declare const runSync: <A, E>(effect: Effect<A, E>) => A;
|
|
|
15268
15012
|
* **Example** (Usage)
|
|
15269
15013
|
*
|
|
15270
15014
|
* ```ts
|
|
15271
|
-
* import {
|
|
15015
|
+
* import { Context, Effect } from "effect"
|
|
15272
15016
|
*
|
|
15273
15017
|
* interface MathService {
|
|
15274
15018
|
* add: (a: number, b: number) => number
|
|
@@ -15371,7 +15115,7 @@ export declare const runSyncExit: <A, E>(effect: Effect<A, E>) => Exit.Exit<A, E
|
|
|
15371
15115
|
* **Example** (Usage)
|
|
15372
15116
|
*
|
|
15373
15117
|
* ```ts
|
|
15374
|
-
* import { Effect, Exit
|
|
15118
|
+
* import { Context, Effect, Exit } from "effect"
|
|
15375
15119
|
*
|
|
15376
15120
|
* // Define a logger service
|
|
15377
15121
|
* const Logger = Context.Service<{
|
|
@@ -15410,21 +15154,20 @@ export declare const runSyncExitWith: <R>(context: Context.Context<R>) => <A, E>
|
|
|
15410
15154
|
*
|
|
15411
15155
|
* Use these to describe generator-based signatures and traced or untraced variants.
|
|
15412
15156
|
*
|
|
15413
|
-
* @
|
|
15414
|
-
* @since 3.12.0
|
|
15157
|
+
* @since 3.11.0
|
|
15415
15158
|
*/
|
|
15416
15159
|
export declare namespace fn {
|
|
15417
15160
|
/**
|
|
15418
15161
|
* Generator return type accepted by `Effect.fn` and `Effect.fnUntraced`.
|
|
15419
15162
|
*
|
|
15420
|
-
* @category
|
|
15163
|
+
* @category models
|
|
15421
15164
|
* @since 3.19.0
|
|
15422
15165
|
*/
|
|
15423
15166
|
type Return<A, E = never, R = never> = Generator<Effect<any, E, R>, A, any>;
|
|
15424
15167
|
/**
|
|
15425
15168
|
* Type of the untraced function builder used by `Effect.fnUntraced`.
|
|
15426
15169
|
*
|
|
15427
|
-
* @category
|
|
15170
|
+
* @category models
|
|
15428
15171
|
* @since 3.11.0
|
|
15429
15172
|
*/
|
|
15430
15173
|
type Untraced = {
|
|
@@ -15642,8 +15385,8 @@ export declare namespace fn {
|
|
|
15642
15385
|
/**
|
|
15643
15386
|
* Type of the traced function builder used by `Effect.fn`.
|
|
15644
15387
|
*
|
|
15645
|
-
* @category
|
|
15646
|
-
* @since
|
|
15388
|
+
* @category models
|
|
15389
|
+
* @since 4.0.0
|
|
15647
15390
|
*/
|
|
15648
15391
|
type Traced = {
|
|
15649
15392
|
<Eff extends Effect<any, any, any>, AEff, Args extends Array<any>>(body: (this: unassigned, ...args: Args) => Generator<Eff, AEff, never> | (Eff & Effect<AEff, any, any>)): (...args: Args) => Effect<AEff, [
|
|
@@ -16053,7 +15796,7 @@ export declare const fnUntraced: fn.Untraced;
|
|
|
16053
15796
|
* ```
|
|
16054
15797
|
*
|
|
16055
15798
|
* @category Function
|
|
16056
|
-
* @since 3.
|
|
15799
|
+
* @since 3.11.0
|
|
16057
15800
|
*/
|
|
16058
15801
|
export declare const fn: fn.Traced & {
|
|
16059
15802
|
(name: string, options?: SpanOptionsNoTrace): fn.Traced;
|
|
@@ -16101,7 +15844,7 @@ export declare const clockWith: <A, E, R>(f: (clock: Clock) => Effect<A, E, R>)
|
|
|
16101
15844
|
* })
|
|
16102
15845
|
* ```
|
|
16103
15846
|
*
|
|
16104
|
-
* @category
|
|
15847
|
+
* @category logging
|
|
16105
15848
|
* @since 2.0.0
|
|
16106
15849
|
*/
|
|
16107
15850
|
export declare const logWithLevel: (level?: Severity) => (...message: ReadonlyArray<any>) => Effect<void>;
|
|
@@ -16129,7 +15872,7 @@ export declare const logWithLevel: (level?: Severity) => (...message: ReadonlyAr
|
|
|
16129
15872
|
* // 4
|
|
16130
15873
|
* ```
|
|
16131
15874
|
*
|
|
16132
|
-
* @category
|
|
15875
|
+
* @category logging
|
|
16133
15876
|
* @since 2.0.0
|
|
16134
15877
|
*/
|
|
16135
15878
|
export declare const log: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
@@ -16158,7 +15901,7 @@ export declare const log: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
16158
15901
|
* // timestamp=2023-... level=FATAL message="System shutting down"
|
|
16159
15902
|
* ```
|
|
16160
15903
|
*
|
|
16161
|
-
* @category
|
|
15904
|
+
* @category logging
|
|
16162
15905
|
* @since 2.0.0
|
|
16163
15906
|
*/
|
|
16164
15907
|
export declare const logFatal: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
@@ -16188,7 +15931,7 @@ export declare const logFatal: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
16188
15931
|
* // timestamp=2023-... level=WARN message="Using deprecated API endpoint"
|
|
16189
15932
|
* ```
|
|
16190
15933
|
*
|
|
16191
|
-
* @category
|
|
15934
|
+
* @category logging
|
|
16192
15935
|
* @since 2.0.0
|
|
16193
15936
|
*/
|
|
16194
15937
|
export declare const logWarning: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
@@ -16221,7 +15964,7 @@ export declare const logWarning: (...message: ReadonlyArray<any>) => Effect<void
|
|
|
16221
15964
|
* // timestamp=2023-... level=ERROR message="Caught error: Something went wrong"
|
|
16222
15965
|
* ```
|
|
16223
15966
|
*
|
|
16224
|
-
* @category
|
|
15967
|
+
* @category logging
|
|
16225
15968
|
* @since 2.0.0
|
|
16226
15969
|
*/
|
|
16227
15970
|
export declare const logError: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
@@ -16249,7 +15992,7 @@ export declare const logError: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
16249
15992
|
* // timestamp=2023-... level=INFO message="Application version: 1.2.3"
|
|
16250
15993
|
* ```
|
|
16251
15994
|
*
|
|
16252
|
-
* @category
|
|
15995
|
+
* @category logging
|
|
16253
15996
|
* @since 2.0.0
|
|
16254
15997
|
*/
|
|
16255
15998
|
export declare const logInfo: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
@@ -16278,7 +16021,7 @@ export declare const logInfo: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
16278
16021
|
* // timestamp=2023-... level=DEBUG message="Variable state: x=10 y=20 z=30"
|
|
16279
16022
|
* ```
|
|
16280
16023
|
*
|
|
16281
|
-
* @category
|
|
16024
|
+
* @category logging
|
|
16282
16025
|
* @since 2.0.0
|
|
16283
16026
|
*/
|
|
16284
16027
|
export declare const logDebug: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
@@ -16310,7 +16053,7 @@ export declare const logDebug: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
16310
16053
|
* // timestamp=2023-... level=TRACE message="Exiting function processData"
|
|
16311
16054
|
* ```
|
|
16312
16055
|
*
|
|
16313
|
-
* @category
|
|
16056
|
+
* @category logging
|
|
16314
16057
|
* @since 2.0.0
|
|
16315
16058
|
*/
|
|
16316
16059
|
export declare const logTrace: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
@@ -16339,8 +16082,8 @@ export declare const logTrace: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
16339
16082
|
* // Output includes both default and custom log outputs
|
|
16340
16083
|
* ```
|
|
16341
16084
|
*
|
|
16342
|
-
* @category
|
|
16343
|
-
* @since
|
|
16085
|
+
* @category logging
|
|
16086
|
+
* @since 4.0.0
|
|
16344
16087
|
*/
|
|
16345
16088
|
export declare const withLogger: (<Output>(logger: Logger<unknown, Output>) => <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>) & (<A, E, R, Output>(effect: Effect<A, E, R>, logger: Logger<unknown, Output>) => Effect<A, E, R>);
|
|
16346
16089
|
/**
|
|
@@ -16370,7 +16113,7 @@ export declare const withLogger: (<Output>(logger: Logger<unknown, Output>) => <
|
|
|
16370
16113
|
* // All log messages will include the userId and operation annotations
|
|
16371
16114
|
* ```
|
|
16372
16115
|
*
|
|
16373
|
-
* @category
|
|
16116
|
+
* @category logging
|
|
16374
16117
|
* @since 2.0.0
|
|
16375
16118
|
*/
|
|
16376
16119
|
export declare const annotateLogs: {
|
|
@@ -16403,8 +16146,8 @@ export declare const annotateLogs: {
|
|
|
16403
16146
|
* Effect.runPromise(program)
|
|
16404
16147
|
* ```
|
|
16405
16148
|
*
|
|
16406
|
-
* @category
|
|
16407
|
-
* @since
|
|
16149
|
+
* @category logging
|
|
16150
|
+
* @since 3.1.0
|
|
16408
16151
|
*/
|
|
16409
16152
|
export declare const annotateLogsScoped: {
|
|
16410
16153
|
/**
|
|
@@ -16430,8 +16173,8 @@ export declare const annotateLogsScoped: {
|
|
|
16430
16173
|
* Effect.runPromise(program)
|
|
16431
16174
|
* ```
|
|
16432
16175
|
*
|
|
16433
|
-
* @category
|
|
16434
|
-
* @since
|
|
16176
|
+
* @category logging
|
|
16177
|
+
* @since 3.1.0
|
|
16435
16178
|
*/
|
|
16436
16179
|
(key: string, value: unknown): Effect<void, never, Scope>;
|
|
16437
16180
|
/**
|
|
@@ -16457,8 +16200,8 @@ export declare const annotateLogsScoped: {
|
|
|
16457
16200
|
* Effect.runPromise(program)
|
|
16458
16201
|
* ```
|
|
16459
16202
|
*
|
|
16460
|
-
* @category
|
|
16461
|
-
* @since
|
|
16203
|
+
* @category logging
|
|
16204
|
+
* @since 3.1.0
|
|
16462
16205
|
*/
|
|
16463
16206
|
(values: Record<string, unknown>): Effect<void, never, Scope>;
|
|
16464
16207
|
};
|
|
@@ -16490,7 +16233,7 @@ export declare const annotateLogsScoped: {
|
|
|
16490
16233
|
* // All log messages will include span information showing the nested operation context
|
|
16491
16234
|
* ```
|
|
16492
16235
|
*
|
|
16493
|
-
* @category
|
|
16236
|
+
* @category logging
|
|
16494
16237
|
* @since 2.0.0
|
|
16495
16238
|
*/
|
|
16496
16239
|
export declare const withLogSpan: ((label: string) => <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>) & (<A, E, R>(effect: Effect<A, E, R>, label: string) => Effect<A, E, R>);
|
|
@@ -17850,7 +17593,6 @@ export declare const txRetry: Effect<never, never, Transaction>;
|
|
|
17850
17593
|
/**
|
|
17851
17594
|
* Type helpers for converting callback-based functions into `Effect` functions.
|
|
17852
17595
|
*
|
|
17853
|
-
* @category Effectify
|
|
17854
17596
|
* @since 4.0.0
|
|
17855
17597
|
*/
|
|
17856
17598
|
export declare namespace Effectify {
|