effect 4.0.0-beta.74 → 4.0.0-beta.75
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 +729 -611
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +273 -213
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +37 -30
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +19 -16
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +34 -40
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +16 -16
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +8 -8
- package/dist/Boolean.js +4 -4
- package/dist/Brand.d.ts +13 -11
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +10 -8
- package/dist/Brand.js.map +1 -1
- package/dist/Cause.d.ts +21 -23
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +21 -23
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +219 -9
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +83 -3
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +11 -11
- package/dist/ChannelSchema.js +5 -5
- package/dist/Chunk.d.ts +69 -16
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +43 -8
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +3 -3
- package/dist/Clock.js +3 -3
- package/dist/Combiner.d.ts +9 -13
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +9 -13
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +49 -56
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +40 -43
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +34 -44
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +24 -32
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +2 -2
- package/dist/Console.js +2 -2
- package/dist/Context.d.ts +60 -72
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +28 -32
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +2 -2
- package/dist/Cron.js +2 -2
- package/dist/Crypto.d.ts +4 -4
- package/dist/Crypto.js +4 -4
- package/dist/Data.d.ts +21 -15
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +7 -7
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +35 -16
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +35 -8
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +24 -15
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +8 -5
- package/dist/Deferred.js.map +1 -1
- package/dist/Duration.d.ts +44 -31
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +22 -11
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +516 -416
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +234 -174
- package/dist/Effect.js.map +1 -1
- package/dist/Encoding.d.ts +5 -0
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +5 -0
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +26 -39
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +10 -17
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +71 -99
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +53 -73
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +1 -1
- package/dist/ErrorReporter.js +1 -1
- package/dist/Exit.d.ts +79 -96
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +57 -64
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +8 -6
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +8 -6
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +25 -0
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +15 -0
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +35 -0
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +15 -0
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +20 -0
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +10 -0
- package/dist/FiberSet.js.map +1 -1
- package/dist/Filter.d.ts +4 -4
- package/dist/Filter.js +4 -4
- package/dist/Formatter.d.ts +14 -19
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +14 -19
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +15 -16
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +9 -10
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +2 -2
- package/dist/Graph.js +2 -2
- package/dist/HKT.d.ts +2 -2
- package/dist/Hash.d.ts +2 -1
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +2 -1
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +15 -0
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +5 -0
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +9 -9
- package/dist/HashRing.js +3 -3
- package/dist/Iterable.d.ts +24 -12
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +16 -6
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +2 -3
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +2 -3
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +2 -6
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +2 -6
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +17 -13
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +17 -13
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +4 -3
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +4 -3
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +92 -114
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +38 -46
- package/dist/Layer.js.map +1 -1
- package/dist/Logger.d.ts +11 -14
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +11 -14
- package/dist/Logger.js.map +1 -1
- package/dist/Match.d.ts +2 -2
- package/dist/Match.js +2 -2
- package/dist/Metric.d.ts +89 -109
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +51 -61
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +21 -12
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +7 -4
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableList.d.ts +15 -0
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +15 -0
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +56 -42
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +28 -22
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +10 -7
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +10 -7
- package/dist/Newtype.js.map +1 -1
- package/dist/Number.d.ts +23 -11
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +9 -5
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +16 -16
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +10 -9
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +196 -168
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +96 -79
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +118 -179
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +92 -144
- package/dist/Order.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +14 -14
- package/dist/PartitionedSemaphore.js +6 -6
- package/dist/Path.d.ts +2 -2
- package/dist/Path.js +2 -2
- package/dist/Pipeable.d.ts +2 -2
- package/dist/Pipeable.js +2 -2
- package/dist/PlatformError.d.ts +4 -4
- package/dist/PlatformError.js +4 -4
- package/dist/Pool.d.ts +7 -11
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +3 -5
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +274 -263
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +128 -123
- package/dist/Predicate.js.map +1 -1
- package/dist/PubSub.d.ts +24 -14
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +16 -6
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +4 -4
- package/dist/Pull.js +4 -4
- package/dist/Queue.d.ts +46 -7
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +46 -7
- package/dist/Queue.js.map +1 -1
- package/dist/RcRef.d.ts +0 -4
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js.map +1 -1
- package/dist/Redactable.d.ts +2 -2
- package/dist/Redactable.js +2 -2
- package/dist/Redacted.d.ts +3 -3
- package/dist/Redacted.js +3 -3
- package/dist/Reducer.d.ts +2 -3
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +2 -3
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +17 -16
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +15 -14
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +4 -4
- package/dist/References.js +4 -4
- package/dist/Request.d.ts +18 -18
- package/dist/Request.js +6 -6
- package/dist/Resource.d.ts +2 -2
- package/dist/Resource.js +2 -2
- package/dist/Result.d.ts +77 -33
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +42 -19
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +11 -8
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +11 -8
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +107 -45
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +41 -29
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +6 -4
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +6 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +443 -371
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +518 -427
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +42 -21
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +80 -59
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +126 -106
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +121 -101
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +37 -39
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +16 -17
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +72 -153
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +72 -145
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +30 -21
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +26 -22
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +169 -145
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +183 -159
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.js +2 -2
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +15 -0
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +15 -0
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +1 -1
- package/dist/ScopedCache.js +1 -1
- package/dist/ScopedRef.d.ts +14 -18
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +6 -8
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +9 -9
- package/dist/Semaphore.js +3 -3
- package/dist/Sink.d.ts +13 -13
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +9 -9
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +4 -5
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +4 -5
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +321 -44
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +137 -22
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +6 -9
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +2 -3
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +15 -13
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +11 -9
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +24 -19
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +12 -7
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +88 -63
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +32 -23
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Tracer.d.ts +4 -4
- package/dist/Tracer.js +4 -4
- package/dist/Trie.d.ts +15 -0
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +5 -0
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +25 -19
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +17 -13
- package/dist/Tuple.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +6 -3
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +2 -1
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +16 -16
- package/dist/TxRef.js +8 -8
- package/dist/TxSubscriptionRef.d.ts +43 -27
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +19 -13
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +12 -38
- package/dist/Types.d.ts.map +1 -1
- package/dist/Types.js +0 -2
- package/dist/UndefinedOr.d.ts +15 -14
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +11 -10
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +2 -2
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/arbitrary.js +9 -9
- package/dist/internal/schema/arbitrary.js.map +1 -1
- package/dist/internal/schema/equivalence.js +9 -9
- package/dist/internal/schema/equivalence.js.map +1 -1
- package/dist/internal/schema/representation.js +14 -14
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/internal/schema/schema.js +11 -11
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +10 -10
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +9 -9
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +4 -2
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +4 -2
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +17 -20
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +36 -39
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +4 -5
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +4 -5
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +4 -4
- package/dist/unstable/ai/EmbeddingModel.js +4 -4
- package/dist/unstable/ai/IdGenerator.d.ts +2 -3
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +2 -3
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +3 -2
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +5 -4
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +14 -12
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +19 -17
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +11 -4
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +8 -5
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +20 -18
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +45 -43
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +2 -2
- package/dist/unstable/ai/Prompt.js +3 -3
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +3 -2
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +3 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +21 -6
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +7 -2
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +7 -6
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +8 -7
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +2 -2
- package/dist/unstable/ai/Toolkit.js +2 -2
- package/dist/unstable/cli/Command.d.ts +37 -16
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +15 -8
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +1 -1
- package/dist/unstable/cli/Completions.js +1 -1
- package/dist/unstable/cli/Flag.d.ts +7 -6
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +7 -6
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +6 -1
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +7 -2
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +3 -3
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +13 -10
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -2
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +3 -2
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +1 -2
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +5 -0
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +5 -0
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +3 -3
- package/dist/unstable/cluster/ClusterSchema.js +3 -3
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +15 -15
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +10 -0
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +10 -0
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +2 -2
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +2 -2
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +2 -2
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +12 -12
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +2 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +2 -1
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +2 -2
- package/dist/unstable/cluster/RunnerServer.js +2 -2
- package/dist/unstable/cluster/Runners.d.ts +3 -3
- package/dist/unstable/cluster/Runners.js +3 -3
- package/dist/unstable/cluster/ShardId.js +3 -3
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +3 -3
- package/dist/unstable/cluster/Sharding.js +3 -3
- package/dist/unstable/cluster/ShardingConfig.d.ts +4 -4
- package/dist/unstable/cluster/ShardingConfig.js +4 -4
- package/dist/unstable/cluster/Snowflake.d.ts +1 -1
- package/dist/unstable/cluster/Snowflake.js +3 -3
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +2 -2
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +2 -2
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +5 -5
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +5 -0
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +5 -0
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +2 -2
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +2 -2
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +2 -1
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +2 -1
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +10 -0
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +10 -0
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +3 -3
- package/dist/unstable/eventlog/EventLog.js +3 -3
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +2 -3
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +2 -3
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +5 -7
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +5 -7
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +4 -4
- package/dist/unstable/eventlog/EventLogSessionAuth.js +4 -4
- package/dist/unstable/http/Cookies.js +4 -4
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +2 -3
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +2 -3
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/Headers.js +2 -2
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.js +2 -2
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +2 -2
- package/dist/unstable/http/HttpClient.js +2 -2
- package/dist/unstable/http/HttpClientRequest.d.ts +30 -3
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +10 -1
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +1 -1
- package/dist/unstable/http/HttpRouter.js +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +25 -20
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +13 -8
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/Multipart.js +3 -3
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +30 -0
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +16 -6
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +3 -2
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +3 -2
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +10 -8
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +15 -15
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +3 -3
- package/dist/unstable/httpapi/HttpApiMiddleware.js +3 -3
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +9 -9
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +11 -11
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +5 -0
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +5 -0
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +4 -2
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +4 -2
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +3 -3
- package/dist/unstable/reactivity/Atom.js +3 -3
- package/dist/unstable/rpc/RpcSchema.d.ts +2 -2
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +2 -2
- package/dist/unstable/rpc/RpcSerialization.js +2 -2
- package/dist/unstable/schema/Model.js +5 -5
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +2 -2
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +4 -4
- package/dist/unstable/sql/SqlSchema.js +4 -4
- package/dist/unstable/workers/Transferable.d.ts +2 -2
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +5 -5
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +7 -7
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +1 -2
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +1 -2
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +35 -15
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +94 -72
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +10 -2
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +16 -8
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +2 -4
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +9 -11
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +7 -7
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +729 -611
- package/src/BigDecimal.ts +37 -30
- package/src/BigInt.ts +34 -40
- package/src/Boolean.ts +8 -8
- package/src/Brand.ts +16 -14
- package/src/Cause.ts +21 -23
- package/src/Channel.ts +249 -9
- package/src/ChannelSchema.ts +11 -11
- package/src/Chunk.ts +69 -16
- package/src/Clock.ts +3 -3
- package/src/Combiner.ts +9 -13
- package/src/Config.ts +60 -67
- package/src/ConfigProvider.ts +34 -44
- package/src/Console.ts +2 -2
- package/src/Context.ts +60 -72
- package/src/Cron.ts +2 -2
- package/src/Crypto.ts +4 -4
- package/src/Data.ts +21 -15
- package/src/DateTime.ts +35 -16
- package/src/Deferred.ts +24 -15
- package/src/Duration.ts +44 -31
- package/src/Effect.ts +516 -416
- package/src/Encoding.ts +5 -0
- package/src/Equal.ts +26 -39
- package/src/Equivalence.ts +71 -99
- package/src/ErrorReporter.ts +1 -1
- package/src/Exit.ts +79 -96
- package/src/Fiber.ts +8 -6
- package/src/FiberHandle.ts +25 -0
- package/src/FiberMap.ts +35 -0
- package/src/FiberSet.ts +20 -0
- package/src/Filter.ts +4 -4
- package/src/Formatter.ts +14 -19
- package/src/Function.ts +15 -16
- package/src/Graph.ts +2 -2
- package/src/HKT.ts +2 -2
- package/src/Hash.ts +2 -1
- package/src/HashMap.ts +15 -0
- package/src/HashRing.ts +9 -9
- package/src/Iterable.ts +24 -12
- package/src/JsonPatch.ts +2 -3
- package/src/JsonPointer.ts +2 -6
- package/src/JsonSchema.ts +17 -13
- package/src/Latch.ts +4 -3
- package/src/Layer.ts +92 -114
- package/src/Logger.ts +15 -18
- package/src/Match.ts +2 -2
- package/src/Metric.ts +109 -137
- package/src/MutableHashMap.ts +35 -20
- package/src/MutableList.ts +15 -0
- package/src/MutableRef.ts +56 -42
- package/src/Newtype.ts +10 -7
- package/src/Number.ts +23 -11
- package/src/Optic.ts +25 -22
- package/src/Option.ts +196 -168
- package/src/Order.ts +118 -179
- package/src/PartitionedSemaphore.ts +14 -14
- package/src/Path.ts +2 -2
- package/src/Pipeable.ts +2 -2
- package/src/PlatformError.ts +4 -4
- package/src/Pool.ts +7 -11
- package/src/Predicate.ts +274 -263
- package/src/PubSub.ts +24 -14
- package/src/Pull.ts +4 -4
- package/src/Queue.ts +46 -7
- package/src/RcRef.ts +0 -4
- package/src/Redactable.ts +2 -2
- package/src/Redacted.ts +3 -3
- package/src/Reducer.ts +2 -3
- package/src/Ref.ts +43 -40
- package/src/References.ts +4 -4
- package/src/Request.ts +18 -18
- package/src/Resource.ts +2 -2
- package/src/Result.ts +87 -33
- package/src/Runtime.ts +11 -8
- package/src/Schedule.ts +112 -45
- package/src/Scheduler.ts +6 -4
- package/src/Schema.ts +843 -649
- package/src/SchemaAST.ts +148 -117
- package/src/SchemaGetter.ts +142 -121
- package/src/SchemaIssue.ts +39 -41
- package/src/SchemaParser.ts +173 -229
- package/src/SchemaRepresentation.ts +38 -28
- package/src/SchemaTransformation.ts +233 -207
- package/src/SchemaUtils.ts +2 -2
- package/src/Scope.ts +15 -0
- package/src/ScopedCache.ts +1 -1
- package/src/ScopedRef.ts +14 -18
- package/src/Semaphore.ts +9 -9
- package/src/Sink.ts +13 -13
- package/src/Stdio.ts +4 -5
- package/src/Stream.ts +354 -57
- package/src/String.ts +6 -9
- package/src/Struct.ts +15 -13
- package/src/SubscriptionRef.ts +24 -19
- package/src/SynchronizedRef.ts +88 -63
- package/src/Tracer.ts +4 -4
- package/src/Trie.ts +15 -0
- package/src/Tuple.ts +25 -19
- package/src/TxReentrantLock.ts +6 -3
- package/src/TxRef.ts +16 -16
- package/src/TxSubscriptionRef.ts +43 -27
- package/src/Types.ts +12 -39
- package/src/UndefinedOr.ts +15 -14
- package/src/Unify.ts +2 -2
- package/src/internal/schema/annotations.ts +4 -4
- package/src/internal/schema/arbitrary.ts +16 -16
- package/src/internal/schema/equivalence.ts +11 -11
- package/src/internal/schema/representation.ts +23 -23
- package/src/internal/schema/schema.ts +17 -17
- package/src/testing/TestSchema.ts +20 -20
- package/src/unstable/ai/AiError.ts +4 -2
- package/src/unstable/ai/AnthropicStructuredOutput.ts +59 -56
- package/src/unstable/ai/Chat.ts +4 -5
- package/src/unstable/ai/EmbeddingModel.ts +4 -4
- package/src/unstable/ai/IdGenerator.ts +2 -3
- package/src/unstable/ai/LanguageModel.ts +5 -4
- package/src/unstable/ai/McpSchema.ts +19 -17
- package/src/unstable/ai/McpServer.ts +14 -7
- package/src/unstable/ai/OpenAiStructuredOutput.ts +72 -61
- package/src/unstable/ai/Prompt.ts +5 -5
- package/src/unstable/ai/ResponseIdTracker.ts +3 -2
- package/src/unstable/ai/Telemetry.ts +21 -6
- package/src/unstable/ai/Tool.ts +11 -10
- package/src/unstable/ai/Toolkit.ts +2 -2
- package/src/unstable/cli/Command.ts +37 -16
- package/src/unstable/cli/Completions.ts +1 -1
- package/src/unstable/cli/Flag.ts +7 -6
- package/src/unstable/cli/GlobalFlag.ts +7 -1
- package/src/unstable/cli/Param.ts +23 -18
- package/src/unstable/cli/Primitive.ts +3 -2
- package/src/unstable/cluster/ClusterCron.ts +1 -2
- package/src/unstable/cluster/ClusterMetrics.ts +5 -0
- package/src/unstable/cluster/ClusterSchema.ts +3 -3
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +15 -15
- package/src/unstable/cluster/EntityResource.ts +10 -0
- package/src/unstable/cluster/Envelope.ts +3 -3
- package/src/unstable/cluster/Reply.ts +14 -12
- package/src/unstable/cluster/RunnerHealth.ts +2 -1
- package/src/unstable/cluster/RunnerServer.ts +2 -2
- package/src/unstable/cluster/Runners.ts +3 -3
- package/src/unstable/cluster/ShardId.ts +3 -3
- package/src/unstable/cluster/Sharding.ts +3 -3
- package/src/unstable/cluster/ShardingConfig.ts +4 -4
- package/src/unstable/cluster/Snowflake.ts +3 -3
- package/src/unstable/cluster/internal/entityManager.ts +2 -2
- package/src/unstable/encoding/Msgpack.ts +6 -6
- package/src/unstable/encoding/Ndjson.ts +5 -0
- package/src/unstable/encoding/Sse.ts +2 -2
- package/src/unstable/eventlog/EventGroup.ts +2 -1
- package/src/unstable/eventlog/EventJournal.ts +10 -0
- package/src/unstable/eventlog/EventLog.ts +3 -3
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +2 -3
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +5 -7
- package/src/unstable/eventlog/EventLogSessionAuth.ts +4 -4
- package/src/unstable/http/Cookies.ts +4 -4
- package/src/unstable/http/Etag.ts +2 -3
- package/src/unstable/http/Headers.ts +2 -2
- package/src/unstable/http/HttpBody.ts +2 -2
- package/src/unstable/http/HttpClient.ts +2 -2
- package/src/unstable/http/HttpClientRequest.ts +30 -3
- package/src/unstable/http/HttpRouter.ts +1 -1
- package/src/unstable/http/HttpServerResponse.ts +25 -20
- package/src/unstable/http/Multipart.ts +3 -3
- package/src/unstable/http/UrlParams.ts +36 -6
- package/src/unstable/httpapi/HttpApi.ts +5 -4
- package/src/unstable/httpapi/HttpApiBuilder.ts +14 -13
- package/src/unstable/httpapi/HttpApiClient.ts +16 -16
- package/src/unstable/httpapi/HttpApiMiddleware.ts +3 -3
- package/src/unstable/httpapi/HttpApiSchema.ts +15 -15
- package/src/unstable/httpapi/OpenApi.ts +18 -18
- package/src/unstable/observability/OtlpResource.ts +5 -0
- package/src/unstable/observability/PrometheusMetrics.ts +4 -2
- package/src/unstable/reactivity/Atom.ts +3 -3
- package/src/unstable/rpc/RpcSchema.ts +2 -2
- package/src/unstable/rpc/RpcSerialization.ts +2 -2
- package/src/unstable/schema/Model.ts +5 -5
- package/src/unstable/schema/VariantSchema.ts +2 -2
- package/src/unstable/sql/SqlSchema.ts +4 -4
- package/src/unstable/workers/Transferable.ts +6 -6
- package/src/unstable/workflow/DurableDeferred.ts +7 -7
- package/src/unstable/workflow/DurableQueue.ts +1 -2
- package/src/unstable/workflow/Workflow.ts +159 -114
- package/src/unstable/workflow/WorkflowEngine.ts +16 -8
- package/src/unstable/workflow/WorkflowProxy.ts +9 -11
- package/src/unstable/workflow/WorkflowProxyServer.ts +7 -7
package/dist/Effect.d.ts
CHANGED
|
@@ -482,10 +482,8 @@ export declare const all: <const Arg extends Iterable<Effect<any, any, any>> | R
|
|
|
482
482
|
*
|
|
483
483
|
* **Details**
|
|
484
484
|
*
|
|
485
|
-
* The returned tuple is `[excluded, satisfying]`, where
|
|
486
|
-
*
|
|
487
|
-
* - `excluded` contains all failures.
|
|
488
|
-
* - `satisfying` contains all successes.
|
|
485
|
+
* The returned tuple is `[excluded, satisfying]`, where `excluded` contains
|
|
486
|
+
* all failures and `satisfying` contains all successes.
|
|
489
487
|
*
|
|
490
488
|
* This function runs every effect and never fails. Use `concurrency` to control
|
|
491
489
|
* parallelism.
|
|
@@ -513,10 +511,8 @@ export declare const partition: {
|
|
|
513
511
|
*
|
|
514
512
|
* **Details**
|
|
515
513
|
*
|
|
516
|
-
* The returned tuple is `[excluded, satisfying]`, where
|
|
517
|
-
*
|
|
518
|
-
* - `excluded` contains all failures.
|
|
519
|
-
* - `satisfying` contains all successes.
|
|
514
|
+
* The returned tuple is `[excluded, satisfying]`, where `excluded` contains
|
|
515
|
+
* all failures and `satisfying` contains all successes.
|
|
520
516
|
*
|
|
521
517
|
* This function runs every effect and never fails. Use `concurrency` to control
|
|
522
518
|
* parallelism.
|
|
@@ -546,10 +542,8 @@ export declare const partition: {
|
|
|
546
542
|
*
|
|
547
543
|
* **Details**
|
|
548
544
|
*
|
|
549
|
-
* The returned tuple is `[excluded, satisfying]`, where
|
|
550
|
-
*
|
|
551
|
-
* - `excluded` contains all failures.
|
|
552
|
-
* - `satisfying` contains all successes.
|
|
545
|
+
* The returned tuple is `[excluded, satisfying]`, where `excluded` contains
|
|
546
|
+
* all failures and `satisfying` contains all successes.
|
|
553
547
|
*
|
|
554
548
|
* This function runs every effect and never fails. Use `concurrency` to control
|
|
555
549
|
* parallelism.
|
|
@@ -1296,8 +1290,8 @@ export declare const tryPromise: <A, E = Cause.UnknownError>(options: {
|
|
|
1296
1290
|
*
|
|
1297
1291
|
* **When to use**
|
|
1298
1292
|
*
|
|
1299
|
-
* Use when
|
|
1300
|
-
*
|
|
1293
|
+
* Use when an effect should complete successfully with a specific value without any errors
|
|
1294
|
+
* or external dependencies.
|
|
1301
1295
|
*
|
|
1302
1296
|
* **Example** (Creating a successful effect)
|
|
1303
1297
|
*
|
|
@@ -1357,14 +1351,16 @@ export declare const succeedSome: <A>(value: A) => Effect<Option<A>>;
|
|
|
1357
1351
|
*
|
|
1358
1352
|
* **When to use**
|
|
1359
1353
|
*
|
|
1360
|
-
* Use when you need to defer the evaluation of an effect until it is required.
|
|
1354
|
+
* Use when you need to defer the evaluation of an effect until it is required.
|
|
1361
1355
|
*
|
|
1362
1356
|
* **Details**
|
|
1363
1357
|
*
|
|
1364
|
-
* `suspend` takes a thunk that represents
|
|
1365
|
-
*
|
|
1366
|
-
*
|
|
1367
|
-
*
|
|
1358
|
+
* `suspend` takes a thunk that represents an effect and delays creating it
|
|
1359
|
+
* until the suspended effect is evaluated. This is useful for optimizing
|
|
1360
|
+
* expensive computations, managing circular dependencies such as recursive
|
|
1361
|
+
* functions, and helping TypeScript unify return types when branches construct
|
|
1362
|
+
* different effects. Any side effects or scoped captures inside the thunk are
|
|
1363
|
+
* re-executed on each invocation.
|
|
1368
1364
|
*
|
|
1369
1365
|
* **Example** (Lazily evaluating side effects)
|
|
1370
1366
|
*
|
|
@@ -1444,7 +1440,8 @@ export declare const suspend: <A, E, R>(effect: LazyArg<Effect<A, E, R>>) => Eff
|
|
|
1444
1440
|
*
|
|
1445
1441
|
* **When to use**
|
|
1446
1442
|
*
|
|
1447
|
-
* Use when you
|
|
1443
|
+
* Use when you need to wrap a synchronous side-effectful operation that is not
|
|
1444
|
+
* expected to throw.
|
|
1448
1445
|
*
|
|
1449
1446
|
* **Details**
|
|
1450
1447
|
*
|
|
@@ -1498,8 +1495,8 @@ undefined_ as undefined };
|
|
|
1498
1495
|
*
|
|
1499
1496
|
* **When to use**
|
|
1500
1497
|
*
|
|
1501
|
-
* Use when
|
|
1502
|
-
*
|
|
1498
|
+
* Use when you need to integrate APIs that complete through callbacks instead
|
|
1499
|
+
* of returning a `Promise`.
|
|
1503
1500
|
*
|
|
1504
1501
|
* **Details**
|
|
1505
1502
|
*
|
|
@@ -1745,14 +1742,13 @@ export declare const bind: {
|
|
|
1745
1742
|
*
|
|
1746
1743
|
* **When to use**
|
|
1747
1744
|
*
|
|
1748
|
-
* Use when
|
|
1749
|
-
* code,
|
|
1750
|
-
*
|
|
1751
|
-
* and easier to manage.
|
|
1745
|
+
* Use when you want to write effectful code that looks and behaves like
|
|
1746
|
+
* synchronous code, while still handling asynchronous tasks, errors, and complex
|
|
1747
|
+
* control flow such as loops and conditions.
|
|
1752
1748
|
*
|
|
1753
|
-
*
|
|
1754
|
-
*
|
|
1755
|
-
* effects and return the final result at the end.
|
|
1749
|
+
* Generator functions work similarly to `async/await` but keep errors,
|
|
1750
|
+
* requirements, and interruption in the Effect type. You can `yield*` values
|
|
1751
|
+
* from effects and return the final result at the end.
|
|
1756
1752
|
*
|
|
1757
1753
|
* **Example** (Sequencing effects with generators)
|
|
1758
1754
|
*
|
|
@@ -1797,14 +1793,13 @@ export declare const gen: {
|
|
|
1797
1793
|
*
|
|
1798
1794
|
* **When to use**
|
|
1799
1795
|
*
|
|
1800
|
-
* Use when
|
|
1801
|
-
* code,
|
|
1802
|
-
*
|
|
1803
|
-
* and easier to manage.
|
|
1796
|
+
* Use when you want to write effectful code that looks and behaves like
|
|
1797
|
+
* synchronous code, while still handling asynchronous tasks, errors, and complex
|
|
1798
|
+
* control flow such as loops and conditions.
|
|
1804
1799
|
*
|
|
1805
|
-
*
|
|
1806
|
-
*
|
|
1807
|
-
* effects and return the final result at the end.
|
|
1800
|
+
* Generator functions work similarly to `async/await` but keep errors,
|
|
1801
|
+
* requirements, and interruption in the Effect type. You can `yield*` values
|
|
1802
|
+
* from effects and return the final result at the end.
|
|
1808
1803
|
*
|
|
1809
1804
|
* **Example** (Sequencing effects with generators)
|
|
1810
1805
|
*
|
|
@@ -1853,14 +1848,13 @@ export declare const gen: {
|
|
|
1853
1848
|
*
|
|
1854
1849
|
* **When to use**
|
|
1855
1850
|
*
|
|
1856
|
-
* Use when
|
|
1857
|
-
* code,
|
|
1858
|
-
*
|
|
1859
|
-
* and easier to manage.
|
|
1851
|
+
* Use when you want to write effectful code that looks and behaves like
|
|
1852
|
+
* synchronous code, while still handling asynchronous tasks, errors, and complex
|
|
1853
|
+
* control flow such as loops and conditions.
|
|
1860
1854
|
*
|
|
1861
|
-
*
|
|
1862
|
-
*
|
|
1863
|
-
* effects and return the final result at the end.
|
|
1855
|
+
* Generator functions work similarly to `async/await` but keep errors,
|
|
1856
|
+
* requirements, and interruption in the Effect type. You can `yield*` values
|
|
1857
|
+
* from effects and return the final result at the end.
|
|
1864
1858
|
*
|
|
1865
1859
|
* **Example** (Sequencing effects with generators)
|
|
1866
1860
|
*
|
|
@@ -1925,9 +1919,12 @@ export declare namespace gen {
|
|
|
1925
1919
|
*
|
|
1926
1920
|
* **When to use**
|
|
1927
1921
|
*
|
|
1928
|
-
* Use to explicitly signal
|
|
1929
|
-
*
|
|
1930
|
-
*
|
|
1922
|
+
* Use to explicitly signal a recoverable error in an `Effect`.
|
|
1923
|
+
*
|
|
1924
|
+
* **Details**
|
|
1925
|
+
*
|
|
1926
|
+
* The error keeps propagating unless it is handled. You can handle tagged
|
|
1927
|
+
* errors with functions like {@link catchTag} or {@link catchTags}.
|
|
1931
1928
|
*
|
|
1932
1929
|
* **Example** (Creating a failed effect)
|
|
1933
1930
|
*
|
|
@@ -1979,6 +1976,12 @@ export declare const failSync: <E>(evaluate: LazyArg<E>) => Effect<never, E>;
|
|
|
1979
1976
|
/**
|
|
1980
1977
|
* Creates an `Effect` that represents a failure with a specific `Cause`.
|
|
1981
1978
|
*
|
|
1979
|
+
* **When to use**
|
|
1980
|
+
*
|
|
1981
|
+
* Use when you already have a full `Cause` and need to preserve defects,
|
|
1982
|
+
* interruptions, annotations, or combined failures in the effect's failure
|
|
1983
|
+
* channel.
|
|
1984
|
+
*
|
|
1982
1985
|
* **Details**
|
|
1983
1986
|
*
|
|
1984
1987
|
* This function allows you to create effects that fail with complex error
|
|
@@ -2034,8 +2037,8 @@ export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Ef
|
|
|
2034
2037
|
*
|
|
2035
2038
|
* **When to use**
|
|
2036
2039
|
*
|
|
2037
|
-
* Use when
|
|
2038
|
-
*
|
|
2040
|
+
* Use when you need an `Effect` to report an unrecoverable defect instead of a
|
|
2041
|
+
* typed error.
|
|
2039
2042
|
*
|
|
2040
2043
|
* **Details**
|
|
2041
2044
|
*
|
|
@@ -2081,10 +2084,8 @@ export {
|
|
|
2081
2084
|
*
|
|
2082
2085
|
* **When to use**
|
|
2083
2086
|
*
|
|
2084
|
-
* Use when
|
|
2085
|
-
*
|
|
2086
|
-
* constructor is designed to handle operations that could throw exceptions by
|
|
2087
|
-
* capturing those exceptions and transforming them into manageable errors.
|
|
2087
|
+
* Use when you need to perform synchronous operations that might throw, such
|
|
2088
|
+
* as parsing JSON, and convert thrown exceptions into typed Effect failures.
|
|
2088
2089
|
*
|
|
2089
2090
|
* **Details**
|
|
2090
2091
|
*
|
|
@@ -2228,6 +2229,11 @@ export declare const fromResult: <A, E>(result: Result.Result<A, E>) => Effect<A
|
|
|
2228
2229
|
/**
|
|
2229
2230
|
* Converts an `Option` into an `Effect`.
|
|
2230
2231
|
*
|
|
2232
|
+
* **When to use**
|
|
2233
|
+
*
|
|
2234
|
+
* Use when absence should become a typed `NoSuchElementError` in the effect error
|
|
2235
|
+
* channel.
|
|
2236
|
+
*
|
|
2231
2237
|
* **Details**
|
|
2232
2238
|
*
|
|
2233
2239
|
* `Option.some` becomes a successful effect with the contained value, while
|
|
@@ -2508,8 +2514,8 @@ export declare const flatten: <A, E, R, E2, R2>(self: Effect<Effect<A, E, R>, E2
|
|
|
2508
2514
|
*
|
|
2509
2515
|
* **When to use**
|
|
2510
2516
|
*
|
|
2511
|
-
* Use when one effect
|
|
2512
|
-
*
|
|
2517
|
+
* Use when you need one effect to run after another and the second effect may
|
|
2518
|
+
* depend on the first effect's success value.
|
|
2513
2519
|
*
|
|
2514
2520
|
* **Details**
|
|
2515
2521
|
*
|
|
@@ -2584,8 +2590,8 @@ export declare const andThen: {
|
|
|
2584
2590
|
*
|
|
2585
2591
|
* **When to use**
|
|
2586
2592
|
*
|
|
2587
|
-
* Use when one effect
|
|
2588
|
-
*
|
|
2593
|
+
* Use when you need one effect to run after another and the second effect may
|
|
2594
|
+
* depend on the first effect's success value.
|
|
2589
2595
|
*
|
|
2590
2596
|
* **Details**
|
|
2591
2597
|
*
|
|
@@ -2660,8 +2666,8 @@ export declare const andThen: {
|
|
|
2660
2666
|
*
|
|
2661
2667
|
* **When to use**
|
|
2662
2668
|
*
|
|
2663
|
-
* Use when one effect
|
|
2664
|
-
*
|
|
2669
|
+
* Use when you need one effect to run after another and the second effect may
|
|
2670
|
+
* depend on the first effect's success value.
|
|
2665
2671
|
*
|
|
2666
2672
|
* **Details**
|
|
2667
2673
|
*
|
|
@@ -2736,8 +2742,8 @@ export declare const andThen: {
|
|
|
2736
2742
|
*
|
|
2737
2743
|
* **When to use**
|
|
2738
2744
|
*
|
|
2739
|
-
* Use when one effect
|
|
2740
|
-
*
|
|
2745
|
+
* Use when you need one effect to run after another and the second effect may
|
|
2746
|
+
* depend on the first effect's success value.
|
|
2741
2747
|
*
|
|
2742
2748
|
* **Details**
|
|
2743
2749
|
*
|
|
@@ -2812,8 +2818,8 @@ export declare const andThen: {
|
|
|
2812
2818
|
*
|
|
2813
2819
|
* **When to use**
|
|
2814
2820
|
*
|
|
2815
|
-
* Use when one effect
|
|
2816
|
-
*
|
|
2821
|
+
* Use when you need one effect to run after another and the second effect may
|
|
2822
|
+
* depend on the first effect's success value.
|
|
2817
2823
|
*
|
|
2818
2824
|
* **Details**
|
|
2819
2825
|
*
|
|
@@ -2889,9 +2895,8 @@ export declare const andThen: {
|
|
|
2889
2895
|
*
|
|
2890
2896
|
* **When to use**
|
|
2891
2897
|
*
|
|
2892
|
-
* Use when you
|
|
2893
|
-
*
|
|
2894
|
-
* record an action but want the original value to be passed to the next step.
|
|
2898
|
+
* Use when you need to run an effectful observation, such as logging or
|
|
2899
|
+
* tracking, while passing the original success value to the next step.
|
|
2895
2900
|
*
|
|
2896
2901
|
* **Details**
|
|
2897
2902
|
*
|
|
@@ -2943,9 +2948,8 @@ export declare const tap: {
|
|
|
2943
2948
|
*
|
|
2944
2949
|
* **When to use**
|
|
2945
2950
|
*
|
|
2946
|
-
* Use when you
|
|
2947
|
-
*
|
|
2948
|
-
* record an action but want the original value to be passed to the next step.
|
|
2951
|
+
* Use when you need to run an effectful observation, such as logging or
|
|
2952
|
+
* tracking, while passing the original success value to the next step.
|
|
2949
2953
|
*
|
|
2950
2954
|
* **Details**
|
|
2951
2955
|
*
|
|
@@ -2997,9 +3001,8 @@ export declare const tap: {
|
|
|
2997
3001
|
*
|
|
2998
3002
|
* **When to use**
|
|
2999
3003
|
*
|
|
3000
|
-
* Use when you
|
|
3001
|
-
*
|
|
3002
|
-
* record an action but want the original value to be passed to the next step.
|
|
3004
|
+
* Use when you need to run an effectful observation, such as logging or
|
|
3005
|
+
* tracking, while passing the original success value to the next step.
|
|
3003
3006
|
*
|
|
3004
3007
|
* **Details**
|
|
3005
3008
|
*
|
|
@@ -3051,9 +3054,8 @@ export declare const tap: {
|
|
|
3051
3054
|
*
|
|
3052
3055
|
* **When to use**
|
|
3053
3056
|
*
|
|
3054
|
-
* Use when you
|
|
3055
|
-
*
|
|
3056
|
-
* record an action but want the original value to be passed to the next step.
|
|
3057
|
+
* Use when you need to run an effectful observation, such as logging or
|
|
3058
|
+
* tracking, while passing the original success value to the next step.
|
|
3057
3059
|
*
|
|
3058
3060
|
* **Details**
|
|
3059
3061
|
*
|
|
@@ -3105,9 +3107,8 @@ export declare const tap: {
|
|
|
3105
3107
|
*
|
|
3106
3108
|
* **When to use**
|
|
3107
3109
|
*
|
|
3108
|
-
* Use when you
|
|
3109
|
-
*
|
|
3110
|
-
* record an action but want the original value to be passed to the next step.
|
|
3110
|
+
* Use when you need to run an effectful observation, such as logging or
|
|
3111
|
+
* tracking, while passing the original success value to the next step.
|
|
3111
3112
|
*
|
|
3112
3113
|
* **Details**
|
|
3113
3114
|
*
|
|
@@ -3159,16 +3160,15 @@ export declare const tap: {
|
|
|
3159
3160
|
*
|
|
3160
3161
|
* **When to use**
|
|
3161
3162
|
*
|
|
3162
|
-
* Use when you want
|
|
3163
|
-
* the original error value.
|
|
3164
|
-
* succeeded, and `exit` when you need the full failure cause.
|
|
3163
|
+
* Use when you want an `Effect`'s typed failures to be handled as `Result`
|
|
3164
|
+
* data while preserving the original error value.
|
|
3165
3165
|
*
|
|
3166
3166
|
* **Details**
|
|
3167
3167
|
*
|
|
3168
3168
|
* This function converts an effect that may fail into an effect that always
|
|
3169
3169
|
* succeeds, wrapping the outcome in a `Result` type. The result will be
|
|
3170
|
-
* `Result.
|
|
3171
|
-
* `Result.
|
|
3170
|
+
* `Result.Failure` if the effect fails, containing the recoverable error, or
|
|
3171
|
+
* `Result.Success` if it succeeds, containing the result.
|
|
3172
3172
|
*
|
|
3173
3173
|
* Using this function, you can handle recoverable errors explicitly without
|
|
3174
3174
|
* causing the effect to fail. This is particularly useful in scenarios where
|
|
@@ -3214,9 +3214,8 @@ export declare const result: <A, E, R>(self: Effect<A, E, R>) => Effect<Result.R
|
|
|
3214
3214
|
*
|
|
3215
3215
|
* **When to use**
|
|
3216
3216
|
*
|
|
3217
|
-
* Use when
|
|
3218
|
-
*
|
|
3219
|
-
* need the full failure cause.
|
|
3217
|
+
* Use when you only care whether an effect succeeds and want recoverable
|
|
3218
|
+
* failures represented as `Option.none`.
|
|
3220
3219
|
*
|
|
3221
3220
|
* **Details**
|
|
3222
3221
|
*
|
|
@@ -3263,9 +3262,8 @@ export declare const option: <A, E, R>(self: Effect<A, E, R>) => Effect<Option<A
|
|
|
3263
3262
|
*
|
|
3264
3263
|
* **When to use**
|
|
3265
3264
|
*
|
|
3266
|
-
* Use when you need to inspect the full outcome, including typed
|
|
3267
|
-
*
|
|
3268
|
-
* need to handle typed failures.
|
|
3265
|
+
* Use when you need to inspect the full outcome, including typed failures, defects,
|
|
3266
|
+
* and interruptions.
|
|
3269
3267
|
*
|
|
3270
3268
|
* **Details**
|
|
3271
3269
|
*
|
|
@@ -3608,8 +3606,7 @@ export declare const asVoid: <A, E, R>(self: Effect<A, E, R>) => Effect<void, E,
|
|
|
3608
3606
|
*
|
|
3609
3607
|
* **When to use**
|
|
3610
3608
|
*
|
|
3611
|
-
* Use to
|
|
3612
|
-
* into the failure channel.
|
|
3609
|
+
* Use to swap an `Effect`'s success and failure channels.
|
|
3613
3610
|
*
|
|
3614
3611
|
* **Details**
|
|
3615
3612
|
*
|
|
@@ -4020,6 +4017,11 @@ export {
|
|
|
4020
4017
|
/**
|
|
4021
4018
|
* Handles all errors in an effect by providing a fallback effect.
|
|
4022
4019
|
*
|
|
4020
|
+
* **When to use**
|
|
4021
|
+
*
|
|
4022
|
+
* Use when every recoverable error from an effect should be handled by the same
|
|
4023
|
+
* fallback function while unrecoverable defects remain defects.
|
|
4024
|
+
*
|
|
4023
4025
|
* **Details**
|
|
4024
4026
|
*
|
|
4025
4027
|
* The `catch` function catches any errors that may occur during the
|
|
@@ -4027,8 +4029,10 @@ export {
|
|
|
4027
4029
|
* effect. This ensures that the program continues without failing by recovering
|
|
4028
4030
|
* from errors using the provided fallback logic.
|
|
4029
4031
|
*
|
|
4030
|
-
* **
|
|
4031
|
-
*
|
|
4032
|
+
* **Gotchas**
|
|
4033
|
+
*
|
|
4034
|
+
* `catch` only handles recoverable errors. It will not recover from
|
|
4035
|
+
* unrecoverable defects.
|
|
4032
4036
|
*
|
|
4033
4037
|
* @see {@link catchCause} for a version that can recover from both recoverable and unrecoverable errors.
|
|
4034
4038
|
*
|
|
@@ -4042,8 +4046,8 @@ catch_ as catch };
|
|
|
4042
4046
|
*
|
|
4043
4047
|
* **When to use**
|
|
4044
4048
|
*
|
|
4045
|
-
* Use when
|
|
4046
|
-
* channel.
|
|
4049
|
+
* Use when you need to recover from one specific tagged error in an effect
|
|
4050
|
+
* error channel.
|
|
4047
4051
|
*
|
|
4048
4052
|
* **Details**
|
|
4049
4053
|
*
|
|
@@ -4087,8 +4091,8 @@ export declare const catchTag: {
|
|
|
4087
4091
|
*
|
|
4088
4092
|
* **When to use**
|
|
4089
4093
|
*
|
|
4090
|
-
* Use when
|
|
4091
|
-
* channel.
|
|
4094
|
+
* Use when you need to recover from one specific tagged error in an effect
|
|
4095
|
+
* error channel.
|
|
4092
4096
|
*
|
|
4093
4097
|
* **Details**
|
|
4094
4098
|
*
|
|
@@ -4132,8 +4136,8 @@ export declare const catchTag: {
|
|
|
4132
4136
|
*
|
|
4133
4137
|
* **When to use**
|
|
4134
4138
|
*
|
|
4135
|
-
* Use when
|
|
4136
|
-
* channel.
|
|
4139
|
+
* Use when you need to recover from one specific tagged error in an effect
|
|
4140
|
+
* error channel.
|
|
4137
4141
|
*
|
|
4138
4142
|
* **Details**
|
|
4139
4143
|
*
|
|
@@ -4178,10 +4182,14 @@ export declare const catchTag: {
|
|
|
4178
4182
|
* **When to use**
|
|
4179
4183
|
*
|
|
4180
4184
|
* Use when one recovery step should handle several tagged error types by
|
|
4181
|
-
* matching their readonly `_tag` fields.
|
|
4182
|
-
* tags, plus an optional fallback for unmatched errors.
|
|
4185
|
+
* matching their readonly `_tag` fields.
|
|
4183
4186
|
*
|
|
4184
|
-
*
|
|
4187
|
+
* **Details**
|
|
4188
|
+
*
|
|
4189
|
+
* Pass a handler table whose keys are tags, plus an optional fallback for
|
|
4190
|
+
* unmatched errors.
|
|
4191
|
+
*
|
|
4192
|
+
* The error type must have a readonly `_tag` field to use `catchTags`. This
|
|
4185
4193
|
* field is used to identify and match errors.
|
|
4186
4194
|
*
|
|
4187
4195
|
* **Example** (Handling multiple tagged errors)
|
|
@@ -4219,10 +4227,14 @@ export declare const catchTags: {
|
|
|
4219
4227
|
* **When to use**
|
|
4220
4228
|
*
|
|
4221
4229
|
* Use when one recovery step should handle several tagged error types by
|
|
4222
|
-
* matching their readonly `_tag` fields.
|
|
4223
|
-
*
|
|
4230
|
+
* matching their readonly `_tag` fields.
|
|
4231
|
+
*
|
|
4232
|
+
* **Details**
|
|
4224
4233
|
*
|
|
4225
|
-
*
|
|
4234
|
+
* Pass a handler table whose keys are tags, plus an optional fallback for
|
|
4235
|
+
* unmatched errors.
|
|
4236
|
+
*
|
|
4237
|
+
* The error type must have a readonly `_tag` field to use `catchTags`. This
|
|
4226
4238
|
* field is used to identify and match errors.
|
|
4227
4239
|
*
|
|
4228
4240
|
* **Example** (Handling multiple tagged errors)
|
|
@@ -4280,10 +4292,14 @@ export declare const catchTags: {
|
|
|
4280
4292
|
* **When to use**
|
|
4281
4293
|
*
|
|
4282
4294
|
* Use when one recovery step should handle several tagged error types by
|
|
4283
|
-
* matching their readonly `_tag` fields.
|
|
4284
|
-
*
|
|
4295
|
+
* matching their readonly `_tag` fields.
|
|
4296
|
+
*
|
|
4297
|
+
* **Details**
|
|
4285
4298
|
*
|
|
4286
|
-
*
|
|
4299
|
+
* Pass a handler table whose keys are tags, plus an optional fallback for
|
|
4300
|
+
* unmatched errors.
|
|
4301
|
+
*
|
|
4302
|
+
* The error type must have a readonly `_tag` field to use `catchTags`. This
|
|
4287
4303
|
* field is used to identify and match errors.
|
|
4288
4304
|
*
|
|
4289
4305
|
* **Example** (Handling multiple tagged errors)
|
|
@@ -4341,8 +4357,8 @@ export declare const catchTags: {
|
|
|
4341
4357
|
*
|
|
4342
4358
|
* **When to use**
|
|
4343
4359
|
*
|
|
4344
|
-
* Use to handle one nested reason inside
|
|
4345
|
-
* parent error shape for unmatched reasons.
|
|
4360
|
+
* Use to handle one nested reason inside an `Effect`'s tagged error while
|
|
4361
|
+
* preserving the parent error shape for unmatched reasons.
|
|
4346
4362
|
*
|
|
4347
4363
|
* **Details**
|
|
4348
4364
|
*
|
|
@@ -4387,8 +4403,8 @@ export declare const catchReason: {
|
|
|
4387
4403
|
*
|
|
4388
4404
|
* **When to use**
|
|
4389
4405
|
*
|
|
4390
|
-
* Use to handle one nested reason inside
|
|
4391
|
-
* parent error shape for unmatched reasons.
|
|
4406
|
+
* Use to handle one nested reason inside an `Effect`'s tagged error while
|
|
4407
|
+
* preserving the parent error shape for unmatched reasons.
|
|
4392
4408
|
*
|
|
4393
4409
|
* **Details**
|
|
4394
4410
|
*
|
|
@@ -4433,8 +4449,8 @@ export declare const catchReason: {
|
|
|
4433
4449
|
*
|
|
4434
4450
|
* **When to use**
|
|
4435
4451
|
*
|
|
4436
|
-
* Use to handle one nested reason inside
|
|
4437
|
-
* parent error shape for unmatched reasons.
|
|
4452
|
+
* Use to handle one nested reason inside an `Effect`'s tagged error while
|
|
4453
|
+
* preserving the parent error shape for unmatched reasons.
|
|
4438
4454
|
*
|
|
4439
4455
|
* **Details**
|
|
4440
4456
|
*
|
|
@@ -4726,8 +4742,9 @@ export declare const unwrapReason: {
|
|
|
4726
4742
|
*
|
|
4727
4743
|
* **When to use**
|
|
4728
4744
|
*
|
|
4729
|
-
* Use when
|
|
4730
|
-
* defects, and interruptions, instead of only
|
|
4745
|
+
* Use when you need to recover from an `Effect` by inspecting the full `Cause`,
|
|
4746
|
+
* including recoverable failures, defects, and interruptions, instead of only
|
|
4747
|
+
* the typed error value.
|
|
4731
4748
|
*
|
|
4732
4749
|
* **Details**
|
|
4733
4750
|
*
|
|
@@ -4766,8 +4783,9 @@ export declare const catchCause: {
|
|
|
4766
4783
|
*
|
|
4767
4784
|
* **When to use**
|
|
4768
4785
|
*
|
|
4769
|
-
* Use when
|
|
4770
|
-
* defects, and interruptions, instead of only
|
|
4786
|
+
* Use when you need to recover from an `Effect` by inspecting the full `Cause`,
|
|
4787
|
+
* including recoverable failures, defects, and interruptions, instead of only
|
|
4788
|
+
* the typed error value.
|
|
4771
4789
|
*
|
|
4772
4790
|
* **Details**
|
|
4773
4791
|
*
|
|
@@ -4806,8 +4824,9 @@ export declare const catchCause: {
|
|
|
4806
4824
|
*
|
|
4807
4825
|
* **When to use**
|
|
4808
4826
|
*
|
|
4809
|
-
* Use when
|
|
4810
|
-
* defects, and interruptions, instead of only
|
|
4827
|
+
* Use when you need to recover from an `Effect` by inspecting the full `Cause`,
|
|
4828
|
+
* including recoverable failures, defects, and interruptions, instead of only
|
|
4829
|
+
* the typed error value.
|
|
4811
4830
|
*
|
|
4812
4831
|
* **Details**
|
|
4813
4832
|
*
|
|
@@ -4846,8 +4865,7 @@ export declare const catchCause: {
|
|
|
4846
4865
|
*
|
|
4847
4866
|
* **When to use**
|
|
4848
4867
|
*
|
|
4849
|
-
* Use when you
|
|
4850
|
-
* reported or translated for an external system.
|
|
4868
|
+
* Use when you need to report or translate defects at integration boundaries.
|
|
4851
4869
|
*
|
|
4852
4870
|
* **Details**
|
|
4853
4871
|
*
|
|
@@ -4887,8 +4905,7 @@ export declare const catchDefect: {
|
|
|
4887
4905
|
*
|
|
4888
4906
|
* **When to use**
|
|
4889
4907
|
*
|
|
4890
|
-
* Use when you
|
|
4891
|
-
* reported or translated for an external system.
|
|
4908
|
+
* Use when you need to report or translate defects at integration boundaries.
|
|
4892
4909
|
*
|
|
4893
4910
|
* **Details**
|
|
4894
4911
|
*
|
|
@@ -4928,8 +4945,7 @@ export declare const catchDefect: {
|
|
|
4928
4945
|
*
|
|
4929
4946
|
* **When to use**
|
|
4930
4947
|
*
|
|
4931
|
-
* Use when you
|
|
4932
|
-
* reported or translated for an external system.
|
|
4948
|
+
* Use when you need to report or translate defects at integration boundaries.
|
|
4933
4949
|
*
|
|
4934
4950
|
* **Details**
|
|
4935
4951
|
*
|
|
@@ -4970,8 +4986,11 @@ export declare const catchDefect: {
|
|
|
4970
4986
|
*
|
|
4971
4987
|
* **When to use**
|
|
4972
4988
|
*
|
|
4973
|
-
* Use when you need to recover from errors that match a condition.
|
|
4974
|
-
*
|
|
4989
|
+
* Use when you need to recover from errors that match a condition.
|
|
4990
|
+
*
|
|
4991
|
+
* **Details**
|
|
4992
|
+
*
|
|
4993
|
+
* Use a `Refinement` for type narrowing or a `Predicate` for simple boolean
|
|
4975
4994
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
4976
4995
|
* interrupts are not caught.
|
|
4977
4996
|
*
|
|
@@ -5010,8 +5029,11 @@ export declare const catchIf: {
|
|
|
5010
5029
|
*
|
|
5011
5030
|
* **When to use**
|
|
5012
5031
|
*
|
|
5013
|
-
* Use when you need to recover from errors that match a condition.
|
|
5014
|
-
*
|
|
5032
|
+
* Use when you need to recover from errors that match a condition.
|
|
5033
|
+
*
|
|
5034
|
+
* **Details**
|
|
5035
|
+
*
|
|
5036
|
+
* Use a `Refinement` for type narrowing or a `Predicate` for simple boolean
|
|
5015
5037
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
5016
5038
|
* interrupts are not caught.
|
|
5017
5039
|
*
|
|
@@ -5050,8 +5072,11 @@ export declare const catchIf: {
|
|
|
5050
5072
|
*
|
|
5051
5073
|
* **When to use**
|
|
5052
5074
|
*
|
|
5053
|
-
* Use when you need to recover from errors that match a condition.
|
|
5054
|
-
*
|
|
5075
|
+
* Use when you need to recover from errors that match a condition.
|
|
5076
|
+
*
|
|
5077
|
+
* **Details**
|
|
5078
|
+
*
|
|
5079
|
+
* Use a `Refinement` for type narrowing or a `Predicate` for simple boolean
|
|
5055
5080
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
5056
5081
|
* interrupts are not caught.
|
|
5057
5082
|
*
|
|
@@ -5090,8 +5115,11 @@ export declare const catchIf: {
|
|
|
5090
5115
|
*
|
|
5091
5116
|
* **When to use**
|
|
5092
5117
|
*
|
|
5093
|
-
* Use when you need to recover from errors that match a condition.
|
|
5094
|
-
*
|
|
5118
|
+
* Use when you need to recover from errors that match a condition.
|
|
5119
|
+
*
|
|
5120
|
+
* **Details**
|
|
5121
|
+
*
|
|
5122
|
+
* Use a `Refinement` for type narrowing or a `Predicate` for simple boolean
|
|
5095
5123
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
5096
5124
|
* interrupts are not caught.
|
|
5097
5125
|
*
|
|
@@ -5130,8 +5158,11 @@ export declare const catchIf: {
|
|
|
5130
5158
|
*
|
|
5131
5159
|
* **When to use**
|
|
5132
5160
|
*
|
|
5133
|
-
* Use when you need to recover from errors that match a condition.
|
|
5134
|
-
*
|
|
5161
|
+
* Use when you need to recover from errors that match a condition.
|
|
5162
|
+
*
|
|
5163
|
+
* **Details**
|
|
5164
|
+
*
|
|
5165
|
+
* Use a `Refinement` for type narrowing or a `Predicate` for simple boolean
|
|
5135
5166
|
* matching. Non-matching errors re-fail with the original cause. Defects and
|
|
5136
5167
|
* interrupts are not caught.
|
|
5137
5168
|
*
|
|
@@ -5247,7 +5278,8 @@ export declare const catchFilter: {
|
|
|
5247
5278
|
*
|
|
5248
5279
|
* **When to use**
|
|
5249
5280
|
*
|
|
5250
|
-
* Use
|
|
5281
|
+
* Use when you expect missing-value failures and want them to become an
|
|
5282
|
+
* optional success while all other failures keep failing.
|
|
5251
5283
|
*
|
|
5252
5284
|
* **Details**
|
|
5253
5285
|
*
|
|
@@ -5279,7 +5311,7 @@ export declare const catchNoSuchElement: <A, E, R>(self: Effect<A, E, R>) => Eff
|
|
|
5279
5311
|
*
|
|
5280
5312
|
* **When to use**
|
|
5281
5313
|
*
|
|
5282
|
-
* Use to recover from full causes selected by a predicate.
|
|
5314
|
+
* Use to recover an `Effect` from full causes selected by a predicate.
|
|
5283
5315
|
*
|
|
5284
5316
|
* **Details**
|
|
5285
5317
|
*
|
|
@@ -5323,7 +5355,7 @@ export declare const catchCauseIf: {
|
|
|
5323
5355
|
*
|
|
5324
5356
|
* **When to use**
|
|
5325
5357
|
*
|
|
5326
|
-
* Use to recover from full causes selected by a predicate.
|
|
5358
|
+
* Use to recover an `Effect` from full causes selected by a predicate.
|
|
5327
5359
|
*
|
|
5328
5360
|
* **Details**
|
|
5329
5361
|
*
|
|
@@ -5367,7 +5399,7 @@ export declare const catchCauseIf: {
|
|
|
5367
5399
|
*
|
|
5368
5400
|
* **When to use**
|
|
5369
5401
|
*
|
|
5370
|
-
* Use to recover from full causes selected by a predicate.
|
|
5402
|
+
* Use to recover an `Effect` from full causes selected by a predicate.
|
|
5371
5403
|
*
|
|
5372
5404
|
* **Details**
|
|
5373
5405
|
*
|
|
@@ -5412,8 +5444,9 @@ export declare const catchCauseIf: {
|
|
|
5412
5444
|
*
|
|
5413
5445
|
* **When to use**
|
|
5414
5446
|
*
|
|
5415
|
-
* Use when you need to recover only from causes selected by a
|
|
5416
|
-
* recovery
|
|
5447
|
+
* Use when you need to recover an `Effect` only from causes selected by a
|
|
5448
|
+
* `Filter`, while giving the recovery both the selected value and the original
|
|
5449
|
+
* `Cause`.
|
|
5417
5450
|
*
|
|
5418
5451
|
* **Details**
|
|
5419
5452
|
*
|
|
@@ -5434,8 +5467,9 @@ export declare const catchCauseFilter: {
|
|
|
5434
5467
|
*
|
|
5435
5468
|
* **When to use**
|
|
5436
5469
|
*
|
|
5437
|
-
* Use when you need to recover only from causes selected by a
|
|
5438
|
-
* recovery
|
|
5470
|
+
* Use when you need to recover an `Effect` only from causes selected by a
|
|
5471
|
+
* `Filter`, while giving the recovery both the selected value and the original
|
|
5472
|
+
* `Cause`.
|
|
5439
5473
|
*
|
|
5440
5474
|
* **Details**
|
|
5441
5475
|
*
|
|
@@ -5456,8 +5490,9 @@ export declare const catchCauseFilter: {
|
|
|
5456
5490
|
*
|
|
5457
5491
|
* **When to use**
|
|
5458
5492
|
*
|
|
5459
|
-
* Use when you need to recover only from causes selected by a
|
|
5460
|
-
* recovery
|
|
5493
|
+
* Use when you need to recover an `Effect` only from causes selected by a
|
|
5494
|
+
* `Filter`, while giving the recovery both the selected value and the original
|
|
5495
|
+
* `Cause`.
|
|
5461
5496
|
*
|
|
5462
5497
|
* **Details**
|
|
5463
5498
|
*
|
|
@@ -5479,7 +5514,8 @@ export declare const catchCauseFilter: {
|
|
|
5479
5514
|
*
|
|
5480
5515
|
* **When to use**
|
|
5481
5516
|
*
|
|
5482
|
-
* Use to translate typed failures while leaving successful values
|
|
5517
|
+
* Use to translate an `Effect`'s typed failures while leaving successful values
|
|
5518
|
+
* unchanged.
|
|
5483
5519
|
*
|
|
5484
5520
|
* **Details**
|
|
5485
5521
|
*
|
|
@@ -5517,7 +5553,8 @@ export declare const mapError: {
|
|
|
5517
5553
|
*
|
|
5518
5554
|
* **When to use**
|
|
5519
5555
|
*
|
|
5520
|
-
* Use to translate typed failures while leaving successful values
|
|
5556
|
+
* Use to translate an `Effect`'s typed failures while leaving successful values
|
|
5557
|
+
* unchanged.
|
|
5521
5558
|
*
|
|
5522
5559
|
* **Details**
|
|
5523
5560
|
*
|
|
@@ -5555,7 +5592,8 @@ export declare const mapError: {
|
|
|
5555
5592
|
*
|
|
5556
5593
|
* **When to use**
|
|
5557
5594
|
*
|
|
5558
|
-
* Use to translate typed failures while leaving successful values
|
|
5595
|
+
* Use to translate an `Effect`'s typed failures while leaving successful values
|
|
5596
|
+
* unchanged.
|
|
5559
5597
|
*
|
|
5560
5598
|
* **Details**
|
|
5561
5599
|
*
|
|
@@ -5594,8 +5632,8 @@ export declare const mapError: {
|
|
|
5594
5632
|
*
|
|
5595
5633
|
* **When to use**
|
|
5596
5634
|
*
|
|
5597
|
-
* Use to transform both success and failure
|
|
5598
|
-
*
|
|
5635
|
+
* Use to transform both success and failure channels of an `Effect` without
|
|
5636
|
+
* changing whether it succeeds or fails.
|
|
5599
5637
|
*
|
|
5600
5638
|
* **Details**
|
|
5601
5639
|
*
|
|
@@ -5635,8 +5673,8 @@ export declare const mapBoth: {
|
|
|
5635
5673
|
*
|
|
5636
5674
|
* **When to use**
|
|
5637
5675
|
*
|
|
5638
|
-
* Use to transform both success and failure
|
|
5639
|
-
*
|
|
5676
|
+
* Use to transform both success and failure channels of an `Effect` without
|
|
5677
|
+
* changing whether it succeeds or fails.
|
|
5640
5678
|
*
|
|
5641
5679
|
* **Details**
|
|
5642
5680
|
*
|
|
@@ -5679,8 +5717,8 @@ export declare const mapBoth: {
|
|
|
5679
5717
|
*
|
|
5680
5718
|
* **When to use**
|
|
5681
5719
|
*
|
|
5682
|
-
* Use to transform both success and failure
|
|
5683
|
-
*
|
|
5720
|
+
* Use to transform both success and failure channels of an `Effect` without
|
|
5721
|
+
* changing whether it succeeds or fails.
|
|
5684
5722
|
*
|
|
5685
5723
|
* **Details**
|
|
5686
5724
|
*
|
|
@@ -5725,8 +5763,8 @@ export declare const mapBoth: {
|
|
|
5725
5763
|
*
|
|
5726
5764
|
* **When to use**
|
|
5727
5765
|
*
|
|
5728
|
-
* Use when
|
|
5729
|
-
*
|
|
5766
|
+
* Use when you need to turn an `Effect` typed failure that represents an
|
|
5767
|
+
* unrecoverable bug or invalid state into a defect.
|
|
5730
5768
|
*
|
|
5731
5769
|
* **Example** (Converting typed failures into defects)
|
|
5732
5770
|
*
|
|
@@ -5973,6 +6011,11 @@ export declare const tapErrorTag: {
|
|
|
5973
6011
|
* Runs an effectful operation with the full `Cause` when the source effect
|
|
5974
6012
|
* fails.
|
|
5975
6013
|
*
|
|
6014
|
+
* **When to use**
|
|
6015
|
+
*
|
|
6016
|
+
* Use when failure observation needs typed failures, defects, and interruptions
|
|
6017
|
+
* rather than only the typed error value.
|
|
6018
|
+
*
|
|
5976
6019
|
* **Details**
|
|
5977
6020
|
*
|
|
5978
6021
|
* Use this to log or inspect typed failures, defects, and interruptions. When
|
|
@@ -6004,6 +6047,11 @@ export declare const tapCause: {
|
|
|
6004
6047
|
* Runs an effectful operation with the full `Cause` when the source effect
|
|
6005
6048
|
* fails.
|
|
6006
6049
|
*
|
|
6050
|
+
* **When to use**
|
|
6051
|
+
*
|
|
6052
|
+
* Use when failure observation needs typed failures, defects, and interruptions
|
|
6053
|
+
* rather than only the typed error value.
|
|
6054
|
+
*
|
|
6007
6055
|
* **Details**
|
|
6008
6056
|
*
|
|
6009
6057
|
* Use this to log or inspect typed failures, defects, and interruptions. When
|
|
@@ -6035,6 +6083,11 @@ export declare const tapCause: {
|
|
|
6035
6083
|
* Runs an effectful operation with the full `Cause` when the source effect
|
|
6036
6084
|
* fails.
|
|
6037
6085
|
*
|
|
6086
|
+
* **When to use**
|
|
6087
|
+
*
|
|
6088
|
+
* Use when failure observation needs typed failures, defects, and interruptions
|
|
6089
|
+
* rather than only the typed error value.
|
|
6090
|
+
*
|
|
6038
6091
|
* **Details**
|
|
6039
6092
|
*
|
|
6040
6093
|
* Use this to log or inspect typed failures, defects, and interruptions. When
|
|
@@ -6165,8 +6218,9 @@ export declare const tapCauseIf: {
|
|
|
6165
6218
|
*
|
|
6166
6219
|
* **When to use**
|
|
6167
6220
|
*
|
|
6168
|
-
* Use when you need to observe only failure causes selected by a `Filter`,
|
|
6169
|
-
* the side effect
|
|
6221
|
+
* Use when you need to observe only failure causes selected by a `Filter`,
|
|
6222
|
+
* while giving the side effect both the selected value and the original
|
|
6223
|
+
* `Cause`.
|
|
6170
6224
|
*
|
|
6171
6225
|
* **Details**
|
|
6172
6226
|
*
|
|
@@ -6187,8 +6241,9 @@ export declare const tapCauseFilter: {
|
|
|
6187
6241
|
*
|
|
6188
6242
|
* **When to use**
|
|
6189
6243
|
*
|
|
6190
|
-
* Use when you need to observe only failure causes selected by a `Filter`,
|
|
6191
|
-
* the side effect
|
|
6244
|
+
* Use when you need to observe only failure causes selected by a `Filter`,
|
|
6245
|
+
* while giving the side effect both the selected value and the original
|
|
6246
|
+
* `Cause`.
|
|
6192
6247
|
*
|
|
6193
6248
|
* **Details**
|
|
6194
6249
|
*
|
|
@@ -6209,8 +6264,9 @@ export declare const tapCauseFilter: {
|
|
|
6209
6264
|
*
|
|
6210
6265
|
* **When to use**
|
|
6211
6266
|
*
|
|
6212
|
-
* Use when you need to observe only failure causes selected by a `Filter`,
|
|
6213
|
-
* the side effect
|
|
6267
|
+
* Use when you need to observe only failure causes selected by a `Filter`,
|
|
6268
|
+
* while giving the side effect both the selected value and the original
|
|
6269
|
+
* `Cause`.
|
|
6214
6270
|
*
|
|
6215
6271
|
* **Details**
|
|
6216
6272
|
*
|
|
@@ -6460,8 +6516,8 @@ export declare namespace Retry {
|
|
|
6460
6516
|
*
|
|
6461
6517
|
* **When to use**
|
|
6462
6518
|
*
|
|
6463
|
-
* Use when
|
|
6464
|
-
* temporary resource unavailability.
|
|
6519
|
+
* Use when you need to rerun an effect after transient typed failures, such as
|
|
6520
|
+
* network issues or temporary resource unavailability.
|
|
6465
6521
|
*
|
|
6466
6522
|
* **Details**
|
|
6467
6523
|
*
|
|
@@ -6513,8 +6569,8 @@ export declare const retry: {
|
|
|
6513
6569
|
*
|
|
6514
6570
|
* **When to use**
|
|
6515
6571
|
*
|
|
6516
|
-
* Use when
|
|
6517
|
-
* temporary resource unavailability.
|
|
6572
|
+
* Use when you need to rerun an effect after transient typed failures, such as
|
|
6573
|
+
* network issues or temporary resource unavailability.
|
|
6518
6574
|
*
|
|
6519
6575
|
* **Details**
|
|
6520
6576
|
*
|
|
@@ -6566,8 +6622,8 @@ export declare const retry: {
|
|
|
6566
6622
|
*
|
|
6567
6623
|
* **When to use**
|
|
6568
6624
|
*
|
|
6569
|
-
* Use when
|
|
6570
|
-
* temporary resource unavailability.
|
|
6625
|
+
* Use when you need to rerun an effect after transient typed failures, such as
|
|
6626
|
+
* network issues or temporary resource unavailability.
|
|
6571
6627
|
*
|
|
6572
6628
|
* **Details**
|
|
6573
6629
|
*
|
|
@@ -6619,8 +6675,8 @@ export declare const retry: {
|
|
|
6619
6675
|
*
|
|
6620
6676
|
* **When to use**
|
|
6621
6677
|
*
|
|
6622
|
-
* Use when
|
|
6623
|
-
* temporary resource unavailability.
|
|
6678
|
+
* Use when you need to rerun an effect after transient typed failures, such as
|
|
6679
|
+
* network issues or temporary resource unavailability.
|
|
6624
6680
|
*
|
|
6625
6681
|
* **Details**
|
|
6626
6682
|
*
|
|
@@ -6672,8 +6728,8 @@ export declare const retry: {
|
|
|
6672
6728
|
*
|
|
6673
6729
|
* **When to use**
|
|
6674
6730
|
*
|
|
6675
|
-
* Use when
|
|
6676
|
-
* temporary resource unavailability.
|
|
6731
|
+
* Use when you need to rerun an effect after transient typed failures, such as
|
|
6732
|
+
* network issues or temporary resource unavailability.
|
|
6677
6733
|
*
|
|
6678
6734
|
* **Details**
|
|
6679
6735
|
*
|
|
@@ -6725,8 +6781,8 @@ export declare const retry: {
|
|
|
6725
6781
|
*
|
|
6726
6782
|
* **When to use**
|
|
6727
6783
|
*
|
|
6728
|
-
* Use when
|
|
6729
|
-
* temporary resource unavailability.
|
|
6784
|
+
* Use when you need to rerun an effect after transient typed failures, such as
|
|
6785
|
+
* network issues or temporary resource unavailability.
|
|
6730
6786
|
*
|
|
6731
6787
|
* **Details**
|
|
6732
6788
|
*
|
|
@@ -6778,8 +6834,8 @@ export declare const retry: {
|
|
|
6778
6834
|
*
|
|
6779
6835
|
* **When to use**
|
|
6780
6836
|
*
|
|
6781
|
-
* Use when
|
|
6782
|
-
* temporary resource unavailability.
|
|
6837
|
+
* Use when you need to rerun an effect after transient typed failures, such as
|
|
6838
|
+
* network issues or temporary resource unavailability.
|
|
6783
6839
|
*
|
|
6784
6840
|
* **Details**
|
|
6785
6841
|
*
|
|
@@ -7037,6 +7093,8 @@ export declare const sandbox: <A, E, R>(self: Effect<A, E, R>) => Effect<A, Caus
|
|
|
7037
7093
|
* Use when an effect should run for its side effects while both success and
|
|
7038
7094
|
* failure values are discarded.
|
|
7039
7095
|
*
|
|
7096
|
+
* **Details**
|
|
7097
|
+
*
|
|
7040
7098
|
* Use the `log` option to emit the full {@link Cause} when the effect fails,
|
|
7041
7099
|
* and `message` to prepend a custom log message.
|
|
7042
7100
|
*
|
|
@@ -7081,6 +7139,11 @@ export declare const ignore: <Arg extends Effect<any, any, any> | {
|
|
|
7081
7139
|
/**
|
|
7082
7140
|
* Ignores the effect's failure cause, including defects and interruptions.
|
|
7083
7141
|
*
|
|
7142
|
+
* **When to use**
|
|
7143
|
+
*
|
|
7144
|
+
* Use when a best-effort effect should never fail, even from defects or
|
|
7145
|
+
* interruption, and optional cause logging is enough.
|
|
7146
|
+
*
|
|
7084
7147
|
* **Details**
|
|
7085
7148
|
*
|
|
7086
7149
|
* Use the `log` option to emit the full {@link Cause} when the effect fails,
|
|
@@ -7368,9 +7431,9 @@ export declare const orElseSucceed: {
|
|
|
7368
7431
|
*
|
|
7369
7432
|
* **When to use**
|
|
7370
7433
|
*
|
|
7371
|
-
* Use when you have prioritized fallback
|
|
7372
|
-
*
|
|
7373
|
-
*
|
|
7434
|
+
* Use when you have prioritized fallback `Effect`s, such as attempting
|
|
7435
|
+
* multiple APIs, reading configuration from several sources, or trying
|
|
7436
|
+
* alternative resource locations in order.
|
|
7374
7437
|
*
|
|
7375
7438
|
* **Details**
|
|
7376
7439
|
*
|
|
@@ -7413,9 +7476,8 @@ export declare const firstSuccessOf: <Eff extends Effect<any, any, any>>(effects
|
|
|
7413
7476
|
*
|
|
7414
7477
|
* **When to use**
|
|
7415
7478
|
*
|
|
7416
|
-
* Use when
|
|
7417
|
-
* failure.
|
|
7418
|
-
* `timeoutOrElse` when you want to run a fallback effect.
|
|
7479
|
+
* Use when you need a timeout of an `Effect` to be represented as a typed
|
|
7480
|
+
* failure.
|
|
7419
7481
|
*
|
|
7420
7482
|
* **Details**
|
|
7421
7483
|
*
|
|
@@ -7472,9 +7534,8 @@ export declare const timeout: {
|
|
|
7472
7534
|
*
|
|
7473
7535
|
* **When to use**
|
|
7474
7536
|
*
|
|
7475
|
-
* Use when
|
|
7476
|
-
* failure.
|
|
7477
|
-
* `timeoutOrElse` when you want to run a fallback effect.
|
|
7537
|
+
* Use when you need a timeout of an `Effect` to be represented as a typed
|
|
7538
|
+
* failure.
|
|
7478
7539
|
*
|
|
7479
7540
|
* **Details**
|
|
7480
7541
|
*
|
|
@@ -7531,9 +7592,8 @@ export declare const timeout: {
|
|
|
7531
7592
|
*
|
|
7532
7593
|
* **When to use**
|
|
7533
7594
|
*
|
|
7534
|
-
* Use when
|
|
7535
|
-
* failure.
|
|
7536
|
-
* `timeoutOrElse` when you want to run a fallback effect.
|
|
7595
|
+
* Use when you need a timeout of an `Effect` to be represented as a typed
|
|
7596
|
+
* failure.
|
|
7537
7597
|
*
|
|
7538
7598
|
* **Details**
|
|
7539
7599
|
*
|
|
@@ -7591,9 +7651,7 @@ export declare const timeout: {
|
|
|
7591
7651
|
*
|
|
7592
7652
|
* **When to use**
|
|
7593
7653
|
*
|
|
7594
|
-
* Use when a timeout should be handled as
|
|
7595
|
-
* `timeout` when a timeout should fail the effect, and `timeoutOrElse` when
|
|
7596
|
-
* you want to run a fallback effect.
|
|
7654
|
+
* Use when a timeout of an `Effect` should be handled as `Option.none`.
|
|
7597
7655
|
*
|
|
7598
7656
|
* **Details**
|
|
7599
7657
|
*
|
|
@@ -7643,9 +7701,7 @@ export declare const timeoutOption: {
|
|
|
7643
7701
|
*
|
|
7644
7702
|
* **When to use**
|
|
7645
7703
|
*
|
|
7646
|
-
* Use when a timeout should be handled as
|
|
7647
|
-
* `timeout` when a timeout should fail the effect, and `timeoutOrElse` when
|
|
7648
|
-
* you want to run a fallback effect.
|
|
7704
|
+
* Use when a timeout of an `Effect` should be handled as `Option.none`.
|
|
7649
7705
|
*
|
|
7650
7706
|
* **Details**
|
|
7651
7707
|
*
|
|
@@ -7695,9 +7751,7 @@ export declare const timeoutOption: {
|
|
|
7695
7751
|
*
|
|
7696
7752
|
* **When to use**
|
|
7697
7753
|
*
|
|
7698
|
-
* Use when a timeout should be handled as
|
|
7699
|
-
* `timeout` when a timeout should fail the effect, and `timeoutOrElse` when
|
|
7700
|
-
* you want to run a fallback effect.
|
|
7754
|
+
* Use when a timeout of an `Effect` should be handled as `Option.none`.
|
|
7701
7755
|
*
|
|
7702
7756
|
* **Details**
|
|
7703
7757
|
*
|
|
@@ -7747,9 +7801,7 @@ export declare const timeoutOption: {
|
|
|
7747
7801
|
*
|
|
7748
7802
|
* **When to use**
|
|
7749
7803
|
*
|
|
7750
|
-
* Use when a timeout should switch to a fallback effect.
|
|
7751
|
-
* `timeout` when a timeout should fail the effect, and `timeoutOption` when a
|
|
7752
|
-
* timeout should become `Option.none`.
|
|
7804
|
+
* Use when a timeout of an `Effect` should switch to a fallback effect.
|
|
7753
7805
|
*
|
|
7754
7806
|
* **Details**
|
|
7755
7807
|
*
|
|
@@ -7801,9 +7853,7 @@ export declare const timeoutOrElse: {
|
|
|
7801
7853
|
*
|
|
7802
7854
|
* **When to use**
|
|
7803
7855
|
*
|
|
7804
|
-
* Use when a timeout should switch to a fallback effect.
|
|
7805
|
-
* `timeout` when a timeout should fail the effect, and `timeoutOption` when a
|
|
7806
|
-
* timeout should become `Option.none`.
|
|
7856
|
+
* Use when a timeout of an `Effect` should switch to a fallback effect.
|
|
7807
7857
|
*
|
|
7808
7858
|
* **Details**
|
|
7809
7859
|
*
|
|
@@ -7858,9 +7908,7 @@ export declare const timeoutOrElse: {
|
|
|
7858
7908
|
*
|
|
7859
7909
|
* **When to use**
|
|
7860
7910
|
*
|
|
7861
|
-
* Use when a timeout should switch to a fallback effect.
|
|
7862
|
-
* `timeout` when a timeout should fail the effect, and `timeoutOption` when a
|
|
7863
|
-
* timeout should become `Option.none`.
|
|
7911
|
+
* Use when a timeout of an `Effect` should switch to a fallback effect.
|
|
7864
7912
|
*
|
|
7865
7913
|
* **Details**
|
|
7866
7914
|
*
|
|
@@ -8207,6 +8255,11 @@ export declare const race: {
|
|
|
8207
8255
|
* Races two effects and returns the result of the first one to complete, whether
|
|
8208
8256
|
* it succeeds or fails.
|
|
8209
8257
|
*
|
|
8258
|
+
* **When to use**
|
|
8259
|
+
*
|
|
8260
|
+
* Use when any completion, including failure, should decide the race and
|
|
8261
|
+
* interrupt the losing effect.
|
|
8262
|
+
*
|
|
8210
8263
|
* **Details**
|
|
8211
8264
|
*
|
|
8212
8265
|
* The losing effect is interrupted, and `onWinner` can observe the winning fiber.
|
|
@@ -8239,6 +8292,11 @@ export declare const raceFirst: {
|
|
|
8239
8292
|
* Races two effects and returns the result of the first one to complete, whether
|
|
8240
8293
|
* it succeeds or fails.
|
|
8241
8294
|
*
|
|
8295
|
+
* **When to use**
|
|
8296
|
+
*
|
|
8297
|
+
* Use when any completion, including failure, should decide the race and
|
|
8298
|
+
* interrupt the losing effect.
|
|
8299
|
+
*
|
|
8242
8300
|
* **Details**
|
|
8243
8301
|
*
|
|
8244
8302
|
* The losing effect is interrupted, and `onWinner` can observe the winning fiber.
|
|
@@ -8277,6 +8335,11 @@ export declare const raceFirst: {
|
|
|
8277
8335
|
* Races two effects and returns the result of the first one to complete, whether
|
|
8278
8336
|
* it succeeds or fails.
|
|
8279
8337
|
*
|
|
8338
|
+
* **When to use**
|
|
8339
|
+
*
|
|
8340
|
+
* Use when any completion, including failure, should decide the race and
|
|
8341
|
+
* interrupt the losing effect.
|
|
8342
|
+
*
|
|
8280
8343
|
* **Details**
|
|
8281
8344
|
*
|
|
8282
8345
|
* The losing effect is interrupted, and `onWinner` can observe the winning fiber.
|
|
@@ -8476,8 +8539,8 @@ export declare const filter: {
|
|
|
8476
8539
|
*
|
|
8477
8540
|
* **When to use**
|
|
8478
8541
|
*
|
|
8479
|
-
* Use to
|
|
8480
|
-
* filter success value.
|
|
8542
|
+
* Use when you need to filter an iterable with a `Filter` inside an `Effect`,
|
|
8543
|
+
* collecting each filter success value.
|
|
8481
8544
|
*
|
|
8482
8545
|
* **Details**
|
|
8483
8546
|
*
|
|
@@ -8496,8 +8559,8 @@ export declare const filterMap: {
|
|
|
8496
8559
|
*
|
|
8497
8560
|
* **When to use**
|
|
8498
8561
|
*
|
|
8499
|
-
* Use to
|
|
8500
|
-
* filter success value.
|
|
8562
|
+
* Use when you need to filter an iterable with a `Filter` inside an `Effect`,
|
|
8563
|
+
* collecting each filter success value.
|
|
8501
8564
|
*
|
|
8502
8565
|
* **Details**
|
|
8503
8566
|
*
|
|
@@ -8516,8 +8579,8 @@ export declare const filterMap: {
|
|
|
8516
8579
|
*
|
|
8517
8580
|
* **When to use**
|
|
8518
8581
|
*
|
|
8519
|
-
* Use to
|
|
8520
|
-
* filter success value.
|
|
8582
|
+
* Use when you need to filter an iterable with a `Filter` inside an `Effect`,
|
|
8583
|
+
* collecting each filter success value.
|
|
8521
8584
|
*
|
|
8522
8585
|
* **Details**
|
|
8523
8586
|
*
|
|
@@ -8537,8 +8600,8 @@ export declare const filterMap: {
|
|
|
8537
8600
|
*
|
|
8538
8601
|
* **When to use**
|
|
8539
8602
|
*
|
|
8540
|
-
* Use when
|
|
8541
|
-
* elements
|
|
8603
|
+
* Use when you need to filter each iterable element effectfully and transform
|
|
8604
|
+
* accepted elements into successful output values.
|
|
8542
8605
|
*
|
|
8543
8606
|
* **Details**
|
|
8544
8607
|
*
|
|
@@ -8562,8 +8625,8 @@ export declare const filterMapEffect: {
|
|
|
8562
8625
|
*
|
|
8563
8626
|
* **When to use**
|
|
8564
8627
|
*
|
|
8565
|
-
* Use when
|
|
8566
|
-
* elements
|
|
8628
|
+
* Use when you need to filter each iterable element effectfully and transform
|
|
8629
|
+
* accepted elements into successful output values.
|
|
8567
8630
|
*
|
|
8568
8631
|
* **Details**
|
|
8569
8632
|
*
|
|
@@ -8589,8 +8652,8 @@ export declare const filterMapEffect: {
|
|
|
8589
8652
|
*
|
|
8590
8653
|
* **When to use**
|
|
8591
8654
|
*
|
|
8592
|
-
* Use when
|
|
8593
|
-
* elements
|
|
8655
|
+
* Use when you need to filter each iterable element effectfully and transform
|
|
8656
|
+
* accepted elements into successful output values.
|
|
8594
8657
|
*
|
|
8595
8658
|
* **Details**
|
|
8596
8659
|
*
|
|
@@ -8615,6 +8678,11 @@ export declare const filterMapEffect: {
|
|
|
8615
8678
|
/**
|
|
8616
8679
|
* Filters an effect, providing an alternative effect if the predicate fails.
|
|
8617
8680
|
*
|
|
8681
|
+
* **When to use**
|
|
8682
|
+
*
|
|
8683
|
+
* Use when a successful value that fails a predicate should continue with an
|
|
8684
|
+
* effectful fallback instead of failing the effect.
|
|
8685
|
+
*
|
|
8618
8686
|
* **Details**
|
|
8619
8687
|
*
|
|
8620
8688
|
* This function applies a predicate to the result of an effect. If the
|
|
@@ -8647,6 +8715,11 @@ export declare const filterOrElse: {
|
|
|
8647
8715
|
/**
|
|
8648
8716
|
* Filters an effect, providing an alternative effect if the predicate fails.
|
|
8649
8717
|
*
|
|
8718
|
+
* **When to use**
|
|
8719
|
+
*
|
|
8720
|
+
* Use when a successful value that fails a predicate should continue with an
|
|
8721
|
+
* effectful fallback instead of failing the effect.
|
|
8722
|
+
*
|
|
8650
8723
|
* **Details**
|
|
8651
8724
|
*
|
|
8652
8725
|
* This function applies a predicate to the result of an effect. If the
|
|
@@ -8679,6 +8752,11 @@ export declare const filterOrElse: {
|
|
|
8679
8752
|
/**
|
|
8680
8753
|
* Filters an effect, providing an alternative effect if the predicate fails.
|
|
8681
8754
|
*
|
|
8755
|
+
* **When to use**
|
|
8756
|
+
*
|
|
8757
|
+
* Use when a successful value that fails a predicate should continue with an
|
|
8758
|
+
* effectful fallback instead of failing the effect.
|
|
8759
|
+
*
|
|
8682
8760
|
* **Details**
|
|
8683
8761
|
*
|
|
8684
8762
|
* This function applies a predicate to the result of an effect. If the
|
|
@@ -8711,6 +8789,11 @@ export declare const filterOrElse: {
|
|
|
8711
8789
|
/**
|
|
8712
8790
|
* Filters an effect, providing an alternative effect if the predicate fails.
|
|
8713
8791
|
*
|
|
8792
|
+
* **When to use**
|
|
8793
|
+
*
|
|
8794
|
+
* Use when a successful value that fails a predicate should continue with an
|
|
8795
|
+
* effectful fallback instead of failing the effect.
|
|
8796
|
+
*
|
|
8714
8797
|
* **Details**
|
|
8715
8798
|
*
|
|
8716
8799
|
* This function applies a predicate to the result of an effect. If the
|
|
@@ -8743,6 +8826,11 @@ export declare const filterOrElse: {
|
|
|
8743
8826
|
/**
|
|
8744
8827
|
* Filters an effect, providing an alternative effect if the predicate fails.
|
|
8745
8828
|
*
|
|
8829
|
+
* **When to use**
|
|
8830
|
+
*
|
|
8831
|
+
* Use when a successful value that fails a predicate should continue with an
|
|
8832
|
+
* effectful fallback instead of failing the effect.
|
|
8833
|
+
*
|
|
8746
8834
|
* **Details**
|
|
8747
8835
|
*
|
|
8748
8836
|
* This function applies a predicate to the result of an effect. If the
|
|
@@ -9229,8 +9317,8 @@ export declare const filterMapOrFail: {
|
|
|
9229
9317
|
*
|
|
9230
9318
|
* **When to use**
|
|
9231
9319
|
*
|
|
9232
|
-
* Use when an effectful check
|
|
9233
|
-
* representing the skipped case explicitly.
|
|
9320
|
+
* Use when you need an effectful check to decide whether another effect should
|
|
9321
|
+
* run while representing the skipped case explicitly.
|
|
9234
9322
|
*
|
|
9235
9323
|
* **Details**
|
|
9236
9324
|
*
|
|
@@ -9266,8 +9354,8 @@ export declare const when: {
|
|
|
9266
9354
|
*
|
|
9267
9355
|
* **When to use**
|
|
9268
9356
|
*
|
|
9269
|
-
* Use when an effectful check
|
|
9270
|
-
* representing the skipped case explicitly.
|
|
9357
|
+
* Use when you need an effectful check to decide whether another effect should
|
|
9358
|
+
* run while representing the skipped case explicitly.
|
|
9271
9359
|
*
|
|
9272
9360
|
* **Details**
|
|
9273
9361
|
*
|
|
@@ -9303,8 +9391,8 @@ export declare const when: {
|
|
|
9303
9391
|
*
|
|
9304
9392
|
* **When to use**
|
|
9305
9393
|
*
|
|
9306
|
-
* Use when an effectful check
|
|
9307
|
-
* representing the skipped case explicitly.
|
|
9394
|
+
* Use when you need an effectful check to decide whether another effect should
|
|
9395
|
+
* run while representing the skipped case explicitly.
|
|
9308
9396
|
*
|
|
9309
9397
|
* **Details**
|
|
9310
9398
|
*
|
|
@@ -9341,8 +9429,8 @@ export declare const when: {
|
|
|
9341
9429
|
*
|
|
9342
9430
|
* **When to use**
|
|
9343
9431
|
*
|
|
9344
|
-
* Use when
|
|
9345
|
-
* failure without triggering side effects.
|
|
9432
|
+
* Use when you need to fold an `Effect` into a value by handling success and
|
|
9433
|
+
* failure differently without triggering side effects.
|
|
9346
9434
|
*
|
|
9347
9435
|
* **Details**
|
|
9348
9436
|
*
|
|
@@ -9394,8 +9482,8 @@ export declare const match: {
|
|
|
9394
9482
|
*
|
|
9395
9483
|
* **When to use**
|
|
9396
9484
|
*
|
|
9397
|
-
* Use when
|
|
9398
|
-
* failure without triggering side effects.
|
|
9485
|
+
* Use when you need to fold an `Effect` into a value by handling success and
|
|
9486
|
+
* failure differently without triggering side effects.
|
|
9399
9487
|
*
|
|
9400
9488
|
* **Details**
|
|
9401
9489
|
*
|
|
@@ -9450,8 +9538,8 @@ export declare const match: {
|
|
|
9450
9538
|
*
|
|
9451
9539
|
* **When to use**
|
|
9452
9540
|
*
|
|
9453
|
-
* Use when
|
|
9454
|
-
* failure without triggering side effects.
|
|
9541
|
+
* Use when you need to fold an `Effect` into a value by handling success and
|
|
9542
|
+
* failure differently without triggering side effects.
|
|
9455
9543
|
*
|
|
9456
9544
|
* **Details**
|
|
9457
9545
|
*
|
|
@@ -9507,9 +9595,8 @@ export declare const match: {
|
|
|
9507
9595
|
*
|
|
9508
9596
|
* **When to use**
|
|
9509
9597
|
*
|
|
9510
|
-
* Use when you need to handle both success and failure cases
|
|
9511
|
-
*
|
|
9512
|
-
* scenarios where you frequently work with already computed values.
|
|
9598
|
+
* Use when you need to handle both success and failure cases of an
|
|
9599
|
+
* already-resolved `Effect` with optimized handling.
|
|
9513
9600
|
*
|
|
9514
9601
|
* **Details**
|
|
9515
9602
|
*
|
|
@@ -9544,9 +9631,8 @@ export declare const matchEager: {
|
|
|
9544
9631
|
*
|
|
9545
9632
|
* **When to use**
|
|
9546
9633
|
*
|
|
9547
|
-
* Use when you need to handle both success and failure cases
|
|
9548
|
-
*
|
|
9549
|
-
* scenarios where you frequently work with already computed values.
|
|
9634
|
+
* Use when you need to handle both success and failure cases of an
|
|
9635
|
+
* already-resolved `Effect` with optimized handling.
|
|
9550
9636
|
*
|
|
9551
9637
|
* **Details**
|
|
9552
9638
|
*
|
|
@@ -9584,9 +9670,8 @@ export declare const matchEager: {
|
|
|
9584
9670
|
*
|
|
9585
9671
|
* **When to use**
|
|
9586
9672
|
*
|
|
9587
|
-
* Use when you need to handle both success and failure cases
|
|
9588
|
-
*
|
|
9589
|
-
* scenarios where you frequently work with already computed values.
|
|
9673
|
+
* Use when you need to handle both success and failure cases of an
|
|
9674
|
+
* already-resolved `Effect` with optimized handling.
|
|
9590
9675
|
*
|
|
9591
9676
|
* **Details**
|
|
9592
9677
|
*
|
|
@@ -9624,9 +9709,8 @@ export declare const matchEager: {
|
|
|
9624
9709
|
*
|
|
9625
9710
|
* **When to use**
|
|
9626
9711
|
*
|
|
9627
|
-
* Use when
|
|
9628
|
-
*
|
|
9629
|
-
* handling logic for each failure type based on the cause.
|
|
9712
|
+
* Use when you need to fold an `Effect` while the failure handler inspects the
|
|
9713
|
+
* full `Cause`.
|
|
9630
9714
|
*
|
|
9631
9715
|
* **Details**
|
|
9632
9716
|
*
|
|
@@ -9661,9 +9745,8 @@ export declare const matchCause: {
|
|
|
9661
9745
|
*
|
|
9662
9746
|
* **When to use**
|
|
9663
9747
|
*
|
|
9664
|
-
* Use when
|
|
9665
|
-
*
|
|
9666
|
-
* handling logic for each failure type based on the cause.
|
|
9748
|
+
* Use when you need to fold an `Effect` while the failure handler inspects the
|
|
9749
|
+
* full `Cause`.
|
|
9667
9750
|
*
|
|
9668
9751
|
* **Details**
|
|
9669
9752
|
*
|
|
@@ -9701,9 +9784,8 @@ export declare const matchCause: {
|
|
|
9701
9784
|
*
|
|
9702
9785
|
* **When to use**
|
|
9703
9786
|
*
|
|
9704
|
-
* Use when
|
|
9705
|
-
*
|
|
9706
|
-
* handling logic for each failure type based on the cause.
|
|
9787
|
+
* Use when you need to fold an `Effect` while the failure handler inspects the
|
|
9788
|
+
* full `Cause`.
|
|
9707
9789
|
*
|
|
9708
9790
|
* **Details**
|
|
9709
9791
|
*
|
|
@@ -9742,9 +9824,8 @@ export declare const matchCause: {
|
|
|
9742
9824
|
*
|
|
9743
9825
|
* **When to use**
|
|
9744
9826
|
*
|
|
9745
|
-
* Use when
|
|
9746
|
-
*
|
|
9747
|
-
* it automatically falls back to the regular `matchCause` behavior.
|
|
9827
|
+
* Use when you expect an `Effect` to already be resolved and want to match the
|
|
9828
|
+
* `Cause` without regular effect pipeline overhead.
|
|
9748
9829
|
*
|
|
9749
9830
|
* **Details**
|
|
9750
9831
|
*
|
|
@@ -9772,9 +9853,8 @@ export declare const matchCauseEager: {
|
|
|
9772
9853
|
*
|
|
9773
9854
|
* **When to use**
|
|
9774
9855
|
*
|
|
9775
|
-
* Use when
|
|
9776
|
-
*
|
|
9777
|
-
* it automatically falls back to the regular `matchCause` behavior.
|
|
9856
|
+
* Use when you expect an `Effect` to already be resolved and want to match the
|
|
9857
|
+
* `Cause` without regular effect pipeline overhead.
|
|
9778
9858
|
*
|
|
9779
9859
|
* **Details**
|
|
9780
9860
|
*
|
|
@@ -9805,9 +9885,8 @@ export declare const matchCauseEager: {
|
|
|
9805
9885
|
*
|
|
9806
9886
|
* **When to use**
|
|
9807
9887
|
*
|
|
9808
|
-
* Use when
|
|
9809
|
-
*
|
|
9810
|
-
* it automatically falls back to the regular `matchCause` behavior.
|
|
9888
|
+
* Use when you expect an `Effect` to already be resolved and want to match the
|
|
9889
|
+
* `Cause` without regular effect pipeline overhead.
|
|
9811
9890
|
*
|
|
9812
9891
|
* **Details**
|
|
9813
9892
|
*
|
|
@@ -9839,9 +9918,8 @@ export declare const matchCauseEager: {
|
|
|
9839
9918
|
*
|
|
9840
9919
|
* **When to use**
|
|
9841
9920
|
*
|
|
9842
|
-
* Use when success and cause-aware failure handlers
|
|
9843
|
-
*
|
|
9844
|
-
* while unresolved inputs keep normal effectful matching behavior.
|
|
9921
|
+
* Use when you need effectful success and cause-aware failure handlers for
|
|
9922
|
+
* `Effect` inputs that may already be resolved.
|
|
9845
9923
|
*
|
|
9846
9924
|
* **Details**
|
|
9847
9925
|
*
|
|
@@ -9861,9 +9939,8 @@ export declare const matchCauseEffectEager: {
|
|
|
9861
9939
|
*
|
|
9862
9940
|
* **When to use**
|
|
9863
9941
|
*
|
|
9864
|
-
* Use when success and cause-aware failure handlers
|
|
9865
|
-
*
|
|
9866
|
-
* while unresolved inputs keep normal effectful matching behavior.
|
|
9942
|
+
* Use when you need effectful success and cause-aware failure handlers for
|
|
9943
|
+
* `Effect` inputs that may already be resolved.
|
|
9867
9944
|
*
|
|
9868
9945
|
* **Details**
|
|
9869
9946
|
*
|
|
@@ -9886,9 +9963,8 @@ export declare const matchCauseEffectEager: {
|
|
|
9886
9963
|
*
|
|
9887
9964
|
* **When to use**
|
|
9888
9965
|
*
|
|
9889
|
-
* Use when success and cause-aware failure handlers
|
|
9890
|
-
*
|
|
9891
|
-
* while unresolved inputs keep normal effectful matching behavior.
|
|
9966
|
+
* Use when you need effectful success and cause-aware failure handlers for
|
|
9967
|
+
* `Effect` inputs that may already be resolved.
|
|
9892
9968
|
*
|
|
9893
9969
|
* **Details**
|
|
9894
9970
|
*
|
|
@@ -9912,8 +9988,8 @@ export declare const matchCauseEffectEager: {
|
|
|
9912
9988
|
*
|
|
9913
9989
|
* **When to use**
|
|
9914
9990
|
*
|
|
9915
|
-
* Use when
|
|
9916
|
-
* failure
|
|
9991
|
+
* Use when you need to fold an `Effect` with effectful success handlers and
|
|
9992
|
+
* `Cause`-aware failure handlers.
|
|
9917
9993
|
*
|
|
9918
9994
|
* **Details**
|
|
9919
9995
|
*
|
|
@@ -9972,8 +10048,8 @@ export declare const matchCauseEffect: {
|
|
|
9972
10048
|
*
|
|
9973
10049
|
* **When to use**
|
|
9974
10050
|
*
|
|
9975
|
-
* Use when
|
|
9976
|
-
* failure
|
|
10051
|
+
* Use when you need to fold an `Effect` with effectful success handlers and
|
|
10052
|
+
* `Cause`-aware failure handlers.
|
|
9977
10053
|
*
|
|
9978
10054
|
* **Details**
|
|
9979
10055
|
*
|
|
@@ -10035,8 +10111,8 @@ export declare const matchCauseEffect: {
|
|
|
10035
10111
|
*
|
|
10036
10112
|
* **When to use**
|
|
10037
10113
|
*
|
|
10038
|
-
* Use when
|
|
10039
|
-
* failure
|
|
10114
|
+
* Use when you need to fold an `Effect` with effectful success handlers and
|
|
10115
|
+
* `Cause`-aware failure handlers.
|
|
10040
10116
|
*
|
|
10041
10117
|
* **Details**
|
|
10042
10118
|
*
|
|
@@ -10099,7 +10175,8 @@ export declare const matchCauseEffect: {
|
|
|
10099
10175
|
*
|
|
10100
10176
|
* **When to use**
|
|
10101
10177
|
*
|
|
10102
|
-
* Use when
|
|
10178
|
+
* Use when you need to handle an `Effect`'s failure or success with handlers
|
|
10179
|
+
* that return effects.
|
|
10103
10180
|
*
|
|
10104
10181
|
* **Details**
|
|
10105
10182
|
*
|
|
@@ -10159,7 +10236,8 @@ export declare const matchEffect: {
|
|
|
10159
10236
|
*
|
|
10160
10237
|
* **When to use**
|
|
10161
10238
|
*
|
|
10162
|
-
* Use when
|
|
10239
|
+
* Use when you need to handle an `Effect`'s failure or success with handlers
|
|
10240
|
+
* that return effects.
|
|
10163
10241
|
*
|
|
10164
10242
|
* **Details**
|
|
10165
10243
|
*
|
|
@@ -10222,7 +10300,8 @@ export declare const matchEffect: {
|
|
|
10222
10300
|
*
|
|
10223
10301
|
* **When to use**
|
|
10224
10302
|
*
|
|
10225
|
-
* Use when
|
|
10303
|
+
* Use when you need to handle an `Effect`'s failure or success with handlers
|
|
10304
|
+
* that return effects.
|
|
10226
10305
|
*
|
|
10227
10306
|
* **Details**
|
|
10228
10307
|
*
|
|
@@ -11424,6 +11503,11 @@ export declare const provideService: {
|
|
|
11424
11503
|
/**
|
|
11425
11504
|
* Provides one service to an effect using an effectful acquisition.
|
|
11426
11505
|
*
|
|
11506
|
+
* **When to use**
|
|
11507
|
+
*
|
|
11508
|
+
* Use when the service implementation must be created by an effect and its
|
|
11509
|
+
* acquisition failure should remain in the returned effect.
|
|
11510
|
+
*
|
|
11427
11511
|
* **Details**
|
|
11428
11512
|
*
|
|
11429
11513
|
* `provideServiceEffect` runs the acquisition effect to produce the service
|
|
@@ -11478,6 +11562,11 @@ export declare const provideServiceEffect: {
|
|
|
11478
11562
|
/**
|
|
11479
11563
|
* Provides one service to an effect using an effectful acquisition.
|
|
11480
11564
|
*
|
|
11565
|
+
* **When to use**
|
|
11566
|
+
*
|
|
11567
|
+
* Use when the service implementation must be created by an effect and its
|
|
11568
|
+
* acquisition failure should remain in the returned effect.
|
|
11569
|
+
*
|
|
11481
11570
|
* **Details**
|
|
11482
11571
|
*
|
|
11483
11572
|
* `provideServiceEffect` runs the acquisition effect to produce the service
|
|
@@ -11532,6 +11621,11 @@ export declare const provideServiceEffect: {
|
|
|
11532
11621
|
/**
|
|
11533
11622
|
* Provides one service to an effect using an effectful acquisition.
|
|
11534
11623
|
*
|
|
11624
|
+
* **When to use**
|
|
11625
|
+
*
|
|
11626
|
+
* Use when the service implementation must be created by an effect and its
|
|
11627
|
+
* acquisition failure should remain in the returned effect.
|
|
11628
|
+
*
|
|
11535
11629
|
* **Details**
|
|
11536
11630
|
*
|
|
11537
11631
|
* `provideServiceEffect` runs the acquisition effect to produce the service
|
|
@@ -11760,6 +11854,11 @@ export declare const scoped: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Ex
|
|
|
11760
11854
|
/**
|
|
11761
11855
|
* Creates a scoped effect by providing access to the scope.
|
|
11762
11856
|
*
|
|
11857
|
+
* **When to use**
|
|
11858
|
+
*
|
|
11859
|
+
* Use when resource acquisition needs direct access to the scope being created,
|
|
11860
|
+
* for example to register finalizers manually.
|
|
11861
|
+
*
|
|
11763
11862
|
* **Example** (Working with an explicit scope)
|
|
11764
11863
|
*
|
|
11765
11864
|
* ```ts
|
|
@@ -11866,8 +11965,8 @@ export declare const acquireRelease: <A, E, R, R2>(acquire: Effect<A, E, R>, rel
|
|
|
11866
11965
|
*
|
|
11867
11966
|
* **When to use**
|
|
11868
11967
|
*
|
|
11869
|
-
* Use with JavaScript `Disposable` or `AsyncDisposable` resources
|
|
11870
|
-
* be closed with the surrounding scope.
|
|
11968
|
+
* Use when you work with JavaScript `Disposable` or `AsyncDisposable` resources
|
|
11969
|
+
* that should be closed with the surrounding scope.
|
|
11871
11970
|
*
|
|
11872
11971
|
* **Details**
|
|
11873
11972
|
*
|
|
@@ -12626,10 +12725,8 @@ export declare const onExitFilter: {
|
|
|
12626
12725
|
*
|
|
12627
12726
|
* **When to use**
|
|
12628
12727
|
*
|
|
12629
|
-
* Use when you
|
|
12630
|
-
*
|
|
12631
|
-
* and all following evaluations will immediately return the cached value,
|
|
12632
|
-
* improving performance and reducing unnecessary work.
|
|
12728
|
+
* Use when you need an expensive or time-consuming operation to be evaluated
|
|
12729
|
+
* once and reused by later callers.
|
|
12633
12730
|
*
|
|
12634
12731
|
* **Details**
|
|
12635
12732
|
*
|
|
@@ -12690,14 +12787,8 @@ export declare const cached: <A, E, R>(self: Effect<A, E, R>) => Effect<Effect<A
|
|
|
12690
12787
|
*
|
|
12691
12788
|
* **When to use**
|
|
12692
12789
|
*
|
|
12693
|
-
* Use when you
|
|
12694
|
-
*
|
|
12695
|
-
*
|
|
12696
|
-
* It's ideal for scenarios where the result of an effect doesn't change
|
|
12697
|
-
* frequently and can be reused for a specified duration.
|
|
12698
|
-
*
|
|
12699
|
-
* By caching the result, you can improve efficiency and reduce unnecessary
|
|
12700
|
-
* computations, especially in performance-critical applications.
|
|
12790
|
+
* Use when you need a costly effect result to be reused for a bounded duration
|
|
12791
|
+
* before being recomputed.
|
|
12701
12792
|
*
|
|
12702
12793
|
* **Details**
|
|
12703
12794
|
*
|
|
@@ -12757,14 +12848,8 @@ export declare const cachedWithTTL: {
|
|
|
12757
12848
|
*
|
|
12758
12849
|
* **When to use**
|
|
12759
12850
|
*
|
|
12760
|
-
* Use when you
|
|
12761
|
-
*
|
|
12762
|
-
*
|
|
12763
|
-
* It's ideal for scenarios where the result of an effect doesn't change
|
|
12764
|
-
* frequently and can be reused for a specified duration.
|
|
12765
|
-
*
|
|
12766
|
-
* By caching the result, you can improve efficiency and reduce unnecessary
|
|
12767
|
-
* computations, especially in performance-critical applications.
|
|
12851
|
+
* Use when you need a costly effect result to be reused for a bounded duration
|
|
12852
|
+
* before being recomputed.
|
|
12768
12853
|
*
|
|
12769
12854
|
* **Details**
|
|
12770
12855
|
*
|
|
@@ -12824,14 +12909,8 @@ export declare const cachedWithTTL: {
|
|
|
12824
12909
|
*
|
|
12825
12910
|
* **When to use**
|
|
12826
12911
|
*
|
|
12827
|
-
* Use when you
|
|
12828
|
-
*
|
|
12829
|
-
*
|
|
12830
|
-
* It's ideal for scenarios where the result of an effect doesn't change
|
|
12831
|
-
* frequently and can be reused for a specified duration.
|
|
12832
|
-
*
|
|
12833
|
-
* By caching the result, you can improve efficiency and reduce unnecessary
|
|
12834
|
-
* computations, especially in performance-critical applications.
|
|
12912
|
+
* Use when you need a costly effect result to be reused for a bounded duration
|
|
12913
|
+
* before being recomputed.
|
|
12835
12914
|
*
|
|
12836
12915
|
* **Details**
|
|
12837
12916
|
*
|
|
@@ -13938,6 +14017,11 @@ export declare const repeat: {
|
|
|
13938
14017
|
* Repeats an effect according to a schedule and runs a fallback effect if
|
|
13939
14018
|
* repetition fails before the schedule completes.
|
|
13940
14019
|
*
|
|
14020
|
+
* **When to use**
|
|
14021
|
+
*
|
|
14022
|
+
* Use when successful repetitions should follow a schedule, but failures from
|
|
14023
|
+
* the repeated effect or schedule need an effectful fallback.
|
|
14024
|
+
*
|
|
13941
14025
|
* **Details**
|
|
13942
14026
|
*
|
|
13943
14027
|
* If the repeated effect or schedule step fails, `orElse` receives the failure
|
|
@@ -13981,6 +14065,11 @@ export declare const repeatOrElse: {
|
|
|
13981
14065
|
* Repeats an effect according to a schedule and runs a fallback effect if
|
|
13982
14066
|
* repetition fails before the schedule completes.
|
|
13983
14067
|
*
|
|
14068
|
+
* **When to use**
|
|
14069
|
+
*
|
|
14070
|
+
* Use when successful repetitions should follow a schedule, but failures from
|
|
14071
|
+
* the repeated effect or schedule need an effectful fallback.
|
|
14072
|
+
*
|
|
13984
14073
|
* **Details**
|
|
13985
14074
|
*
|
|
13986
14075
|
* If the repeated effect or schedule step fails, `orElse` receives the failure
|
|
@@ -14024,6 +14113,11 @@ export declare const repeatOrElse: {
|
|
|
14024
14113
|
* Repeats an effect according to a schedule and runs a fallback effect if
|
|
14025
14114
|
* repetition fails before the schedule completes.
|
|
14026
14115
|
*
|
|
14116
|
+
* **When to use**
|
|
14117
|
+
*
|
|
14118
|
+
* Use when successful repetitions should follow a schedule, but failures from
|
|
14119
|
+
* the repeated effect or schedule need an effectful fallback.
|
|
14120
|
+
*
|
|
14027
14121
|
* **Details**
|
|
14028
14122
|
*
|
|
14029
14123
|
* If the repeated effect or schedule step fails, `orElse` receives the failure
|
|
@@ -14069,9 +14163,8 @@ export declare const repeatOrElse: {
|
|
|
14069
14163
|
*
|
|
14070
14164
|
* **When to use**
|
|
14071
14165
|
*
|
|
14072
|
-
* Use
|
|
14073
|
-
*
|
|
14074
|
-
* separately.
|
|
14166
|
+
* Use when you need an array of identical effect values without running them
|
|
14167
|
+
* yet.
|
|
14075
14168
|
*
|
|
14076
14169
|
* **Details**
|
|
14077
14170
|
*
|
|
@@ -14089,9 +14182,8 @@ export declare const replicate: {
|
|
|
14089
14182
|
*
|
|
14090
14183
|
* **When to use**
|
|
14091
14184
|
*
|
|
14092
|
-
* Use
|
|
14093
|
-
*
|
|
14094
|
-
* separately.
|
|
14185
|
+
* Use when you need an array of identical effect values without running them
|
|
14186
|
+
* yet.
|
|
14095
14187
|
*
|
|
14096
14188
|
* **Details**
|
|
14097
14189
|
*
|
|
@@ -14109,9 +14201,8 @@ export declare const replicate: {
|
|
|
14109
14201
|
*
|
|
14110
14202
|
* **When to use**
|
|
14111
14203
|
*
|
|
14112
|
-
* Use
|
|
14113
|
-
*
|
|
14114
|
-
* separately.
|
|
14204
|
+
* Use when you need an array of identical effect values without running them
|
|
14205
|
+
* yet.
|
|
14115
14206
|
*
|
|
14116
14207
|
* **Details**
|
|
14117
14208
|
*
|
|
@@ -14128,6 +14219,11 @@ export declare const replicate: {
|
|
|
14128
14219
|
/**
|
|
14129
14220
|
* Performs this effect `n` times and collects results with `Effect.all` semantics.
|
|
14130
14221
|
*
|
|
14222
|
+
* **When to use**
|
|
14223
|
+
*
|
|
14224
|
+
* Use when you want to run the repeated effects immediately, with optional
|
|
14225
|
+
* concurrency control or result discarding.
|
|
14226
|
+
*
|
|
14131
14227
|
* **Details**
|
|
14132
14228
|
*
|
|
14133
14229
|
* Use `concurrency` to control parallelism and `discard: true` to ignore results.
|
|
@@ -14150,6 +14246,11 @@ export declare const replicateEffect: {
|
|
|
14150
14246
|
/**
|
|
14151
14247
|
* Performs this effect `n` times and collects results with `Effect.all` semantics.
|
|
14152
14248
|
*
|
|
14249
|
+
* **When to use**
|
|
14250
|
+
*
|
|
14251
|
+
* Use when you want to run the repeated effects immediately, with optional
|
|
14252
|
+
* concurrency control or result discarding.
|
|
14253
|
+
*
|
|
14153
14254
|
* **Details**
|
|
14154
14255
|
*
|
|
14155
14256
|
* Use `concurrency` to control parallelism and `discard: true` to ignore results.
|
|
@@ -14175,6 +14276,11 @@ export declare const replicateEffect: {
|
|
|
14175
14276
|
/**
|
|
14176
14277
|
* Performs this effect `n` times and collects results with `Effect.all` semantics.
|
|
14177
14278
|
*
|
|
14279
|
+
* **When to use**
|
|
14280
|
+
*
|
|
14281
|
+
* Use when you want to run the repeated effects immediately, with optional
|
|
14282
|
+
* concurrency control or result discarding.
|
|
14283
|
+
*
|
|
14178
14284
|
* **Details**
|
|
14179
14285
|
*
|
|
14180
14286
|
* Use `concurrency` to control parallelism and `discard: true` to ignore results.
|
|
@@ -14200,6 +14306,11 @@ export declare const replicateEffect: {
|
|
|
14200
14306
|
/**
|
|
14201
14307
|
* Performs this effect `n` times and collects results with `Effect.all` semantics.
|
|
14202
14308
|
*
|
|
14309
|
+
* **When to use**
|
|
14310
|
+
*
|
|
14311
|
+
* Use when you want to run the repeated effects immediately, with optional
|
|
14312
|
+
* concurrency control or result discarding.
|
|
14313
|
+
*
|
|
14203
14314
|
* **Details**
|
|
14204
14315
|
*
|
|
14205
14316
|
* Use `concurrency` to control parallelism and `discard: true` to ignore results.
|
|
@@ -14225,6 +14336,11 @@ export declare const replicateEffect: {
|
|
|
14225
14336
|
/**
|
|
14226
14337
|
* Performs this effect `n` times and collects results with `Effect.all` semantics.
|
|
14227
14338
|
*
|
|
14339
|
+
* **When to use**
|
|
14340
|
+
*
|
|
14341
|
+
* Use when you want to run the repeated effects immediately, with optional
|
|
14342
|
+
* concurrency control or result discarding.
|
|
14343
|
+
*
|
|
14228
14344
|
* **Details**
|
|
14229
14345
|
*
|
|
14230
14346
|
* Use `concurrency` to control parallelism and `discard: true` to ignore results.
|
|
@@ -15568,9 +15684,7 @@ export declare const withParentSpan: {
|
|
|
15568
15684
|
*
|
|
15569
15685
|
* **When to use**
|
|
15570
15686
|
*
|
|
15571
|
-
* Use
|
|
15572
|
-
* concurrent requests made with the same resolver to be collected and completed
|
|
15573
|
-
* by resolver logic.
|
|
15687
|
+
* Use when you need resolver-driven batching for a typed `Request`.
|
|
15574
15688
|
*
|
|
15575
15689
|
* **Example** (Executing a request through a resolver)
|
|
15576
15690
|
*
|
|
@@ -15608,9 +15722,7 @@ export declare const request: {
|
|
|
15608
15722
|
*
|
|
15609
15723
|
* **When to use**
|
|
15610
15724
|
*
|
|
15611
|
-
* Use
|
|
15612
|
-
* concurrent requests made with the same resolver to be collected and completed
|
|
15613
|
-
* by resolver logic.
|
|
15725
|
+
* Use when you need resolver-driven batching for a typed `Request`.
|
|
15614
15726
|
*
|
|
15615
15727
|
* **Example** (Executing a request through a resolver)
|
|
15616
15728
|
*
|
|
@@ -15648,9 +15760,7 @@ export declare const request: {
|
|
|
15648
15760
|
*
|
|
15649
15761
|
* **When to use**
|
|
15650
15762
|
*
|
|
15651
|
-
* Use
|
|
15652
|
-
* concurrent requests made with the same resolver to be collected and completed
|
|
15653
|
-
* by resolver logic.
|
|
15763
|
+
* Use when you need resolver-driven batching for a typed `Request`.
|
|
15654
15764
|
*
|
|
15655
15765
|
* **Example** (Executing a request through a resolver)
|
|
15656
15766
|
*
|
|
@@ -16044,9 +16154,7 @@ export interface RunOptions {
|
|
|
16044
16154
|
*
|
|
16045
16155
|
* **When to use**
|
|
16046
16156
|
*
|
|
16047
|
-
* Use when
|
|
16048
|
-
* be observed or interrupted. Prefer this when you do not need a `Promise` or
|
|
16049
|
-
* synchronous result.
|
|
16157
|
+
* Use when you need to start an effect in the background and receive a fiber.
|
|
16050
16158
|
*
|
|
16051
16159
|
* **Example** (Running an effect in the background)
|
|
16052
16160
|
*
|
|
@@ -16076,6 +16184,11 @@ export declare const runFork: <A, E>(effect: Effect<A, E, never>, options?: RunO
|
|
|
16076
16184
|
/**
|
|
16077
16185
|
* Runs an effect in the background with the provided services.
|
|
16078
16186
|
*
|
|
16187
|
+
* **When to use**
|
|
16188
|
+
*
|
|
16189
|
+
* Use when an effect still requires services, you already have a `Context`, and
|
|
16190
|
+
* you want a background fiber.
|
|
16191
|
+
*
|
|
16079
16192
|
* **Example** (Running with services in the background)
|
|
16080
16193
|
*
|
|
16081
16194
|
* ```ts
|
|
@@ -16107,6 +16220,11 @@ export declare const runForkWith: <R>(context: Context.Context<R>) => <A, E>(eff
|
|
|
16107
16220
|
/**
|
|
16108
16221
|
* Forks an effect with the provided services, registers `onExit` as a fiber observer, and returns an interruptor.
|
|
16109
16222
|
*
|
|
16223
|
+
* **When to use**
|
|
16224
|
+
*
|
|
16225
|
+
* Use when embedding an effect into callback-style code with explicit services
|
|
16226
|
+
* and a synchronous interruptor.
|
|
16227
|
+
*
|
|
16110
16228
|
* **Details**
|
|
16111
16229
|
*
|
|
16112
16230
|
* The returned interruptor calls `fiber.interruptUnsafe`, optionally with an interruptor id.
|
|
@@ -16233,6 +16351,11 @@ export declare const runPromise: <A, E>(effect: Effect<A, E>, options?: RunOptio
|
|
|
16233
16351
|
/**
|
|
16234
16352
|
* Executes an effect as a Promise with the provided services.
|
|
16235
16353
|
*
|
|
16354
|
+
* **When to use**
|
|
16355
|
+
*
|
|
16356
|
+
* Use when you already have a `Context` and need Promise interop that rejects on
|
|
16357
|
+
* effect failure.
|
|
16358
|
+
*
|
|
16236
16359
|
* **Example** (Running with services as a promise)
|
|
16237
16360
|
*
|
|
16238
16361
|
* ```ts
|
|
@@ -16271,10 +16394,9 @@ export declare const runPromiseWith: <R>(context: Context.Context<R>) => <A, E>(
|
|
|
16271
16394
|
*
|
|
16272
16395
|
* **Details**
|
|
16273
16396
|
*
|
|
16274
|
-
* The `Exit` type represents the result of the effect
|
|
16275
|
-
*
|
|
16276
|
-
*
|
|
16277
|
-
* a `Cause` type.
|
|
16397
|
+
* The `Exit` type represents the result of the effect. Successful effects are
|
|
16398
|
+
* wrapped in `Success`, and failed effects are wrapped in `Failure` with a
|
|
16399
|
+
* `Cause`.
|
|
16278
16400
|
*
|
|
16279
16401
|
* **Example** (Observing promise results as Exit)
|
|
16280
16402
|
*
|
|
@@ -16313,6 +16435,11 @@ export declare const runPromiseExit: <A, E>(effect: Effect<A, E>, options?: RunO
|
|
|
16313
16435
|
/**
|
|
16314
16436
|
* Runs an effect and returns a Promise of Exit with provided services.
|
|
16315
16437
|
*
|
|
16438
|
+
* **When to use**
|
|
16439
|
+
*
|
|
16440
|
+
* Use when you already have a `Context` and need Promise interop that preserves
|
|
16441
|
+
* success and failure as an `Exit`.
|
|
16442
|
+
*
|
|
16316
16443
|
* **Example** (Running with services as an Exit promise)
|
|
16317
16444
|
*
|
|
16318
16445
|
* ```ts
|
|
@@ -16408,6 +16535,11 @@ export declare const runSync: <A, E>(effect: Effect<A, E>) => A;
|
|
|
16408
16535
|
/**
|
|
16409
16536
|
* Executes an effect synchronously with provided services.
|
|
16410
16537
|
*
|
|
16538
|
+
* **When to use**
|
|
16539
|
+
*
|
|
16540
|
+
* Use when you already have a `Context`, the effect is known to complete
|
|
16541
|
+
* synchronously, and failures should throw.
|
|
16542
|
+
*
|
|
16411
16543
|
* **Example** (Running synchronously with services)
|
|
16412
16544
|
*
|
|
16413
16545
|
* ```ts
|
|
@@ -16447,10 +16579,9 @@ export declare const runSyncWith: <R>(context: Context.Context<R>) => <A, E>(eff
|
|
|
16447
16579
|
*
|
|
16448
16580
|
* **Details**
|
|
16449
16581
|
*
|
|
16450
|
-
* The `Exit` type represents the result of the effect
|
|
16451
|
-
*
|
|
16452
|
-
*
|
|
16453
|
-
* a `Cause` type.
|
|
16582
|
+
* The `Exit` type represents the result of the effect. Successful effects are
|
|
16583
|
+
* wrapped in `Success`, and failed effects are wrapped in `Failure` with a
|
|
16584
|
+
* `Cause`.
|
|
16454
16585
|
*
|
|
16455
16586
|
* If the effect contains asynchronous operations, `runSyncExit` will
|
|
16456
16587
|
* return an `Failure` with a `Die` cause, indicating that the effect cannot be
|
|
@@ -16513,6 +16644,11 @@ export declare const runSyncExit: <A, E>(effect: Effect<A, E>) => Exit.Exit<A, E
|
|
|
16513
16644
|
/**
|
|
16514
16645
|
* Runs an effect synchronously with provided services, returning an Exit result safely.
|
|
16515
16646
|
*
|
|
16647
|
+
* **When to use**
|
|
16648
|
+
*
|
|
16649
|
+
* Use when you already have a `Context` and need a synchronous `Exit` instead of
|
|
16650
|
+
* throwing on failure.
|
|
16651
|
+
*
|
|
16516
16652
|
* **Example** (Running synchronously with services as Exit)
|
|
16517
16653
|
*
|
|
16518
16654
|
* ```ts
|
|
@@ -19002,13 +19138,10 @@ export declare class Transaction extends Transaction_base {
|
|
|
19002
19138
|
* If called inside an active transaction, `tx` composes with the current transaction and reuses
|
|
19003
19139
|
* its journal and retry state instead of creating a nested boundary.
|
|
19004
19140
|
*
|
|
19005
|
-
*
|
|
19006
|
-
*
|
|
19007
|
-
*
|
|
19008
|
-
*
|
|
19009
|
-
*
|
|
19010
|
-
* - any of the accessed transactional values change during the execution of the transaction
|
|
19011
|
-
* due to a different transaction committing before the current.
|
|
19141
|
+
* Effect transactions are optimistic with retry. A transaction is retried when
|
|
19142
|
+
* its body explicitly calls `Effect.txRetry` and any accessed transactional
|
|
19143
|
+
* value changes, or when any accessed transactional value changes because a
|
|
19144
|
+
* different transaction commits before the current one.
|
|
19012
19145
|
*
|
|
19013
19146
|
* The outermost `tx` call creates the transaction boundary and commits or rolls back the full
|
|
19014
19147
|
* composed transaction.
|
|
@@ -19596,11 +19729,8 @@ export declare const satisfiesServicesType: <R>() => <A, E, R2 extends R>(effect
|
|
|
19596
19729
|
*
|
|
19597
19730
|
* **Details**
|
|
19598
19731
|
*
|
|
19599
|
-
*
|
|
19600
|
-
*
|
|
19601
|
-
* - For **Success effects**: Applies the mapping function immediately to the value
|
|
19602
|
-
* - For **Failure effects**: Returns the failure as-is without applying the mapping
|
|
19603
|
-
* - For **Pending effects**: Falls back to the regular `map` behavior
|
|
19732
|
+
* Success effects apply the mapping function immediately. Failure effects pass
|
|
19733
|
+
* through unchanged, and pending effects fall back to regular `map` behavior.
|
|
19604
19734
|
*
|
|
19605
19735
|
* **Example** (Mapping already completed effects)
|
|
19606
19736
|
*
|
|
@@ -19630,11 +19760,8 @@ export declare const mapEager: {
|
|
|
19630
19760
|
*
|
|
19631
19761
|
* **Details**
|
|
19632
19762
|
*
|
|
19633
|
-
*
|
|
19634
|
-
*
|
|
19635
|
-
* - For **Success effects**: Applies the mapping function immediately to the value
|
|
19636
|
-
* - For **Failure effects**: Returns the failure as-is without applying the mapping
|
|
19637
|
-
* - For **Pending effects**: Falls back to the regular `map` behavior
|
|
19763
|
+
* Success effects apply the mapping function immediately. Failure effects pass
|
|
19764
|
+
* through unchanged, and pending effects fall back to regular `map` behavior.
|
|
19638
19765
|
*
|
|
19639
19766
|
* **Example** (Mapping already completed effects)
|
|
19640
19767
|
*
|
|
@@ -19664,11 +19791,8 @@ export declare const mapEager: {
|
|
|
19664
19791
|
*
|
|
19665
19792
|
* **Details**
|
|
19666
19793
|
*
|
|
19667
|
-
*
|
|
19668
|
-
*
|
|
19669
|
-
* - For **Success effects**: Applies the mapping function immediately to the value
|
|
19670
|
-
* - For **Failure effects**: Returns the failure as-is without applying the mapping
|
|
19671
|
-
* - For **Pending effects**: Falls back to the regular `map` behavior
|
|
19794
|
+
* Success effects apply the mapping function immediately. Failure effects pass
|
|
19795
|
+
* through unchanged, and pending effects fall back to regular `map` behavior.
|
|
19672
19796
|
*
|
|
19673
19797
|
* **Example** (Mapping already completed effects)
|
|
19674
19798
|
*
|
|
@@ -19700,11 +19824,9 @@ export declare const mapEager: {
|
|
|
19700
19824
|
*
|
|
19701
19825
|
* **Details**
|
|
19702
19826
|
*
|
|
19703
|
-
*
|
|
19704
|
-
*
|
|
19705
|
-
*
|
|
19706
|
-
* - For **Failure effects**: Applies the mapping function immediately to the error
|
|
19707
|
-
* - For **Pending effects**: Falls back to the regular `mapError` behavior
|
|
19827
|
+
* Success effects pass through unchanged because there is no error to
|
|
19828
|
+
* transform. Failure effects apply the mapping function immediately, and
|
|
19829
|
+
* pending effects fall back to regular `mapError` behavior.
|
|
19708
19830
|
*
|
|
19709
19831
|
* **Example** (Mapping errors eagerly when possible)
|
|
19710
19832
|
*
|
|
@@ -19738,11 +19860,9 @@ export declare const mapErrorEager: {
|
|
|
19738
19860
|
*
|
|
19739
19861
|
* **Details**
|
|
19740
19862
|
*
|
|
19741
|
-
*
|
|
19742
|
-
*
|
|
19743
|
-
*
|
|
19744
|
-
* - For **Failure effects**: Applies the mapping function immediately to the error
|
|
19745
|
-
* - For **Pending effects**: Falls back to the regular `mapError` behavior
|
|
19863
|
+
* Success effects pass through unchanged because there is no error to
|
|
19864
|
+
* transform. Failure effects apply the mapping function immediately, and
|
|
19865
|
+
* pending effects fall back to regular `mapError` behavior.
|
|
19746
19866
|
*
|
|
19747
19867
|
* **Example** (Mapping errors eagerly when possible)
|
|
19748
19868
|
*
|
|
@@ -19776,11 +19896,9 @@ export declare const mapErrorEager: {
|
|
|
19776
19896
|
*
|
|
19777
19897
|
* **Details**
|
|
19778
19898
|
*
|
|
19779
|
-
*
|
|
19780
|
-
*
|
|
19781
|
-
*
|
|
19782
|
-
* - For **Failure effects**: Applies the mapping function immediately to the error
|
|
19783
|
-
* - For **Pending effects**: Falls back to the regular `mapError` behavior
|
|
19899
|
+
* Success effects pass through unchanged because there is no error to
|
|
19900
|
+
* transform. Failure effects apply the mapping function immediately, and
|
|
19901
|
+
* pending effects fall back to regular `mapError` behavior.
|
|
19784
19902
|
*
|
|
19785
19903
|
* **Example** (Mapping errors eagerly when possible)
|
|
19786
19904
|
*
|
|
@@ -19814,11 +19932,9 @@ export declare const mapErrorEager: {
|
|
|
19814
19932
|
*
|
|
19815
19933
|
* **Details**
|
|
19816
19934
|
*
|
|
19817
|
-
*
|
|
19818
|
-
*
|
|
19819
|
-
*
|
|
19820
|
-
* - For **Failure effects**: Applies the `onFailure` function immediately to the error
|
|
19821
|
-
* - For **Pending effects**: Falls back to the regular `mapBoth` behavior
|
|
19935
|
+
* Success effects apply `onSuccess` immediately, and failure effects apply
|
|
19936
|
+
* `onFailure` immediately. Pending effects fall back to regular `mapBoth`
|
|
19937
|
+
* behavior.
|
|
19822
19938
|
*
|
|
19823
19939
|
* **Example** (Mapping both channels eagerly when possible)
|
|
19824
19940
|
*
|
|
@@ -19853,11 +19969,9 @@ export declare const mapBothEager: {
|
|
|
19853
19969
|
*
|
|
19854
19970
|
* **Details**
|
|
19855
19971
|
*
|
|
19856
|
-
*
|
|
19857
|
-
*
|
|
19858
|
-
*
|
|
19859
|
-
* - For **Failure effects**: Applies the `onFailure` function immediately to the error
|
|
19860
|
-
* - For **Pending effects**: Falls back to the regular `mapBoth` behavior
|
|
19972
|
+
* Success effects apply `onSuccess` immediately, and failure effects apply
|
|
19973
|
+
* `onFailure` immediately. Pending effects fall back to regular `mapBoth`
|
|
19974
|
+
* behavior.
|
|
19861
19975
|
*
|
|
19862
19976
|
* **Example** (Mapping both channels eagerly when possible)
|
|
19863
19977
|
*
|
|
@@ -19895,11 +20009,9 @@ export declare const mapBothEager: {
|
|
|
19895
20009
|
*
|
|
19896
20010
|
* **Details**
|
|
19897
20011
|
*
|
|
19898
|
-
*
|
|
19899
|
-
*
|
|
19900
|
-
*
|
|
19901
|
-
* - For **Failure effects**: Applies the `onFailure` function immediately to the error
|
|
19902
|
-
* - For **Pending effects**: Falls back to the regular `mapBoth` behavior
|
|
20012
|
+
* Success effects apply `onSuccess` immediately, and failure effects apply
|
|
20013
|
+
* `onFailure` immediately. Pending effects fall back to regular `mapBoth`
|
|
20014
|
+
* behavior.
|
|
19903
20015
|
*
|
|
19904
20016
|
* **Example** (Mapping both channels eagerly when possible)
|
|
19905
20017
|
*
|
|
@@ -19938,11 +20050,9 @@ export declare const mapBothEager: {
|
|
|
19938
20050
|
*
|
|
19939
20051
|
* **Details**
|
|
19940
20052
|
*
|
|
19941
|
-
*
|
|
19942
|
-
*
|
|
19943
|
-
*
|
|
19944
|
-
* - For **Failure effects**: Returns the failure as-is without applying the flatMap
|
|
19945
|
-
* - For **Pending effects**: Falls back to the regular `flatMap` behavior
|
|
20053
|
+
* Success effects apply the flatMap function immediately. Failure effects pass
|
|
20054
|
+
* through unchanged, and pending effects fall back to regular `flatMap`
|
|
20055
|
+
* behavior.
|
|
19946
20056
|
*
|
|
19947
20057
|
* **Example** (Flat mapping eagerly when possible)
|
|
19948
20058
|
*
|
|
@@ -19975,11 +20085,9 @@ export declare const flatMapEager: {
|
|
|
19975
20085
|
*
|
|
19976
20086
|
* **Details**
|
|
19977
20087
|
*
|
|
19978
|
-
*
|
|
19979
|
-
*
|
|
19980
|
-
*
|
|
19981
|
-
* - For **Failure effects**: Returns the failure as-is without applying the flatMap
|
|
19982
|
-
* - For **Pending effects**: Falls back to the regular `flatMap` behavior
|
|
20088
|
+
* Success effects apply the flatMap function immediately. Failure effects pass
|
|
20089
|
+
* through unchanged, and pending effects fall back to regular `flatMap`
|
|
20090
|
+
* behavior.
|
|
19983
20091
|
*
|
|
19984
20092
|
* **Example** (Flat mapping eagerly when possible)
|
|
19985
20093
|
*
|
|
@@ -20012,11 +20120,9 @@ export declare const flatMapEager: {
|
|
|
20012
20120
|
*
|
|
20013
20121
|
* **Details**
|
|
20014
20122
|
*
|
|
20015
|
-
*
|
|
20016
|
-
*
|
|
20017
|
-
*
|
|
20018
|
-
* - For **Failure effects**: Returns the failure as-is without applying the flatMap
|
|
20019
|
-
* - For **Pending effects**: Falls back to the regular `flatMap` behavior
|
|
20123
|
+
* Success effects apply the flatMap function immediately. Failure effects pass
|
|
20124
|
+
* through unchanged, and pending effects fall back to regular `flatMap`
|
|
20125
|
+
* behavior.
|
|
20020
20126
|
*
|
|
20021
20127
|
* **Example** (Flat mapping eagerly when possible)
|
|
20022
20128
|
*
|
|
@@ -20050,11 +20156,9 @@ export declare const flatMapEager: {
|
|
|
20050
20156
|
*
|
|
20051
20157
|
* **Details**
|
|
20052
20158
|
*
|
|
20053
|
-
*
|
|
20054
|
-
*
|
|
20055
|
-
*
|
|
20056
|
-
* - For **Failure effects**: Applies the catch function immediately to the error
|
|
20057
|
-
* - For **Pending effects**: Falls back to the regular `catch` behavior
|
|
20159
|
+
* Success effects pass through unchanged because there is no error to catch.
|
|
20160
|
+
* Failure effects apply the catch function immediately, and pending effects
|
|
20161
|
+
* fall back to regular `catch` behavior.
|
|
20058
20162
|
*
|
|
20059
20163
|
* **Example** (Catching failures eagerly when possible)
|
|
20060
20164
|
*
|
|
@@ -20097,11 +20201,9 @@ export declare const catchEager: {
|
|
|
20097
20201
|
*
|
|
20098
20202
|
* **Details**
|
|
20099
20203
|
*
|
|
20100
|
-
*
|
|
20101
|
-
*
|
|
20102
|
-
*
|
|
20103
|
-
* - For **Failure effects**: Applies the catch function immediately to the error
|
|
20104
|
-
* - For **Pending effects**: Falls back to the regular `catch` behavior
|
|
20204
|
+
* Success effects pass through unchanged because there is no error to catch.
|
|
20205
|
+
* Failure effects apply the catch function immediately, and pending effects
|
|
20206
|
+
* fall back to regular `catch` behavior.
|
|
20105
20207
|
*
|
|
20106
20208
|
* **Example** (Catching failures eagerly when possible)
|
|
20107
20209
|
*
|
|
@@ -20144,11 +20246,9 @@ export declare const catchEager: {
|
|
|
20144
20246
|
*
|
|
20145
20247
|
* **Details**
|
|
20146
20248
|
*
|
|
20147
|
-
*
|
|
20148
|
-
*
|
|
20149
|
-
*
|
|
20150
|
-
* - For **Failure effects**: Applies the catch function immediately to the error
|
|
20151
|
-
* - For **Pending effects**: Falls back to the regular `catch` behavior
|
|
20249
|
+
* Success effects pass through unchanged because there is no error to catch.
|
|
20250
|
+
* Failure effects apply the catch function immediately, and pending effects
|
|
20251
|
+
* fall back to regular `catch` behavior.
|
|
20152
20252
|
*
|
|
20153
20253
|
* **Example** (Catching failures eagerly when possible)
|
|
20154
20254
|
*
|