effect 4.0.0 → 4.0.2
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/ai-docs/package.json +2 -2
- package/ai-docs/tsconfig.json +2 -1
- package/dist/Array.d.ts +339 -0
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +143 -3
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +88 -0
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +44 -0
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +68 -0
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +36 -0
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +34 -0
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +18 -0
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +9 -0
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +6 -0
- package/dist/Brand.js.map +1 -1
- package/dist/ByteSize.d.ts +86 -0
- package/dist/ByteSize.d.ts.map +1 -1
- package/dist/ByteSize.js +51 -0
- package/dist/ByteSize.js.map +1 -1
- package/dist/Cache.d.ts +38 -1
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +47 -23
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +82 -0
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +61 -1
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +327 -4
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +168 -8
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +11 -0
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +6 -0
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +192 -0
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +78 -0
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +7 -0
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +5 -0
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +10 -0
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +8 -0
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +52 -12
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +55 -5
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +28 -0
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +19 -0
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +22 -0
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +20 -0
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +50 -0
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +21 -0
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +16 -0
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +26 -1
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +5 -0
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +3 -0
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +13 -0
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +5 -0
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +171 -0
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +89 -0
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +51 -0
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +22 -0
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +2 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Differ.js +1 -0
- package/dist/Duration.d.ts +90 -0
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +53 -0
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +677 -22
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +251 -10
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +4 -0
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +3 -0
- package/dist/Effectable.js.map +1 -1
- package/dist/Equal.d.ts +8 -0
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +9 -1
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +21 -0
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +16 -0
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +36 -0
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +11 -0
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +49 -8
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +7 -0
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +40 -0
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +27 -0
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +20 -0
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +11 -0
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +21 -0
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +21 -4
- 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 +19 -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 +14 -0
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +15 -0
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +8 -0
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +55 -0
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +28 -0
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +3 -0
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +39 -1
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +30 -0
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +20 -0
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +247 -12
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +149 -28
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +5 -0
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +14 -0
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +12 -0
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +91 -0
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +39 -0
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +17 -0
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +22 -5
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +49 -0
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +19 -0
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +7 -0
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +6 -0
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +127 -0
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +51 -0
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +4 -0
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +3 -0
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +5 -0
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +5 -0
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +16 -0
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +11 -0
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +14 -0
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +10 -0
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +100 -0
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +45 -1
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +7 -0
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +4 -0
- package/dist/LayerMap.js.map +1 -1
- package/dist/LayerRef.d.ts +5 -0
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +3 -0
- package/dist/LayerRef.js.map +1 -1
- package/dist/LogLevel.d.ts +20 -0
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +9 -0
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +25 -0
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +30 -4
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +5 -0
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +9 -1
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +51 -0
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +39 -0
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +59 -0
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +31 -0
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +32 -0
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +16 -0
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +16 -0
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +10 -0
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +20 -0
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +18 -0
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +31 -0
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +17 -0
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +9 -0
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +6 -0
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +4 -0
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +2 -0
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +61 -0
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +31 -0
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +41 -0
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +20 -0
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +134 -0
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +61 -0
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +29 -0
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +24 -0
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +7 -0
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +3 -0
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +24 -0
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +47 -21
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +6 -0
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +4 -0
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +7 -0
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +5 -0
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +8 -0
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +7 -0
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +28 -5
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +42 -42
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +84 -0
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +48 -0
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +5 -0
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +4 -0
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +67 -5
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +60 -8
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +20 -0
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +10 -0
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +60 -0
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +58 -8
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +13 -0
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +9 -0
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +23 -0
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +24 -1
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +6 -0
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +3 -0
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +100 -0
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +43 -0
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +6 -0
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +4 -0
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +8 -0
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +6 -0
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +4 -0
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +3 -0
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +20 -0
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +16 -0
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +21 -0
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +19 -0
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +3 -0
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +4 -0
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +32 -0
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +12 -0
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +42 -0
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +27 -6
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +6 -0
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +6 -0
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +91 -0
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +41 -0
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +9 -0
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +7 -0
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +57 -0
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +32 -0
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +7 -0
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +5 -0
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +496 -1
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +280 -1
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +107 -0
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +81 -1
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +69 -2
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +63 -4
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +33 -0
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +18 -0
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +25 -0
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +26 -0
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +147 -0
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +99 -0
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +53 -0
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +46 -0
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +19 -0
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +12 -0
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +34 -0
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +50 -19
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +9 -0
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +6 -0
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +26 -0
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +10 -0
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +125 -1
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +75 -1
- package/dist/Sink.js.map +1 -1
- package/dist/StandardSchema.d.ts +1 -0
- package/dist/StandardSchema.d.ts.map +1 -1
- package/dist/StandardSchema.js +1 -0
- package/dist/Stdio.d.ts +7 -0
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +5 -0
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +603 -6
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +316 -57
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +87 -0
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +61 -0
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +46 -0
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +19 -0
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +65 -0
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +25 -0
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +2 -0
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +2 -0
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +63 -0
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +24 -0
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +3 -0
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +1 -0
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +8 -0
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +4 -0
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +23 -0
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +12 -0
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +68 -0
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +28 -0
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +38 -0
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +18 -0
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +52 -0
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +23 -0
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +15 -0
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +8 -0
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +83 -0
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +52 -7
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +51 -0
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +29 -4
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +30 -0
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +22 -1
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +25 -0
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +19 -0
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +51 -0
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +30 -0
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +24 -0
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +32 -18
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +14 -0
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +7 -0
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +25 -0
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +29 -13
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +25 -0
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +12 -0
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +36 -0
- package/dist/Types.d.ts.map +1 -1
- package/dist/Types.js +1 -0
- package/dist/UndefinedOr.d.ts +15 -0
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +9 -0
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +15 -0
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +2 -0
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +4 -0
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +1 -0
- package/dist/Utils.js.map +1 -1
- package/dist/Version.d.ts +26 -0
- package/dist/Version.d.ts.map +1 -0
- package/dist/Version.js +36 -0
- package/dist/Version.js.map +1 -0
- package/dist/ai/Chat.js +1 -1
- package/dist/ai/Chat.js.map +1 -1
- package/dist/ai/DecisionModel.d.ts +22 -0
- package/dist/ai/DecisionModel.d.ts.map +1 -1
- package/dist/ai/DecisionModel.js +22 -4
- package/dist/ai/DecisionModel.js.map +1 -1
- package/dist/ai/LanguageModel.d.ts +8 -0
- package/dist/ai/LanguageModel.d.ts.map +1 -1
- package/dist/ai/LanguageModel.js +27 -15
- package/dist/ai/LanguageModel.js.map +1 -1
- package/dist/ai/McpSchema.d.ts +508 -508
- package/dist/ai/McpSchema.d.ts.map +1 -1
- package/dist/ai/McpSchema.js +1 -1
- package/dist/ai/McpSchema.js.map +1 -1
- package/dist/ai/McpServer.d.ts +32 -11
- package/dist/ai/McpServer.d.ts.map +1 -1
- package/dist/ai/McpServer.js +224 -172
- package/dist/ai/McpServer.js.map +1 -1
- package/dist/ai/Response.d.ts.map +1 -1
- package/dist/ai/Response.js +22 -12
- package/dist/ai/Response.js.map +1 -1
- package/dist/ai/Telemetry.d.ts +49 -41
- package/dist/ai/Telemetry.d.ts.map +1 -1
- package/dist/ai/Telemetry.js +6 -8
- package/dist/ai/Telemetry.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2024_11_05.js +1 -0
- package/dist/ai/internal/mcpProtocol/v2024_11_05.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_03_26.js +1 -0
- package/dist/ai/internal/mcpProtocol/v2025_03_26.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_06_18.js +1 -0
- package/dist/ai/internal/mcpProtocol/v2025_06_18.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_11_25.js +1 -0
- package/dist/ai/internal/mcpProtocol/v2025_11_25.js.map +1 -1
- package/dist/ai/internal/mcpRuntime.js +79 -46
- package/dist/ai/internal/mcpRuntime.js.map +1 -1
- package/dist/ai/internal/mcpSchema/v2024_11_05.js +3 -1
- package/dist/ai/internal/mcpSchema/v2024_11_05.js.map +1 -1
- package/dist/ai/internal/mcpStatefulRuntime.js +1 -0
- package/dist/ai/internal/mcpStatefulRuntime.js.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.js +11 -2
- package/dist/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/cluster/K8sHttpClient.js +5 -2
- package/dist/cluster/K8sHttpClient.js.map +1 -1
- package/dist/cluster/Sharding.d.ts.map +1 -1
- package/dist/cluster/Sharding.js +14 -7
- package/dist/cluster/Sharding.js.map +1 -1
- package/dist/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/cluster/SqlMessageStorage.js +21 -12
- package/dist/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/cluster/SqlRunnerStorage.js +30 -44
- package/dist/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/cluster/internal/entityManager.js +63 -62
- package/dist/cluster/internal/entityManager.js.map +1 -1
- package/dist/cluster/internal/interruptors.js +8 -0
- package/dist/cluster/internal/interruptors.js.map +1 -1
- package/dist/cluster/internal/resourceMap.js +39 -14
- package/dist/cluster/internal/resourceMap.js.map +1 -1
- package/dist/cluster/internal/resourceRef.js +168 -87
- package/dist/cluster/internal/resourceRef.js.map +1 -1
- package/dist/encoding/Base64.d.ts +4 -0
- package/dist/encoding/Base64.d.ts.map +1 -1
- package/dist/encoding/Base64.js +4 -0
- package/dist/encoding/Base64.js.map +1 -1
- package/dist/encoding/Base64Url.d.ts +4 -0
- package/dist/encoding/Base64Url.d.ts.map +1 -1
- package/dist/encoding/Base64Url.js +4 -0
- package/dist/encoding/Base64Url.js.map +1 -1
- package/dist/encoding/EncodingError.d.ts +4 -0
- package/dist/encoding/EncodingError.d.ts.map +1 -1
- package/dist/encoding/EncodingError.js +4 -0
- package/dist/encoding/EncodingError.js.map +1 -1
- package/dist/encoding/Hex.d.ts +5 -0
- package/dist/encoding/Hex.d.ts.map +1 -1
- package/dist/encoding/Hex.js +5 -0
- package/dist/encoding/Hex.js.map +1 -1
- package/dist/encoding/Toml.js +2 -2
- package/dist/encoding/Toml.js.map +1 -1
- package/dist/encoding/Yaml.d.ts.map +1 -1
- package/dist/encoding/Yaml.js +6 -4
- package/dist/encoding/Yaml.js.map +1 -1
- package/dist/encoding/index.d.ts +4 -0
- package/dist/encoding/index.d.ts.map +1 -1
- package/dist/encoding/index.js +4 -0
- package/dist/encoding/index.js.map +1 -1
- package/dist/eventlog/SqlEventJournal.js +8 -4
- package/dist/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/eventlog/SqlEventLogServerUnencrypted.d.ts +27 -10
- package/dist/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/eventlog/SqlEventLogServerUnencrypted.js +49 -7
- package/dist/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/http/Headers.d.ts +3 -1
- package/dist/http/Headers.d.ts.map +1 -1
- package/dist/http/Headers.js +4 -2
- package/dist/http/Headers.js.map +1 -1
- package/dist/http/HttpClient.d.ts +9 -0
- package/dist/http/HttpClient.d.ts.map +1 -1
- package/dist/http/HttpClient.js +40 -21
- package/dist/http/HttpClient.js.map +1 -1
- package/dist/http/HttpClientResponse.js +3 -1
- package/dist/http/HttpClientResponse.js.map +1 -1
- package/dist/http/HttpEffect.d.ts +3 -0
- package/dist/http/HttpEffect.d.ts.map +1 -1
- package/dist/http/HttpEffect.js +5 -2
- package/dist/http/HttpEffect.js.map +1 -1
- package/dist/http/HttpMiddleware.d.ts +17 -0
- package/dist/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/http/HttpMiddleware.js +58 -40
- package/dist/http/HttpMiddleware.js.map +1 -1
- package/dist/http/HttpServer.d.ts +1 -1
- package/dist/http/HttpServer.d.ts.map +1 -1
- package/dist/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/http/HttpStaticServer.js +14 -0
- package/dist/http/HttpStaticServer.js.map +1 -1
- package/dist/http/HttpTraceContext.d.ts +1 -1
- package/dist/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/http/HttpTraceContext.js +4 -4
- package/dist/http/HttpTraceContext.js.map +1 -1
- package/dist/http/internal/tracing.d.ts +2 -0
- package/dist/http/internal/tracing.d.ts.map +1 -0
- package/dist/http/internal/tracing.js +37 -0
- package/dist/http/internal/tracing.js.map +1 -0
- package/dist/http-api/HttpApiBuilder.js +2 -1
- package/dist/http-api/HttpApiBuilder.js.map +1 -1
- package/dist/http-api/HttpApiClient.d.ts +12 -3
- package/dist/http-api/HttpApiClient.d.ts.map +1 -1
- package/dist/http-api/HttpApiClient.js.map +1 -1
- package/dist/http-api/HttpApiError.d.ts +4 -2
- package/dist/http-api/HttpApiError.d.ts.map +1 -1
- package/dist/http-api/HttpApiError.js +7 -3
- package/dist/http-api/HttpApiError.js.map +1 -1
- package/dist/http-api/HttpApiSecurity.d.ts +8 -8
- package/dist/http-api/HttpApiSecurity.js +8 -8
- package/dist/index.d.ts +155 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +155 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/arbitrary/array.js +3 -3
- package/dist/internal/arbitrary/array.js.map +1 -1
- package/dist/internal/arbitrary/model.js +26 -11
- package/dist/internal/arbitrary/model.js.map +1 -1
- package/dist/internal/arbitrary/runner.js +8 -8
- package/dist/internal/arbitrary/runner.js.map +1 -1
- package/dist/internal/arbitrary/schema.js +4 -5
- package/dist/internal/arbitrary/schema.js.map +1 -1
- package/dist/internal/core.js +43 -2
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/dateTime.js +1 -1
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/effect.js +104 -120
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/rcRef.js +59 -23
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/schedule.js +7 -5
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/fromJsonSchemaDocument.js +11 -8
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/standardSchema.js +2 -2
- package/dist/internal/schema/standardSchema.js.map +1 -1
- package/dist/internal/version.d.ts +2 -0
- package/dist/internal/version.d.ts.map +1 -0
- package/dist/internal/version.js +3 -0
- package/dist/internal/version.js.map +1 -0
- package/dist/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/observability/OtlpExporter.js +5 -6
- package/dist/observability/OtlpExporter.js.map +1 -1
- package/dist/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/observability/OtlpLogger.js +23 -27
- package/dist/observability/OtlpLogger.js.map +1 -1
- package/dist/observability/OtlpMetrics.d.ts +5 -3
- package/dist/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/observability/OtlpMetrics.js +21 -94
- package/dist/observability/OtlpMetrics.js.map +1 -1
- package/dist/observability/OtlpResource.d.ts +4 -3
- package/dist/observability/OtlpResource.d.ts.map +1 -1
- package/dist/observability/OtlpResource.js +20 -23
- package/dist/observability/OtlpResource.js.map +1 -1
- package/dist/observability/OtlpTracer.d.ts +1 -0
- package/dist/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/observability/OtlpTracer.js +32 -36
- package/dist/observability/OtlpTracer.js.map +1 -1
- package/dist/observability/internal/otlpProtobuf.js +32 -1
- package/dist/observability/internal/otlpProtobuf.js.map +1 -1
- package/dist/reactivity/AsyncResult.d.ts +1 -1
- package/dist/reactivity/Atom.d.ts +5 -5
- package/dist/reactivity/Atom.d.ts.map +1 -1
- package/dist/reactivity/Atom.js +9 -5
- package/dist/reactivity/Atom.js.map +1 -1
- package/dist/reactivity/AtomHttpApi.d.ts +2 -2
- package/dist/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/reactivity/AtomRegistry.d.ts +8 -0
- package/dist/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/reactivity/AtomRegistry.js.map +1 -1
- package/dist/rpc/RpcClient.d.ts +21 -3
- package/dist/rpc/RpcClient.d.ts.map +1 -1
- package/dist/rpc/RpcClient.js +58 -34
- package/dist/rpc/RpcClient.js.map +1 -1
- package/dist/rpc/RpcServer.d.ts.map +1 -1
- package/dist/rpc/RpcServer.js +20 -23
- package/dist/rpc/RpcServer.js.map +1 -1
- package/dist/rpc/Utils.d.ts +2 -3
- package/dist/rpc/Utils.d.ts.map +1 -1
- package/dist/rpc/Utils.js +3 -4
- package/dist/rpc/Utils.js.map +1 -1
- package/dist/rpc/internal/tracing.d.ts +2 -0
- package/dist/rpc/internal/tracing.d.ts.map +1 -0
- package/dist/rpc/internal/tracing.js +18 -0
- package/dist/rpc/internal/tracing.js.map +1 -0
- package/dist/schema/SchemaCompiler/runtime.js +9 -1
- package/dist/schema/SchemaCompiler/runtime.js.map +1 -1
- package/dist/sql/SqlClient.js +4 -4
- package/dist/sql/SqlClient.js.map +1 -1
- package/dist/sql/Statement.d.ts +21 -1
- package/dist/sql/Statement.d.ts.map +1 -1
- package/dist/sql/Statement.js +55 -7
- package/dist/sql/Statement.js.map +1 -1
- package/dist/testing/TestClock.d.ts +8 -0
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +7 -0
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +7 -0
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +6 -0
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/workflow/WorkflowEngine.d.ts +2 -0
- package/dist/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/workflow/WorkflowEngine.js +1 -0
- package/dist/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +3 -3
- package/src/Array.ts +351 -3
- package/src/BigDecimal.ts +88 -0
- package/src/BigInt.ts +68 -0
- package/src/Boolean.ts +34 -0
- package/src/Brand.ts +10 -0
- package/src/ByteSize.ts +87 -0
- package/src/Cache.ts +72 -24
- package/src/Cause.ts +83 -1
- package/src/Channel.ts +368 -18
- package/src/ChannelSchema.ts +13 -0
- package/src/Chunk.ts +193 -0
- package/src/Clock.ts +7 -0
- package/src/Combiner.ts +10 -0
- package/src/Config.ts +82 -8
- package/src/ConfigProvider.ts +28 -0
- package/src/Console.ts +26 -0
- package/src/Context.ts +50 -0
- package/src/Cron.ts +32 -1
- package/src/Crypto.ts +5 -0
- package/src/Data.ts +13 -0
- package/src/DateTime.ts +171 -0
- package/src/Deferred.ts +51 -0
- package/src/Differ.ts +2 -0
- package/src/Duration.ts +90 -0
- package/src/Effect.ts +692 -27
- package/src/Effectable.ts +4 -0
- package/src/Equal.ts +12 -1
- package/src/Equivalence.ts +22 -0
- package/src/ErrorReporter.ts +36 -0
- package/src/ExecutionPlan.ts +58 -14
- package/src/Exit.ts +40 -0
- package/src/Fiber.ts +20 -0
- package/src/FiberHandle.ts +29 -4
- package/src/FiberMap.ts +38 -0
- package/src/FiberSet.ts +21 -0
- package/src/FileSystem.ts +16 -0
- package/src/Filter.ts +55 -0
- package/src/Formatter.ts +42 -1
- package/src/Function.ts +30 -0
- package/src/Graph.ts +317 -36
- package/src/HKT.ts +5 -0
- package/src/Hash.ts +15 -0
- package/src/HashMap.ts +91 -0
- package/src/HashRing.ts +32 -5
- package/src/HashSet.ts +53 -0
- package/src/Inspectable.ts +8 -0
- package/src/Iterable.ts +127 -0
- package/src/JsonPatch.ts +5 -0
- package/src/JsonPointer.ts +5 -0
- package/src/JsonSchema.ts +17 -0
- package/src/Latch.ts +14 -0
- package/src/Layer.ts +101 -1
- package/src/LayerMap.ts +7 -0
- package/src/LayerRef.ts +5 -0
- package/src/LogLevel.ts +20 -0
- package/src/Logger.ts +41 -5
- package/src/ManagedRuntime.ts +12 -1
- package/src/Match.ts +52 -0
- package/src/Metric.ts +69 -0
- package/src/MutableHashMap.ts +44 -0
- package/src/MutableHashSet.ts +17 -0
- package/src/MutableList.ts +21 -0
- package/src/MutableRef.ts +32 -0
- package/src/Newtype.ts +9 -0
- package/src/NonEmptyIterable.ts +4 -0
- package/src/Number.ts +61 -0
- package/src/Optic.ts +57 -0
- package/src/Option.ts +134 -0
- package/src/Order.ts +30 -0
- package/src/Ordering.ts +7 -0
- package/src/PartitionedSemaphore.ts +61 -22
- package/src/Path.ts +6 -0
- package/src/Pipeable.ts +7 -0
- package/src/PlatformError.ts +8 -0
- package/src/Pool.ts +48 -37
- package/src/Predicate.ts +85 -0
- package/src/PrimaryKey.ts +5 -0
- package/src/PubSub.ts +90 -9
- package/src/Pull.ts +20 -0
- package/src/Queue.ts +80 -10
- package/src/Random.ts +13 -0
- package/src/RcMap.ts +49 -2
- package/src/RcRef.ts +6 -0
- package/src/Record.ts +100 -0
- package/src/Redactable.ts +6 -0
- package/src/Redacted.ts +8 -0
- package/src/Reducer.ts +4 -0
- package/src/Ref.ts +42 -0
- package/src/References.ts +21 -0
- package/src/RegExp.ts +4 -0
- package/src/Request.ts +32 -0
- package/src/RequestResolver.ts +59 -10
- package/src/Resource.ts +7 -0
- package/src/Result.ts +93 -0
- package/src/Runtime.ts +10 -0
- package/src/Schedule.ts +61 -0
- package/src/Scheduler.ts +7 -0
- package/src/Schema.ts +499 -4
- package/src/SchemaAST.ts +115 -1
- package/src/SchemaGetter.ts +80 -4
- package/src/SchemaIssue.ts +34 -0
- package/src/SchemaParser.ts +26 -0
- package/src/SchemaRepresentation.ts +148 -0
- package/src/SchemaTransformation.ts +53 -0
- package/src/Scope.ts +19 -0
- package/src/ScopedCache.ts +82 -19
- package/src/ScopedRef.ts +9 -0
- package/src/Semaphore.ts +26 -0
- package/src/Sink.ts +126 -2
- package/src/StandardSchema.ts +1 -0
- package/src/Stdio.ts +7 -0
- package/src/Stream.ts +780 -103
- package/src/String.ts +87 -0
- package/src/Struct.ts +46 -0
- package/src/SubscriptionRef.ts +65 -0
- package/src/Symbol.ts +2 -0
- package/src/SynchronizedRef.ts +63 -0
- package/src/Take.ts +3 -0
- package/src/Terminal.ts +8 -0
- package/src/Tracer.ts +23 -0
- package/src/Trie.ts +68 -0
- package/src/Tuple.ts +38 -0
- package/src/TxChunk.ts +52 -0
- package/src/TxDeferred.ts +15 -0
- package/src/TxHashMap.ts +97 -6
- package/src/TxHashSet.ts +83 -3
- package/src/TxPriorityQueue.ts +34 -2
- package/src/TxPubSub.ts +26 -0
- package/src/TxQueue.ts +51 -0
- package/src/TxReentrantLock.ts +53 -36
- package/src/TxRef.ts +14 -0
- package/src/TxSemaphore.ts +47 -31
- package/src/TxSubscriptionRef.ts +25 -0
- package/src/Types.ts +36 -0
- package/src/UndefinedOr.ts +15 -0
- package/src/Unify.ts +15 -0
- package/src/Utils.ts +4 -0
- package/src/Version.ts +38 -0
- package/src/ai/Chat.ts +1 -1
- package/src/ai/DecisionModel.ts +42 -1
- package/src/ai/LanguageModel.ts +43 -21
- package/src/ai/McpSchema.ts +3 -3
- package/src/ai/McpServer.ts +119 -39
- package/src/ai/Response.ts +27 -12
- package/src/ai/Telemetry.ts +62 -58
- package/src/ai/internal/mcpProtocol/v2024_11_05.ts +1 -0
- package/src/ai/internal/mcpProtocol/v2025_03_26.ts +1 -0
- package/src/ai/internal/mcpProtocol/v2025_06_18.ts +1 -0
- package/src/ai/internal/mcpProtocol/v2025_11_25.ts +1 -0
- package/src/ai/internal/mcpRuntime.ts +84 -43
- package/src/ai/internal/mcpSchema/v2024_11_05.ts +4 -2
- package/src/ai/internal/mcpStatefulRuntime.ts +2 -0
- package/src/cluster/ClusterWorkflowEngine.ts +18 -4
- package/src/cluster/K8sHttpClient.ts +12 -2
- package/src/cluster/Sharding.ts +24 -24
- package/src/cluster/SqlMessageStorage.ts +26 -13
- package/src/cluster/SqlRunnerStorage.ts +85 -113
- package/src/cluster/internal/entityManager.ts +68 -80
- package/src/cluster/internal/interruptors.ts +13 -0
- package/src/cluster/internal/resourceMap.ts +55 -17
- package/src/cluster/internal/resourceRef.ts +189 -96
- package/src/encoding/Base64.ts +4 -0
- package/src/encoding/Base64Url.ts +4 -0
- package/src/encoding/EncodingError.ts +5 -0
- package/src/encoding/Hex.ts +5 -0
- package/src/encoding/Toml.ts +2 -2
- package/src/encoding/Yaml.ts +8 -4
- package/src/encoding/index.ts +4 -0
- package/src/eventlog/SqlEventJournal.ts +18 -4
- package/src/eventlog/SqlEventLogServerUnencrypted.ts +282 -235
- package/src/http/Headers.ts +8 -2
- package/src/http/HttpClient.ts +44 -27
- package/src/http/HttpClientResponse.ts +3 -1
- package/src/http/HttpEffect.ts +11 -2
- package/src/http/HttpMiddleware.ts +67 -46
- package/src/http/HttpServer.ts +1 -1
- package/src/http/HttpStaticServer.ts +16 -0
- package/src/http/HttpTraceContext.ts +8 -4
- package/src/http/internal/tracing.ts +52 -0
- package/src/http-api/HttpApiBuilder.ts +5 -1
- package/src/http-api/HttpApiClient.ts +13 -4
- package/src/http-api/HttpApiError.ts +8 -3
- package/src/http-api/HttpApiSecurity.ts +8 -8
- package/src/index.ts +156 -0
- package/src/internal/arbitrary/array.ts +3 -3
- package/src/internal/arbitrary/model.ts +37 -14
- package/src/internal/arbitrary/runner.ts +7 -7
- package/src/internal/arbitrary/schema.ts +4 -3
- package/src/internal/core.ts +56 -2
- package/src/internal/dateTime.ts +3 -1
- package/src/internal/effect.ts +156 -156
- package/src/internal/rcRef.ts +83 -33
- package/src/internal/schedule.ts +23 -17
- package/src/internal/schema/fromJsonSchemaDocument.ts +5 -3
- package/src/internal/schema/standardSchema.ts +2 -2
- package/src/internal/version.ts +2 -0
- package/src/observability/OtlpExporter.ts +9 -6
- package/src/observability/OtlpLogger.ts +20 -21
- package/src/observability/OtlpMetrics.ts +34 -93
- package/src/observability/OtlpResource.ts +18 -27
- package/src/observability/OtlpTracer.ts +34 -40
- package/src/observability/internal/otlpProtobuf.ts +60 -0
- package/src/reactivity/AsyncResult.ts +1 -1
- package/src/reactivity/Atom.ts +10 -6
- package/src/reactivity/AtomHttpApi.ts +2 -4
- package/src/reactivity/AtomRegistry.ts +7 -0
- package/src/rpc/RpcClient.ts +74 -46
- package/src/rpc/RpcServer.ts +28 -25
- package/src/rpc/Utils.ts +4 -10
- package/src/rpc/internal/tracing.ts +22 -0
- package/src/schema/SchemaCompiler/runtime.ts +4 -1
- package/src/sql/SqlClient.ts +4 -4
- package/src/sql/Statement.ts +59 -7
- package/src/testing/TestClock.ts +9 -0
- package/src/testing/TestConsole.ts +8 -0
- package/src/testing/index.ts +3 -0
- package/src/workflow/WorkflowEngine.ts +4 -0
package/dist/Effect.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* creating effects, combining them, handling failures, managing resources, and
|
|
9
9
|
* running effect programs.
|
|
10
10
|
*
|
|
11
|
+
* @stability stable
|
|
11
12
|
* @since 2.0.0
|
|
12
13
|
*/
|
|
13
14
|
import type * as Arr from "./Array.ts";
|
|
@@ -42,6 +43,7 @@ import type * as Unify from "./Unify.ts";
|
|
|
42
43
|
/**
|
|
43
44
|
* Type-level identifier for `Effect` values.
|
|
44
45
|
*
|
|
46
|
+
* @stability stable
|
|
45
47
|
* @category type IDs
|
|
46
48
|
* @since 4.0.0
|
|
47
49
|
*/
|
|
@@ -49,6 +51,7 @@ export type TypeId = "~effect/Effect";
|
|
|
49
51
|
/**
|
|
50
52
|
* Runtime identifier used to recognize `Effect` values.
|
|
51
53
|
*
|
|
54
|
+
* @stability stable
|
|
52
55
|
* @category type IDs
|
|
53
56
|
* @since 4.0.0
|
|
54
57
|
*/
|
|
@@ -74,6 +77,7 @@ export declare const TypeId: TypeId;
|
|
|
74
77
|
* To run an `Effect` value, you need a `Runtime`, which is a type that is
|
|
75
78
|
* capable of executing `Effect` values.
|
|
76
79
|
*
|
|
80
|
+
* @stability stable
|
|
77
81
|
* @category models
|
|
78
82
|
* @since 2.0.0
|
|
79
83
|
*/
|
|
@@ -87,6 +91,7 @@ export interface Effect<out A, out E = never, out R = never> extends Pipeable, I
|
|
|
87
91
|
/**
|
|
88
92
|
* Type-level unification support for `Effect` values.
|
|
89
93
|
*
|
|
94
|
+
* @stability stable
|
|
90
95
|
* @category models
|
|
91
96
|
* @since 2.0.0
|
|
92
97
|
*/
|
|
@@ -98,6 +103,7 @@ export interface EffectUnify<A extends {
|
|
|
98
103
|
/**
|
|
99
104
|
* Type lambda used to represent `Effect` in higher-kinded APIs.
|
|
100
105
|
*
|
|
106
|
+
* @stability stable
|
|
101
107
|
* @category utility types
|
|
102
108
|
* @since 2.0.0
|
|
103
109
|
*/
|
|
@@ -107,6 +113,7 @@ export interface EffectTypeLambda extends TypeLambda {
|
|
|
107
113
|
/**
|
|
108
114
|
* Variance interface for Effect, encoding the type parameters' variance.
|
|
109
115
|
*
|
|
116
|
+
* @stability stable
|
|
110
117
|
* @category models
|
|
111
118
|
* @since 2.0.0
|
|
112
119
|
*/
|
|
@@ -126,6 +133,7 @@ export interface Variance<A, E, R> {
|
|
|
126
133
|
* @see {@link Error} for extracting the failure type from the same `Effect`
|
|
127
134
|
* @see {@link Services} for extracting the required services from the same `Effect`
|
|
128
135
|
*
|
|
136
|
+
* @stability stable
|
|
129
137
|
* @category utility types
|
|
130
138
|
* @since 2.0.0
|
|
131
139
|
*/
|
|
@@ -145,6 +153,7 @@ export type Success<T> = T extends Effect<infer _A, infer _E, infer _R> ? _A : n
|
|
|
145
153
|
* @see {@link Success} for extracting the success value type instead
|
|
146
154
|
* @see {@link Services} for extracting the required services type instead
|
|
147
155
|
*
|
|
156
|
+
* @stability stable
|
|
148
157
|
* @category utility types
|
|
149
158
|
* @since 2.0.0
|
|
150
159
|
*/
|
|
@@ -160,6 +169,7 @@ export type Error<T> = T extends Effect<infer _A, infer _E, infer _R> ? _E : nev
|
|
|
160
169
|
* @see {@link Success} for extracting the success value type instead
|
|
161
170
|
* @see {@link Error} for extracting the failure type instead
|
|
162
171
|
*
|
|
172
|
+
* @stability stable
|
|
163
173
|
* @category utility types
|
|
164
174
|
* @since 4.0.0
|
|
165
175
|
*/
|
|
@@ -176,6 +186,7 @@ export type Services<T> = T extends Effect<infer _A, infer _E, infer _R> ? _R :
|
|
|
176
186
|
* Effect.isEffect("hello") // => false
|
|
177
187
|
* ```
|
|
178
188
|
*
|
|
189
|
+
* @stability stable
|
|
179
190
|
* @category guards
|
|
180
191
|
* @since 2.0.0
|
|
181
192
|
*/
|
|
@@ -190,6 +201,7 @@ export declare const isEffect: (u: unknown) => u is Effect<unknown, unknown, unk
|
|
|
190
201
|
*
|
|
191
202
|
* @see {@link gen} for writing generator-based `Effect` programs that consume this iterator protocol
|
|
192
203
|
*
|
|
204
|
+
* @stability stable
|
|
193
205
|
* @category models
|
|
194
206
|
* @since 4.0.0
|
|
195
207
|
*/
|
|
@@ -200,6 +212,7 @@ export interface EffectIterator<T extends Effect<any, any, any>> {
|
|
|
200
212
|
* Namespace containing type utilities for the `Effect.all` function, which handles
|
|
201
213
|
* collecting multiple effects into various output structures.
|
|
202
214
|
*
|
|
215
|
+
* @stability stable
|
|
203
216
|
* @category collecting
|
|
204
217
|
* @since 2.0.0
|
|
205
218
|
*/
|
|
@@ -382,6 +395,7 @@ export declare namespace All {
|
|
|
382
395
|
* ```
|
|
383
396
|
*
|
|
384
397
|
* @see {@link forEach} for iterating over elements and applying an effect.
|
|
398
|
+
* @stability stable
|
|
385
399
|
* @category collecting
|
|
386
400
|
* @since 2.0.0
|
|
387
401
|
*/
|
|
@@ -414,6 +428,7 @@ export declare const all: <const Arg extends Iterable<Effect<any, any, any>> | R
|
|
|
414
428
|
* await Effect.runPromise(program) // => [[1, 3], ['0 is even', '2 is even']]
|
|
415
429
|
* ```
|
|
416
430
|
*
|
|
431
|
+
* @stability stable
|
|
417
432
|
* @category collecting
|
|
418
433
|
* @since 2.0.0
|
|
419
434
|
*/
|
|
@@ -442,6 +457,7 @@ export declare const partition: {
|
|
|
442
457
|
* await Effect.runPromise(program) // => [[1, 3], ['0 is even', '2 is even']]
|
|
443
458
|
* ```
|
|
444
459
|
*
|
|
460
|
+
* @stability stable
|
|
445
461
|
* @category collecting
|
|
446
462
|
* @since 2.0.0
|
|
447
463
|
*/
|
|
@@ -472,6 +488,7 @@ export declare const partition: {
|
|
|
472
488
|
* await Effect.runPromise(program) // => [[1, 3], ['0 is even', '2 is even']]
|
|
473
489
|
* ```
|
|
474
490
|
*
|
|
491
|
+
* @stability stable
|
|
475
492
|
* @category collecting
|
|
476
493
|
* @since 2.0.0
|
|
477
494
|
*/
|
|
@@ -513,6 +530,7 @@ export declare const partition: {
|
|
|
513
530
|
* output // => ["Adding 1 at index 0", "Adding 2 at index 1", "Adding 3 at index 2", 6]
|
|
514
531
|
* ```
|
|
515
532
|
*
|
|
533
|
+
* @stability stable
|
|
516
534
|
* @category collecting
|
|
517
535
|
* @since 2.0.0
|
|
518
536
|
*/
|
|
@@ -551,6 +569,7 @@ export declare const reduce: {
|
|
|
551
569
|
* output // => ["Adding 1 at index 0", "Adding 2 at index 1", "Adding 3 at index 2", 6]
|
|
552
570
|
* ```
|
|
553
571
|
*
|
|
572
|
+
* @stability stable
|
|
554
573
|
* @category collecting
|
|
555
574
|
* @since 2.0.0
|
|
556
575
|
*/
|
|
@@ -589,6 +608,7 @@ export declare const reduce: {
|
|
|
589
608
|
* output // => ["Adding 1 at index 0", "Adding 2 at index 1", "Adding 3 at index 2", 6]
|
|
590
609
|
* ```
|
|
591
610
|
*
|
|
611
|
+
* @stability stable
|
|
592
612
|
* @category collecting
|
|
593
613
|
* @since 2.0.0
|
|
594
614
|
*/
|
|
@@ -618,6 +638,7 @@ export declare const reduce: {
|
|
|
618
638
|
* await Effect.runPromiseExit(program) // => Exit.fail(["0 is even", "2 is even"])
|
|
619
639
|
* ```
|
|
620
640
|
*
|
|
641
|
+
* @stability stable
|
|
621
642
|
* @category collecting
|
|
622
643
|
* @since 2.0.0
|
|
623
644
|
*/
|
|
@@ -646,6 +667,7 @@ export declare const validate: {
|
|
|
646
667
|
* await Effect.runPromiseExit(program) // => Exit.fail(["0 is even", "2 is even"])
|
|
647
668
|
* ```
|
|
648
669
|
*
|
|
670
|
+
* @stability stable
|
|
649
671
|
* @category collecting
|
|
650
672
|
* @since 2.0.0
|
|
651
673
|
*/
|
|
@@ -677,6 +699,7 @@ export declare const validate: {
|
|
|
677
699
|
* await Effect.runPromiseExit(program) // => Exit.fail(["0 is even", "2 is even"])
|
|
678
700
|
* ```
|
|
679
701
|
*
|
|
702
|
+
* @stability stable
|
|
680
703
|
* @category collecting
|
|
681
704
|
* @since 2.0.0
|
|
682
705
|
*/
|
|
@@ -708,6 +731,7 @@ export declare const validate: {
|
|
|
708
731
|
* await Effect.runPromiseExit(program) // => Exit.fail(["0 is even", "2 is even"])
|
|
709
732
|
* ```
|
|
710
733
|
*
|
|
734
|
+
* @stability stable
|
|
711
735
|
* @category collecting
|
|
712
736
|
* @since 2.0.0
|
|
713
737
|
*/
|
|
@@ -739,6 +763,7 @@ export declare const validate: {
|
|
|
739
763
|
* await Effect.runPromiseExit(program) // => Exit.fail(["0 is even", "2 is even"])
|
|
740
764
|
* ```
|
|
741
765
|
*
|
|
766
|
+
* @stability stable
|
|
742
767
|
* @category collecting
|
|
743
768
|
* @since 2.0.0
|
|
744
769
|
*/
|
|
@@ -765,6 +790,7 @@ export declare const validate: {
|
|
|
765
790
|
* await Effect.runPromise(program) // => Option.some(3)
|
|
766
791
|
* ```
|
|
767
792
|
*
|
|
793
|
+
* @stability stable
|
|
768
794
|
* @category collecting
|
|
769
795
|
* @since 2.0.0
|
|
770
796
|
*/
|
|
@@ -787,6 +813,7 @@ export declare const findFirst: {
|
|
|
787
813
|
* await Effect.runPromise(program) // => Option.some(3)
|
|
788
814
|
* ```
|
|
789
815
|
*
|
|
816
|
+
* @stability stable
|
|
790
817
|
* @category collecting
|
|
791
818
|
* @since 2.0.0
|
|
792
819
|
*/
|
|
@@ -809,6 +836,7 @@ export declare const findFirst: {
|
|
|
809
836
|
* await Effect.runPromise(program) // => Option.some(3)
|
|
810
837
|
* ```
|
|
811
838
|
*
|
|
839
|
+
* @stability stable
|
|
812
840
|
* @category collecting
|
|
813
841
|
* @since 2.0.0
|
|
814
842
|
*/
|
|
@@ -829,6 +857,7 @@ export declare const findFirst: {
|
|
|
829
857
|
*
|
|
830
858
|
* @see {@link findFirst} for the simpler effectful predicate-based variant
|
|
831
859
|
*
|
|
860
|
+
* @stability stable
|
|
832
861
|
* @category collecting
|
|
833
862
|
* @since 4.0.0
|
|
834
863
|
*/
|
|
@@ -848,6 +877,7 @@ export declare const findFirstFilter: {
|
|
|
848
877
|
*
|
|
849
878
|
* @see {@link findFirst} for the simpler effectful predicate-based variant
|
|
850
879
|
*
|
|
880
|
+
* @stability stable
|
|
851
881
|
* @category collecting
|
|
852
882
|
* @since 4.0.0
|
|
853
883
|
*/
|
|
@@ -867,6 +897,7 @@ export declare const findFirstFilter: {
|
|
|
867
897
|
*
|
|
868
898
|
* @see {@link findFirst} for the simpler effectful predicate-based variant
|
|
869
899
|
*
|
|
900
|
+
* @stability stable
|
|
870
901
|
* @category collecting
|
|
871
902
|
* @since 4.0.0
|
|
872
903
|
*/
|
|
@@ -933,6 +964,7 @@ export declare const findFirstFilter: {
|
|
|
933
964
|
* ```
|
|
934
965
|
*
|
|
935
966
|
* @see {@link all} for combining multiple effects into one.
|
|
967
|
+
* @stability stable
|
|
936
968
|
* @category collecting
|
|
937
969
|
* @since 2.0.0
|
|
938
970
|
*/
|
|
@@ -998,6 +1030,7 @@ export declare const forEach: {
|
|
|
998
1030
|
* ```
|
|
999
1031
|
*
|
|
1000
1032
|
* @see {@link all} for combining multiple effects into one.
|
|
1033
|
+
* @stability stable
|
|
1001
1034
|
* @category collecting
|
|
1002
1035
|
* @since 2.0.0
|
|
1003
1036
|
*/
|
|
@@ -1066,6 +1099,7 @@ export declare const forEach: {
|
|
|
1066
1099
|
* ```
|
|
1067
1100
|
*
|
|
1068
1101
|
* @see {@link all} for combining multiple effects into one.
|
|
1102
|
+
* @stability stable
|
|
1069
1103
|
* @category collecting
|
|
1070
1104
|
* @since 2.0.0
|
|
1071
1105
|
*/
|
|
@@ -1095,6 +1129,7 @@ export declare const forEach: {
|
|
|
1095
1129
|
* await Effect.runPromise(empty) // => Option.none()
|
|
1096
1130
|
* ```
|
|
1097
1131
|
*
|
|
1132
|
+
* @stability stable
|
|
1098
1133
|
* @category collecting
|
|
1099
1134
|
* @since 2.0.0
|
|
1100
1135
|
*/
|
|
@@ -1120,6 +1155,7 @@ export declare const head: <A, E, R>(self: Effect<Iterable<A>, E, R>) => Effect<
|
|
|
1120
1155
|
* output // => ["Current count: 1", "Current count: 2", "Current count: 3", "Current count: 4", "Current count: 5"]
|
|
1121
1156
|
* ```
|
|
1122
1157
|
*
|
|
1158
|
+
* @stability stable
|
|
1123
1159
|
* @category repetition
|
|
1124
1160
|
* @since 2.0.0
|
|
1125
1161
|
*/
|
|
@@ -1165,6 +1201,7 @@ export declare const whileLoop: <A, E, R>(options: {
|
|
|
1165
1201
|
* ```
|
|
1166
1202
|
*
|
|
1167
1203
|
* @see {@link tryPromise} for a version that can handle failures.
|
|
1204
|
+
* @stability stable
|
|
1168
1205
|
* @category constructors
|
|
1169
1206
|
* @since 2.0.0
|
|
1170
1207
|
*/
|
|
@@ -1236,6 +1273,7 @@ export declare const promise: <A>(evaluate: (signal: AbortSignal) => PromiseLike
|
|
|
1236
1273
|
* ```
|
|
1237
1274
|
*
|
|
1238
1275
|
* @see {@link promise} if the effectful computation is asynchronous and does not throw errors.
|
|
1276
|
+
* @stability stable
|
|
1239
1277
|
* @category constructors
|
|
1240
1278
|
* @since 2.0.0
|
|
1241
1279
|
*/
|
|
@@ -1307,6 +1345,7 @@ export declare const tryPromise: {
|
|
|
1307
1345
|
* ```
|
|
1308
1346
|
*
|
|
1309
1347
|
* @see {@link promise} if the effectful computation is asynchronous and does not throw errors.
|
|
1348
|
+
* @stability stable
|
|
1310
1349
|
* @category constructors
|
|
1311
1350
|
* @since 2.0.0
|
|
1312
1351
|
*/
|
|
@@ -1378,6 +1417,7 @@ export declare const tryPromise: {
|
|
|
1378
1417
|
* ```
|
|
1379
1418
|
*
|
|
1380
1419
|
* @see {@link promise} if the effectful computation is asynchronous and does not throw errors.
|
|
1420
|
+
* @stability stable
|
|
1381
1421
|
* @category constructors
|
|
1382
1422
|
* @since 2.0.0
|
|
1383
1423
|
*/
|
|
@@ -1408,6 +1448,7 @@ export declare const tryPromise: {
|
|
|
1408
1448
|
* ```
|
|
1409
1449
|
*
|
|
1410
1450
|
* @see {@link fail} to create an effect that represents a failure.
|
|
1451
|
+
* @stability stable
|
|
1411
1452
|
* @category constructors
|
|
1412
1453
|
* @since 2.0.0
|
|
1413
1454
|
*/
|
|
@@ -1425,6 +1466,7 @@ export declare const succeed: <A>(value: A) => Effect<A>;
|
|
|
1425
1466
|
* Effect.runSync(program) // => Option.none()
|
|
1426
1467
|
* ```
|
|
1427
1468
|
*
|
|
1469
|
+
* @stability stable
|
|
1428
1470
|
* @category constructors
|
|
1429
1471
|
* @since 2.0.0
|
|
1430
1472
|
*/
|
|
@@ -1442,6 +1484,7 @@ export declare const succeedNone: Effect<Option<never>>;
|
|
|
1442
1484
|
* Effect.runSync(program) // => Option.some(42)
|
|
1443
1485
|
* ```
|
|
1444
1486
|
*
|
|
1487
|
+
* @stability stable
|
|
1445
1488
|
* @category constructors
|
|
1446
1489
|
* @since 2.0.0
|
|
1447
1490
|
*/
|
|
@@ -1532,6 +1575,7 @@ export declare const succeedSome: <A>(value: A) => Effect<Option<A>>;
|
|
|
1532
1575
|
* Effect.runSync(withSuspend(6, 2)) // => 3
|
|
1533
1576
|
* ```
|
|
1534
1577
|
*
|
|
1578
|
+
* @stability stable
|
|
1535
1579
|
* @category constructors
|
|
1536
1580
|
* @since 2.0.0
|
|
1537
1581
|
*/
|
|
@@ -1572,6 +1616,7 @@ export declare const suspend: <A, E, R>(effect: LazyArg<Effect<A, E, R>>) => Eff
|
|
|
1572
1616
|
* ```
|
|
1573
1617
|
*
|
|
1574
1618
|
* @see {@link try_ | try} for a version that can handle failures.
|
|
1619
|
+
* @stability stable
|
|
1575
1620
|
* @category constructors
|
|
1576
1621
|
* @since 2.0.0
|
|
1577
1622
|
*/
|
|
@@ -1581,6 +1626,7 @@ export {
|
|
|
1581
1626
|
/**
|
|
1582
1627
|
* Returns an effect that succeeds with `void`.
|
|
1583
1628
|
*
|
|
1629
|
+
* @stability stable
|
|
1584
1630
|
* @category constructors
|
|
1585
1631
|
* @since 2.0.0
|
|
1586
1632
|
*/
|
|
@@ -1590,6 +1636,7 @@ export {
|
|
|
1590
1636
|
/**
|
|
1591
1637
|
* Returns an effect that succeeds with `undefined`.
|
|
1592
1638
|
*
|
|
1639
|
+
* @stability stable
|
|
1593
1640
|
* @category constructors
|
|
1594
1641
|
* @since 4.0.0
|
|
1595
1642
|
*/
|
|
@@ -1627,6 +1674,7 @@ undefined_ as undefined };
|
|
|
1627
1674
|
* output // => ["callback completed"]
|
|
1628
1675
|
* ```
|
|
1629
1676
|
*
|
|
1677
|
+
* @stability stable
|
|
1630
1678
|
* @category constructors
|
|
1631
1679
|
* @since 4.0.0
|
|
1632
1680
|
*/
|
|
@@ -1644,6 +1692,7 @@ export declare const callback: <A, E = never, R = never>(register: (this: Schedu
|
|
|
1644
1692
|
* await Effect.runPromise(program) // => Option.none()
|
|
1645
1693
|
* ```
|
|
1646
1694
|
*
|
|
1695
|
+
* @stability stable
|
|
1647
1696
|
* @category constructors
|
|
1648
1697
|
* @since 2.0.0
|
|
1649
1698
|
*/
|
|
@@ -1667,6 +1716,7 @@ export declare const never: Effect<never>;
|
|
|
1667
1716
|
* Effect.runSync(program) // => { x: 2, y: 3, sum: 5 }
|
|
1668
1717
|
* ```
|
|
1669
1718
|
*
|
|
1719
|
+
* @stability stable
|
|
1670
1720
|
* @category do notation
|
|
1671
1721
|
* @since 2.0.0
|
|
1672
1722
|
*/
|
|
@@ -1683,6 +1733,7 @@ export declare const Do: Effect<{}>;
|
|
|
1683
1733
|
* @see {@link Do} for starting from an empty accumulated record
|
|
1684
1734
|
* @see {@link bind} for adding fields produced by effects
|
|
1685
1735
|
*
|
|
1736
|
+
* @stability stable
|
|
1686
1737
|
* @category do notation
|
|
1687
1738
|
* @since 2.0.0
|
|
1688
1739
|
*/
|
|
@@ -1699,6 +1750,7 @@ export declare const bindTo: {
|
|
|
1699
1750
|
* @see {@link Do} for starting from an empty accumulated record
|
|
1700
1751
|
* @see {@link bind} for adding fields produced by effects
|
|
1701
1752
|
*
|
|
1753
|
+
* @stability stable
|
|
1702
1754
|
* @category do notation
|
|
1703
1755
|
* @since 2.0.0
|
|
1704
1756
|
*/
|
|
@@ -1717,6 +1769,7 @@ export declare const bindTo: {
|
|
|
1717
1769
|
* @see {@link Do} for starting from an empty accumulated record
|
|
1718
1770
|
* @see {@link bind} for adding fields produced by effects
|
|
1719
1771
|
*
|
|
1772
|
+
* @stability stable
|
|
1720
1773
|
* @category do notation
|
|
1721
1774
|
* @since 2.0.0
|
|
1722
1775
|
*/
|
|
@@ -1748,6 +1801,7 @@ export {
|
|
|
1748
1801
|
* @see {@link Do} for starting from an empty accumulated record
|
|
1749
1802
|
* @see {@link gen} for sequencing without accumulating a record
|
|
1750
1803
|
*
|
|
1804
|
+
* @stability stable
|
|
1751
1805
|
* @category do notation
|
|
1752
1806
|
* @since 2.0.0
|
|
1753
1807
|
*/
|
|
@@ -1776,6 +1830,7 @@ let_ as let };
|
|
|
1776
1830
|
* @see {@link bindTo} for naming the success value of an existing effect
|
|
1777
1831
|
* @see {@link gen} for generator-based sequencing without accumulating a record
|
|
1778
1832
|
*
|
|
1833
|
+
* @stability stable
|
|
1779
1834
|
* @category do notation
|
|
1780
1835
|
* @since 2.0.0
|
|
1781
1836
|
*/
|
|
@@ -1804,6 +1859,7 @@ export declare const bind: {
|
|
|
1804
1859
|
* @see {@link bindTo} for naming the success value of an existing effect
|
|
1805
1860
|
* @see {@link gen} for generator-based sequencing without accumulating a record
|
|
1806
1861
|
*
|
|
1862
|
+
* @stability stable
|
|
1807
1863
|
* @category do notation
|
|
1808
1864
|
* @since 2.0.0
|
|
1809
1865
|
*/
|
|
@@ -1832,6 +1888,7 @@ export declare const bind: {
|
|
|
1832
1888
|
* @see {@link bindTo} for naming the success value of an existing effect
|
|
1833
1889
|
* @see {@link gen} for generator-based sequencing without accumulating a record
|
|
1834
1890
|
*
|
|
1891
|
+
* @stability stable
|
|
1835
1892
|
* @category do notation
|
|
1836
1893
|
* @since 2.0.0
|
|
1837
1894
|
*/
|
|
@@ -1886,6 +1943,7 @@ export declare const bind: {
|
|
|
1886
1943
|
* await Effect.runPromise(program) // => "Final amount to charge: 96"
|
|
1887
1944
|
* ```
|
|
1888
1945
|
*
|
|
1946
|
+
* @stability stable
|
|
1889
1947
|
* @category constructors
|
|
1890
1948
|
* @since 2.0.0
|
|
1891
1949
|
*/
|
|
@@ -1939,6 +1997,7 @@ export declare const gen: {
|
|
|
1939
1997
|
* await Effect.runPromise(program) // => "Final amount to charge: 96"
|
|
1940
1998
|
* ```
|
|
1941
1999
|
*
|
|
2000
|
+
* @stability stable
|
|
1942
2001
|
* @category constructors
|
|
1943
2002
|
* @since 2.0.0
|
|
1944
2003
|
*/
|
|
@@ -1996,6 +2055,7 @@ export declare const gen: {
|
|
|
1996
2055
|
* await Effect.runPromise(program) // => "Final amount to charge: 96"
|
|
1997
2056
|
* ```
|
|
1998
2057
|
*
|
|
2058
|
+
* @stability stable
|
|
1999
2059
|
* @category constructors
|
|
2000
2060
|
* @since 2.0.0
|
|
2001
2061
|
*/
|
|
@@ -2010,6 +2070,7 @@ export declare const gen: {
|
|
|
2010
2070
|
/**
|
|
2011
2071
|
* Type helpers for `Effect.gen` generator return signatures.
|
|
2012
2072
|
*
|
|
2073
|
+
* @stability stable
|
|
2013
2074
|
* @category constructors
|
|
2014
2075
|
* @since 2.0.0
|
|
2015
2076
|
*/
|
|
@@ -2050,6 +2111,7 @@ export declare namespace gen {
|
|
|
2050
2111
|
* ```
|
|
2051
2112
|
*
|
|
2052
2113
|
* @see {@link succeed} to create an effect that represents a successful value.
|
|
2114
|
+
* @stability stable
|
|
2053
2115
|
* @category constructors
|
|
2054
2116
|
* @since 2.0.0
|
|
2055
2117
|
*/
|
|
@@ -2077,6 +2139,7 @@ export declare const fail: <E>(error: E) => Effect<never, E>;
|
|
|
2077
2139
|
* Effect.runSync(Effect.flip(program)).operation // => "sync"
|
|
2078
2140
|
* ```
|
|
2079
2141
|
*
|
|
2142
|
+
* @stability stable
|
|
2080
2143
|
* @category constructors
|
|
2081
2144
|
* @since 2.0.0
|
|
2082
2145
|
*/
|
|
@@ -2107,6 +2170,7 @@ export declare const failSync: <E>(evaluate: LazyArg<E>) => Effect<never, E>;
|
|
|
2107
2170
|
* Effect.runSync(Effect.flip(program)) // => "Network error"
|
|
2108
2171
|
* ```
|
|
2109
2172
|
*
|
|
2173
|
+
* @stability stable
|
|
2110
2174
|
* @category constructors
|
|
2111
2175
|
* @since 2.0.0
|
|
2112
2176
|
*/
|
|
@@ -2134,6 +2198,7 @@ export declare const failCause: <E>(cause: Cause.Cause<E>) => Effect<never, E>;
|
|
|
2134
2198
|
* Effect.runSync(Effect.flip(program)) // => "Error computed at runtime"
|
|
2135
2199
|
* ```
|
|
2136
2200
|
*
|
|
2201
|
+
* @stability stable
|
|
2137
2202
|
* @category constructors
|
|
2138
2203
|
* @since 2.0.0
|
|
2139
2204
|
*/
|
|
@@ -2173,6 +2238,7 @@ export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Ef
|
|
|
2173
2238
|
* Effect.runSyncExit(program) // => Exit.die(defect)
|
|
2174
2239
|
* ```
|
|
2175
2240
|
*
|
|
2241
|
+
* @stability stable
|
|
2176
2242
|
* @category constructors
|
|
2177
2243
|
* @since 2.0.0
|
|
2178
2244
|
*/
|
|
@@ -2245,6 +2311,7 @@ export {
|
|
|
2245
2311
|
*
|
|
2246
2312
|
* @see {@link sync} if the effectful computation is synchronous and does not
|
|
2247
2313
|
* throw errors.
|
|
2314
|
+
* @stability stable
|
|
2248
2315
|
* @category constructors
|
|
2249
2316
|
* @since 2.0.0
|
|
2250
2317
|
*/
|
|
@@ -2268,6 +2335,7 @@ try_ as try };
|
|
|
2268
2335
|
* output // => ["Before yield", "After yield"]
|
|
2269
2336
|
* ```
|
|
2270
2337
|
*
|
|
2338
|
+
* @stability stable
|
|
2271
2339
|
* @category constructors
|
|
2272
2340
|
* @since 2.0.0
|
|
2273
2341
|
*/
|
|
@@ -2291,6 +2359,7 @@ export declare const yieldNow: Effect<void>;
|
|
|
2291
2359
|
* output // => ["High priority task", "Continued after yield"]
|
|
2292
2360
|
* ```
|
|
2293
2361
|
*
|
|
2362
|
+
* @stability stable
|
|
2294
2363
|
* @category constructors
|
|
2295
2364
|
* @since 4.0.0
|
|
2296
2365
|
*/
|
|
@@ -2308,6 +2377,7 @@ export declare const yieldNowWith: (priority?: number) => Effect<void>;
|
|
|
2308
2377
|
* Effect.runSync(program) // => "number"
|
|
2309
2378
|
* ```
|
|
2310
2379
|
*
|
|
2380
|
+
* @stability stable
|
|
2311
2381
|
* @category constructors
|
|
2312
2382
|
* @since 4.0.0
|
|
2313
2383
|
*/
|
|
@@ -2325,6 +2395,7 @@ export declare const withFiber: <A, E = never, R = never>(evaluate: (fiber: Fibe
|
|
|
2325
2395
|
* Effect.runSync(program) // => "number"
|
|
2326
2396
|
* ```
|
|
2327
2397
|
*
|
|
2398
|
+
* @stability stable
|
|
2328
2399
|
* @category constructors
|
|
2329
2400
|
* @since 4.0.0
|
|
2330
2401
|
*/
|
|
@@ -2349,6 +2420,7 @@ export declare const withFiberSucceed: <A, R = never>(evaluate: (fiber: Fiber<un
|
|
|
2349
2420
|
* output // => [42, "Something went wrong"]
|
|
2350
2421
|
* ```
|
|
2351
2422
|
*
|
|
2423
|
+
* @stability stable
|
|
2352
2424
|
* @category converting
|
|
2353
2425
|
* @since 4.0.0
|
|
2354
2426
|
*/
|
|
@@ -2387,6 +2459,7 @@ export declare const fromResult: <A, E>(result: Result.Result<A, E>) => Effect<A
|
|
|
2387
2459
|
* output // => [42, "NoSuchElementError", "missing"]
|
|
2388
2460
|
* ```
|
|
2389
2461
|
*
|
|
2462
|
+
* @stability stable
|
|
2390
2463
|
* @category converting
|
|
2391
2464
|
* @since 4.0.0
|
|
2392
2465
|
*/
|
|
@@ -2419,6 +2492,7 @@ export declare const fromOption: <Arg extends Option<unknown> | LazyArg<unknown>
|
|
|
2419
2492
|
* Effect.runSync(program) // => Option.some(42)
|
|
2420
2493
|
* ```
|
|
2421
2494
|
*
|
|
2495
|
+
* @stability stable
|
|
2422
2496
|
* @category converting
|
|
2423
2497
|
* @since 3.13.0
|
|
2424
2498
|
*/
|
|
@@ -2445,6 +2519,7 @@ export declare const transposeOption: <A = never, E = never, R = never>(self: Op
|
|
|
2445
2519
|
* output // => ["missing", "hello"]
|
|
2446
2520
|
* ```
|
|
2447
2521
|
*
|
|
2522
|
+
* @stability stable
|
|
2448
2523
|
* @category converting
|
|
2449
2524
|
* @since 4.0.0
|
|
2450
2525
|
*/
|
|
@@ -2519,6 +2594,7 @@ export declare const fromNullishOr: <A>(value: A) => Effect<NonNullable<A>, Caus
|
|
|
2519
2594
|
* ```
|
|
2520
2595
|
*
|
|
2521
2596
|
* @see {@link tap} for a version that ignores the result of the effect.
|
|
2597
|
+
* @stability stable
|
|
2522
2598
|
* @category sequencing
|
|
2523
2599
|
* @since 2.0.0
|
|
2524
2600
|
*/
|
|
@@ -2593,6 +2669,7 @@ export declare const flatMap: {
|
|
|
2593
2669
|
* ```
|
|
2594
2670
|
*
|
|
2595
2671
|
* @see {@link tap} for a version that ignores the result of the effect.
|
|
2672
|
+
* @stability stable
|
|
2596
2673
|
* @category sequencing
|
|
2597
2674
|
* @since 2.0.0
|
|
2598
2675
|
*/
|
|
@@ -2667,6 +2744,7 @@ export declare const flatMap: {
|
|
|
2667
2744
|
* ```
|
|
2668
2745
|
*
|
|
2669
2746
|
* @see {@link tap} for a version that ignores the result of the effect.
|
|
2747
|
+
* @stability stable
|
|
2670
2748
|
* @category sequencing
|
|
2671
2749
|
* @since 2.0.0
|
|
2672
2750
|
*/
|
|
@@ -2692,6 +2770,7 @@ export declare const flatMap: {
|
|
|
2692
2770
|
* output // => ["hello"]
|
|
2693
2771
|
* ```
|
|
2694
2772
|
*
|
|
2773
|
+
* @stability stable
|
|
2695
2774
|
* @category sequencing
|
|
2696
2775
|
* @since 2.0.0
|
|
2697
2776
|
*/
|
|
@@ -2774,6 +2853,7 @@ export declare const flatten: <A, E, R, E2, R2>(self: Effect<Effect<A, E, R>, E2
|
|
|
2774
2853
|
* await Effect.runPromise(result2) // => 190
|
|
2775
2854
|
* ```
|
|
2776
2855
|
*
|
|
2856
|
+
* @stability stable
|
|
2777
2857
|
* @category sequencing
|
|
2778
2858
|
* @since 2.0.0
|
|
2779
2859
|
*/
|
|
@@ -2856,6 +2936,7 @@ export declare const andThen: {
|
|
|
2856
2936
|
* await Effect.runPromise(result2) // => 190
|
|
2857
2937
|
* ```
|
|
2858
2938
|
*
|
|
2939
|
+
* @stability stable
|
|
2859
2940
|
* @category sequencing
|
|
2860
2941
|
* @since 2.0.0
|
|
2861
2942
|
*/
|
|
@@ -2938,6 +3019,7 @@ export declare const andThen: {
|
|
|
2938
3019
|
* await Effect.runPromise(result2) // => 190
|
|
2939
3020
|
* ```
|
|
2940
3021
|
*
|
|
3022
|
+
* @stability stable
|
|
2941
3023
|
* @category sequencing
|
|
2942
3024
|
* @since 2.0.0
|
|
2943
3025
|
*/
|
|
@@ -3020,6 +3102,7 @@ export declare const andThen: {
|
|
|
3020
3102
|
* await Effect.runPromise(result2) // => 190
|
|
3021
3103
|
* ```
|
|
3022
3104
|
*
|
|
3105
|
+
* @stability stable
|
|
3023
3106
|
* @category sequencing
|
|
3024
3107
|
* @since 2.0.0
|
|
3025
3108
|
*/
|
|
@@ -3102,6 +3185,7 @@ export declare const andThen: {
|
|
|
3102
3185
|
* await Effect.runPromise(result2) // => 190
|
|
3103
3186
|
* ```
|
|
3104
3187
|
*
|
|
3188
|
+
* @stability stable
|
|
3105
3189
|
* @category sequencing
|
|
3106
3190
|
* @since 2.0.0
|
|
3107
3191
|
*/
|
|
@@ -3155,6 +3239,7 @@ export declare const andThen: {
|
|
|
3155
3239
|
* output // => ["Apply a discount to: 100", 95]
|
|
3156
3240
|
* ```
|
|
3157
3241
|
*
|
|
3242
|
+
* @stability stable
|
|
3158
3243
|
* @category sequencing
|
|
3159
3244
|
* @since 2.0.0
|
|
3160
3245
|
*/
|
|
@@ -3207,6 +3292,7 @@ export declare const tap: {
|
|
|
3207
3292
|
* output // => ["Apply a discount to: 100", 95]
|
|
3208
3293
|
* ```
|
|
3209
3294
|
*
|
|
3295
|
+
* @stability stable
|
|
3210
3296
|
* @category sequencing
|
|
3211
3297
|
* @since 2.0.0
|
|
3212
3298
|
*/
|
|
@@ -3259,6 +3345,7 @@ export declare const tap: {
|
|
|
3259
3345
|
* output // => ["Apply a discount to: 100", 95]
|
|
3260
3346
|
* ```
|
|
3261
3347
|
*
|
|
3348
|
+
* @stability stable
|
|
3262
3349
|
* @category sequencing
|
|
3263
3350
|
* @since 2.0.0
|
|
3264
3351
|
*/
|
|
@@ -3311,6 +3398,7 @@ export declare const tap: {
|
|
|
3311
3398
|
* output // => ["Apply a discount to: 100", 95]
|
|
3312
3399
|
* ```
|
|
3313
3400
|
*
|
|
3401
|
+
* @stability stable
|
|
3314
3402
|
* @category sequencing
|
|
3315
3403
|
* @since 2.0.0
|
|
3316
3404
|
*/
|
|
@@ -3363,6 +3451,7 @@ export declare const tap: {
|
|
|
3363
3451
|
* output // => ["Apply a discount to: 100", 95]
|
|
3364
3452
|
* ```
|
|
3365
3453
|
*
|
|
3454
|
+
* @stability stable
|
|
3366
3455
|
* @category sequencing
|
|
3367
3456
|
* @since 2.0.0
|
|
3368
3457
|
*/
|
|
@@ -3416,6 +3505,7 @@ export declare const tap: {
|
|
|
3416
3505
|
* @see {@link option} for a version that uses `Option` instead.
|
|
3417
3506
|
* @see {@link exit} for a version that encapsulates both recoverable errors and defects in an `Exit`.
|
|
3418
3507
|
*
|
|
3508
|
+
* @stability stable
|
|
3419
3509
|
* @category error handling
|
|
3420
3510
|
* @since 4.0.0
|
|
3421
3511
|
*/
|
|
@@ -3458,6 +3548,7 @@ export declare const result: <A, E, R>(self: Effect<A, E, R>) => Effect<Result.R
|
|
|
3458
3548
|
* @see {@link result} for a version that uses `Result` instead.
|
|
3459
3549
|
* @see {@link exit} for a version that encapsulates both recoverable errors and defects in an `Exit`.
|
|
3460
3550
|
*
|
|
3551
|
+
* @stability stable
|
|
3461
3552
|
* @category error handling
|
|
3462
3553
|
* @since 2.0.0
|
|
3463
3554
|
*/
|
|
@@ -3499,6 +3590,7 @@ export declare const option: <A, E, R>(self: Effect<A, E, R>) => Effect<Option<A
|
|
|
3499
3590
|
* @see {@link option} for a version that uses `Option` instead.
|
|
3500
3591
|
* @see {@link result} for a version that uses `Result` instead.
|
|
3501
3592
|
*
|
|
3593
|
+
* @stability stable
|
|
3502
3594
|
* @category error handling
|
|
3503
3595
|
* @since 2.0.0
|
|
3504
3596
|
*/
|
|
@@ -3562,6 +3654,7 @@ export declare const exit: <A, E, R>(self: Effect<A, E, R>) => Effect<Exit.Exit<
|
|
|
3562
3654
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
3563
3655
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
3564
3656
|
* @see {@link flatMap} or {@link andThen} for a version that can return a new effect.
|
|
3657
|
+
* @stability stable
|
|
3565
3658
|
* @category mapping
|
|
3566
3659
|
* @since 2.0.0
|
|
3567
3660
|
*/
|
|
@@ -3625,6 +3718,7 @@ export declare const map: {
|
|
|
3625
3718
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
3626
3719
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
3627
3720
|
* @see {@link flatMap} or {@link andThen} for a version that can return a new effect.
|
|
3721
|
+
* @stability stable
|
|
3628
3722
|
* @category mapping
|
|
3629
3723
|
* @since 2.0.0
|
|
3630
3724
|
*/
|
|
@@ -3688,6 +3782,7 @@ export declare const map: {
|
|
|
3688
3782
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
3689
3783
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
3690
3784
|
* @see {@link flatMap} or {@link andThen} for a version that can return a new effect.
|
|
3785
|
+
* @stability stable
|
|
3691
3786
|
* @category mapping
|
|
3692
3787
|
* @since 2.0.0
|
|
3693
3788
|
*/
|
|
@@ -3720,6 +3815,7 @@ export declare const map: {
|
|
|
3720
3815
|
* @see {@link map} for deriving the replacement value from the success value
|
|
3721
3816
|
* @see {@link asVoid} for replacing the success value with `void`
|
|
3722
3817
|
*
|
|
3818
|
+
* @stability stable
|
|
3723
3819
|
* @category mapping
|
|
3724
3820
|
* @since 2.0.0
|
|
3725
3821
|
*/
|
|
@@ -3751,6 +3847,7 @@ export declare const as: {
|
|
|
3751
3847
|
* @see {@link map} for deriving the replacement value from the success value
|
|
3752
3848
|
* @see {@link asVoid} for replacing the success value with `void`
|
|
3753
3849
|
*
|
|
3850
|
+
* @stability stable
|
|
3754
3851
|
* @category mapping
|
|
3755
3852
|
* @since 2.0.0
|
|
3756
3853
|
*/
|
|
@@ -3782,6 +3879,7 @@ export declare const as: {
|
|
|
3782
3879
|
* @see {@link map} for deriving the replacement value from the success value
|
|
3783
3880
|
* @see {@link asVoid} for replacing the success value with `void`
|
|
3784
3881
|
*
|
|
3882
|
+
* @stability stable
|
|
3785
3883
|
* @category mapping
|
|
3786
3884
|
* @since 2.0.0
|
|
3787
3885
|
*/
|
|
@@ -3800,6 +3898,7 @@ export declare const as: {
|
|
|
3800
3898
|
* Effect.runSync(program) // => Option.some(42)
|
|
3801
3899
|
* ```
|
|
3802
3900
|
*
|
|
3901
|
+
* @stability stable
|
|
3803
3902
|
* @category mapping
|
|
3804
3903
|
* @since 2.0.0
|
|
3805
3904
|
*/
|
|
@@ -3817,6 +3916,7 @@ export declare const asSome: <A, E, R>(self: Effect<A, E, R>) => Effect<Option<A
|
|
|
3817
3916
|
* Effect.runSync(program) // => undefined
|
|
3818
3917
|
* ```
|
|
3819
3918
|
*
|
|
3919
|
+
* @stability stable
|
|
3820
3920
|
* @category mapping
|
|
3821
3921
|
* @since 2.0.0
|
|
3822
3922
|
*/
|
|
@@ -3847,6 +3947,7 @@ export declare const asVoid: <A, E, R>(self: Effect<A, E, R>) => Effect<void, E,
|
|
|
3847
3947
|
* Effect.runSync(flipped) // => "Oh uh!"
|
|
3848
3948
|
* ```
|
|
3849
3949
|
*
|
|
3950
|
+
* @stability stable
|
|
3850
3951
|
* @category mapping
|
|
3851
3952
|
* @since 2.0.0
|
|
3852
3953
|
*/
|
|
@@ -3902,6 +4003,7 @@ export declare const flip: <A, E, R>(self: Effect<A, E, R>) => Effect<E, A, R>;
|
|
|
3902
4003
|
* @see {@link zipWith} for a version that combines the results with a custom function.
|
|
3903
4004
|
* @see {@link all} for collecting a larger structure of effects.
|
|
3904
4005
|
*
|
|
4006
|
+
* @stability stable
|
|
3905
4007
|
* @category zipping
|
|
3906
4008
|
* @since 2.0.0
|
|
3907
4009
|
*/
|
|
@@ -3957,6 +4059,7 @@ export declare const zip: {
|
|
|
3957
4059
|
* @see {@link zipWith} for a version that combines the results with a custom function.
|
|
3958
4060
|
* @see {@link all} for collecting a larger structure of effects.
|
|
3959
4061
|
*
|
|
4062
|
+
* @stability stable
|
|
3960
4063
|
* @category zipping
|
|
3961
4064
|
* @since 2.0.0
|
|
3962
4065
|
*/
|
|
@@ -4014,6 +4117,7 @@ export declare const zip: {
|
|
|
4014
4117
|
* @see {@link zipWith} for a version that combines the results with a custom function.
|
|
4015
4118
|
* @see {@link all} for collecting a larger structure of effects.
|
|
4016
4119
|
*
|
|
4120
|
+
* @stability stable
|
|
4017
4121
|
* @category zipping
|
|
4018
4122
|
* @since 2.0.0
|
|
4019
4123
|
*/
|
|
@@ -4055,6 +4159,7 @@ export declare const zip: {
|
|
|
4055
4159
|
* Effect.runSync(task3) // => 6
|
|
4056
4160
|
* ```
|
|
4057
4161
|
*
|
|
4162
|
+
* @stability stable
|
|
4058
4163
|
* @category zipping
|
|
4059
4164
|
* @since 2.0.0
|
|
4060
4165
|
*/
|
|
@@ -4093,6 +4198,7 @@ export declare const zipWith: {
|
|
|
4093
4198
|
* Effect.runSync(task3) // => 6
|
|
4094
4199
|
* ```
|
|
4095
4200
|
*
|
|
4201
|
+
* @stability stable
|
|
4096
4202
|
* @category zipping
|
|
4097
4203
|
* @since 2.0.0
|
|
4098
4204
|
*/
|
|
@@ -4133,6 +4239,7 @@ export declare const zipWith: {
|
|
|
4133
4239
|
* Effect.runSync(task3) // => 6
|
|
4134
4240
|
* ```
|
|
4135
4241
|
*
|
|
4242
|
+
* @stability stable
|
|
4136
4243
|
* @category zipping
|
|
4137
4244
|
* @since 2.0.0
|
|
4138
4245
|
*/
|
|
@@ -4167,6 +4274,7 @@ export {
|
|
|
4167
4274
|
*
|
|
4168
4275
|
* @see {@link catchCause} for a version that can recover from both recoverable and unrecoverable errors.
|
|
4169
4276
|
*
|
|
4277
|
+
* @stability stable
|
|
4170
4278
|
* @category error handling
|
|
4171
4279
|
* @since 4.0.0
|
|
4172
4280
|
*/
|
|
@@ -4215,6 +4323,7 @@ catch_ as catch };
|
|
|
4215
4323
|
* @see {@link catchTags} for handling multiple tagged errors in one call
|
|
4216
4324
|
* @see {@link catchIf} for recovering from errors that match a predicate
|
|
4217
4325
|
*
|
|
4326
|
+
* @stability stable
|
|
4218
4327
|
* @category error handling
|
|
4219
4328
|
* @since 2.0.0
|
|
4220
4329
|
*/
|
|
@@ -4263,6 +4372,7 @@ export declare const catchTag: {
|
|
|
4263
4372
|
* @see {@link catchTags} for handling multiple tagged errors in one call
|
|
4264
4373
|
* @see {@link catchIf} for recovering from errors that match a predicate
|
|
4265
4374
|
*
|
|
4375
|
+
* @stability stable
|
|
4266
4376
|
* @category error handling
|
|
4267
4377
|
* @since 2.0.0
|
|
4268
4378
|
*/
|
|
@@ -4311,6 +4421,7 @@ export declare const catchTag: {
|
|
|
4311
4421
|
* @see {@link catchTags} for handling multiple tagged errors in one call
|
|
4312
4422
|
* @see {@link catchIf} for recovering from errors that match a predicate
|
|
4313
4423
|
*
|
|
4424
|
+
* @stability stable
|
|
4314
4425
|
* @category error handling
|
|
4315
4426
|
* @since 2.0.0
|
|
4316
4427
|
*/
|
|
@@ -4360,6 +4471,7 @@ export declare const catchTag: {
|
|
|
4360
4471
|
* Effect.runSync(handled) // => "Network error: 503"
|
|
4361
4472
|
* ```
|
|
4362
4473
|
*
|
|
4474
|
+
* @stability stable
|
|
4363
4475
|
* @category error handling
|
|
4364
4476
|
* @since 2.0.0
|
|
4365
4477
|
*/
|
|
@@ -4408,6 +4520,7 @@ export declare const catchTags: {
|
|
|
4408
4520
|
* Effect.runSync(handled) // => "Network error: 503"
|
|
4409
4521
|
* ```
|
|
4410
4522
|
*
|
|
4523
|
+
* @stability stable
|
|
4411
4524
|
* @category error handling
|
|
4412
4525
|
* @since 2.0.0
|
|
4413
4526
|
*/
|
|
@@ -4476,6 +4589,7 @@ export declare const catchTags: {
|
|
|
4476
4589
|
* Effect.runSync(handled) // => "Network error: 503"
|
|
4477
4590
|
* ```
|
|
4478
4591
|
*
|
|
4592
|
+
* @stability stable
|
|
4479
4593
|
* @category error handling
|
|
4480
4594
|
* @since 2.0.0
|
|
4481
4595
|
*/
|
|
@@ -4547,6 +4661,7 @@ export declare const catchTags: {
|
|
|
4547
4661
|
*
|
|
4548
4662
|
* @see {@link catchReasons} for handling several nested reason tags
|
|
4549
4663
|
*
|
|
4664
|
+
* @stability stable
|
|
4550
4665
|
* @category error handling
|
|
4551
4666
|
* @since 4.0.0
|
|
4552
4667
|
*/
|
|
@@ -4597,6 +4712,7 @@ export declare const catchReason: {
|
|
|
4597
4712
|
*
|
|
4598
4713
|
* @see {@link catchReasons} for handling several nested reason tags
|
|
4599
4714
|
*
|
|
4715
|
+
* @stability stable
|
|
4600
4716
|
* @category error handling
|
|
4601
4717
|
* @since 4.0.0
|
|
4602
4718
|
*/
|
|
@@ -4647,6 +4763,7 @@ export declare const catchReason: {
|
|
|
4647
4763
|
*
|
|
4648
4764
|
* @see {@link catchReasons} for handling several nested reason tags
|
|
4649
4765
|
*
|
|
4766
|
+
* @stability stable
|
|
4650
4767
|
* @category error handling
|
|
4651
4768
|
* @since 4.0.0
|
|
4652
4769
|
*/
|
|
@@ -4688,6 +4805,7 @@ export declare const catchReason: {
|
|
|
4688
4805
|
* Effect.runSync(handled) // => "Quota exceeded: 100"
|
|
4689
4806
|
* ```
|
|
4690
4807
|
*
|
|
4808
|
+
* @stability stable
|
|
4691
4809
|
* @category error handling
|
|
4692
4810
|
* @since 4.0.0
|
|
4693
4811
|
*/
|
|
@@ -4728,6 +4846,7 @@ export declare const catchReasons: {
|
|
|
4728
4846
|
* Effect.runSync(handled) // => "Quota exceeded: 100"
|
|
4729
4847
|
* ```
|
|
4730
4848
|
*
|
|
4849
|
+
* @stability stable
|
|
4731
4850
|
* @category error handling
|
|
4732
4851
|
* @since 4.0.0
|
|
4733
4852
|
*/
|
|
@@ -4776,6 +4895,7 @@ export declare const catchReasons: {
|
|
|
4776
4895
|
* Effect.runSync(handled) // => "Quota exceeded: 100"
|
|
4777
4896
|
* ```
|
|
4778
4897
|
*
|
|
4898
|
+
* @stability stable
|
|
4779
4899
|
* @category error handling
|
|
4780
4900
|
* @since 4.0.0
|
|
4781
4901
|
*/
|
|
@@ -4806,6 +4926,7 @@ export declare const catchReasons: {
|
|
|
4806
4926
|
* @see {@link catchReason} for handling one nested reason tag
|
|
4807
4927
|
* @see {@link catchReasons} for handling several nested reason tags
|
|
4808
4928
|
*
|
|
4929
|
+
* @stability stable
|
|
4809
4930
|
* @category error handling
|
|
4810
4931
|
* @since 4.0.0
|
|
4811
4932
|
*/
|
|
@@ -4843,6 +4964,7 @@ export type TagsWithReason<E> = {
|
|
|
4843
4964
|
* Effect.runSync(Effect.flip(unwrapped))._tag // => "RateLimitError"
|
|
4844
4965
|
* ```
|
|
4845
4966
|
*
|
|
4967
|
+
* @stability stable
|
|
4846
4968
|
* @category error handling
|
|
4847
4969
|
* @since 4.0.0
|
|
4848
4970
|
*/
|
|
@@ -4878,6 +5000,7 @@ export declare const unwrapReason: {
|
|
|
4878
5000
|
* Effect.runSync(Effect.flip(unwrapped))._tag // => "RateLimitError"
|
|
4879
5001
|
* ```
|
|
4880
5002
|
*
|
|
5003
|
+
* @stability stable
|
|
4881
5004
|
* @category error handling
|
|
4882
5005
|
* @since 4.0.0
|
|
4883
5006
|
*/
|
|
@@ -4913,6 +5036,7 @@ export declare const unwrapReason: {
|
|
|
4913
5036
|
* Effect.runSync(Effect.flip(unwrapped))._tag // => "RateLimitError"
|
|
4914
5037
|
* ```
|
|
4915
5038
|
*
|
|
5039
|
+
* @stability stable
|
|
4916
5040
|
* @category error handling
|
|
4917
5041
|
* @since 4.0.0
|
|
4918
5042
|
*/
|
|
@@ -4959,6 +5083,7 @@ export declare const unwrapReason: {
|
|
|
4959
5083
|
* output // => ["Caught defect", "Recovered from defect"]
|
|
4960
5084
|
* ```
|
|
4961
5085
|
*
|
|
5086
|
+
* @stability stable
|
|
4962
5087
|
* @category error handling
|
|
4963
5088
|
* @since 4.0.0
|
|
4964
5089
|
*/
|
|
@@ -5004,6 +5129,7 @@ export declare const catchCause: {
|
|
|
5004
5129
|
* output // => ["Caught defect", "Recovered from defect"]
|
|
5005
5130
|
* ```
|
|
5006
5131
|
*
|
|
5132
|
+
* @stability stable
|
|
5007
5133
|
* @category error handling
|
|
5008
5134
|
* @since 4.0.0
|
|
5009
5135
|
*/
|
|
@@ -5049,6 +5175,7 @@ export declare const catchCause: {
|
|
|
5049
5175
|
* output // => ["Caught defect", "Recovered from defect"]
|
|
5050
5176
|
* ```
|
|
5051
5177
|
*
|
|
5178
|
+
* @stability stable
|
|
5052
5179
|
* @category error handling
|
|
5053
5180
|
* @since 4.0.0
|
|
5054
5181
|
*/
|
|
@@ -5094,6 +5221,7 @@ export declare const catchCause: {
|
|
|
5094
5221
|
* output // => ["Caught defect: Unexpected error", "Recovered from defect"]
|
|
5095
5222
|
* ```
|
|
5096
5223
|
*
|
|
5224
|
+
* @stability stable
|
|
5097
5225
|
* @category error handling
|
|
5098
5226
|
* @since 4.0.0
|
|
5099
5227
|
*/
|
|
@@ -5138,6 +5266,7 @@ export declare const catchDefect: {
|
|
|
5138
5266
|
* output // => ["Caught defect: Unexpected error", "Recovered from defect"]
|
|
5139
5267
|
* ```
|
|
5140
5268
|
*
|
|
5269
|
+
* @stability stable
|
|
5141
5270
|
* @category error handling
|
|
5142
5271
|
* @since 4.0.0
|
|
5143
5272
|
*/
|
|
@@ -5182,6 +5311,7 @@ export declare const catchDefect: {
|
|
|
5182
5311
|
* output // => ["Caught defect: Unexpected error", "Recovered from defect"]
|
|
5183
5312
|
* ```
|
|
5184
5313
|
*
|
|
5314
|
+
* @stability stable
|
|
5185
5315
|
* @category error handling
|
|
5186
5316
|
* @since 4.0.0
|
|
5187
5317
|
*/
|
|
@@ -5228,6 +5358,7 @@ export declare const catchDefect: {
|
|
|
5228
5358
|
* Effect.runSync(Effect.all([recovered, recovered2])) // => ['missing:user-1', 'missing:user-1']
|
|
5229
5359
|
* ```
|
|
5230
5360
|
*
|
|
5361
|
+
* @stability stable
|
|
5231
5362
|
* @category error handling
|
|
5232
5363
|
* @since 2.0.0
|
|
5233
5364
|
*/
|
|
@@ -5273,6 +5404,7 @@ export declare const catchIf: {
|
|
|
5273
5404
|
* Effect.runSync(Effect.all([recovered, recovered2])) // => ['missing:user-1', 'missing:user-1']
|
|
5274
5405
|
* ```
|
|
5275
5406
|
*
|
|
5407
|
+
* @stability stable
|
|
5276
5408
|
* @category error handling
|
|
5277
5409
|
* @since 2.0.0
|
|
5278
5410
|
*/
|
|
@@ -5318,6 +5450,7 @@ export declare const catchIf: {
|
|
|
5318
5450
|
* Effect.runSync(Effect.all([recovered, recovered2])) // => ['missing:user-1', 'missing:user-1']
|
|
5319
5451
|
* ```
|
|
5320
5452
|
*
|
|
5453
|
+
* @stability stable
|
|
5321
5454
|
* @category error handling
|
|
5322
5455
|
* @since 2.0.0
|
|
5323
5456
|
*/
|
|
@@ -5363,6 +5496,7 @@ export declare const catchIf: {
|
|
|
5363
5496
|
* Effect.runSync(Effect.all([recovered, recovered2])) // => ['missing:user-1', 'missing:user-1']
|
|
5364
5497
|
* ```
|
|
5365
5498
|
*
|
|
5499
|
+
* @stability stable
|
|
5366
5500
|
* @category error handling
|
|
5367
5501
|
* @since 2.0.0
|
|
5368
5502
|
*/
|
|
@@ -5408,6 +5542,7 @@ export declare const catchIf: {
|
|
|
5408
5542
|
* Effect.runSync(Effect.all([recovered, recovered2])) // => ['missing:user-1', 'missing:user-1']
|
|
5409
5543
|
* ```
|
|
5410
5544
|
*
|
|
5545
|
+
* @stability stable
|
|
5411
5546
|
* @category error handling
|
|
5412
5547
|
* @since 2.0.0
|
|
5413
5548
|
*/
|
|
@@ -5434,6 +5569,7 @@ export declare const catchIf: {
|
|
|
5434
5569
|
* @see {@link catchTags} for recovering from several tagged errors
|
|
5435
5570
|
* @see {@link catchCauseFilter} for filtering full causes instead of typed errors
|
|
5436
5571
|
*
|
|
5572
|
+
* @stability stable
|
|
5437
5573
|
* @category error handling
|
|
5438
5574
|
* @since 4.0.0
|
|
5439
5575
|
*/
|
|
@@ -5459,6 +5595,7 @@ export declare const catchFilter: {
|
|
|
5459
5595
|
* @see {@link catchTags} for recovering from several tagged errors
|
|
5460
5596
|
* @see {@link catchCauseFilter} for filtering full causes instead of typed errors
|
|
5461
5597
|
*
|
|
5598
|
+
* @stability stable
|
|
5462
5599
|
* @category error handling
|
|
5463
5600
|
* @since 4.0.0
|
|
5464
5601
|
*/
|
|
@@ -5484,6 +5621,7 @@ export declare const catchFilter: {
|
|
|
5484
5621
|
* @see {@link catchTags} for recovering from several tagged errors
|
|
5485
5622
|
* @see {@link catchCauseFilter} for filtering full causes instead of typed errors
|
|
5486
5623
|
*
|
|
5624
|
+
* @stability stable
|
|
5487
5625
|
* @category error handling
|
|
5488
5626
|
* @since 4.0.0
|
|
5489
5627
|
*/
|
|
@@ -5520,6 +5658,7 @@ export declare const catchFilter: {
|
|
|
5520
5658
|
* @see {@link fromNullishOr} for converting nullish values into `NoSuchElementError`
|
|
5521
5659
|
* @see {@link option} for converting any failure into `Option.none`
|
|
5522
5660
|
*
|
|
5661
|
+
* @stability stable
|
|
5523
5662
|
* @category error handling
|
|
5524
5663
|
* @since 4.0.0
|
|
5525
5664
|
*/
|
|
@@ -5564,6 +5703,7 @@ export declare const catchNoSuchElement: <A, E, R>(self: Effect<A, E, R>) => Eff
|
|
|
5564
5703
|
* @see {@link catchCauseFilter} for selecting full causes with a `Filter`
|
|
5565
5704
|
* @see {@link catchIf} for predicate-based recovery from typed errors
|
|
5566
5705
|
*
|
|
5706
|
+
* @stability stable
|
|
5567
5707
|
* @category error handling
|
|
5568
5708
|
* @since 4.0.0
|
|
5569
5709
|
*/
|
|
@@ -5608,6 +5748,7 @@ export declare const catchCauseIf: {
|
|
|
5608
5748
|
* @see {@link catchCauseFilter} for selecting full causes with a `Filter`
|
|
5609
5749
|
* @see {@link catchIf} for predicate-based recovery from typed errors
|
|
5610
5750
|
*
|
|
5751
|
+
* @stability stable
|
|
5611
5752
|
* @category error handling
|
|
5612
5753
|
* @since 4.0.0
|
|
5613
5754
|
*/
|
|
@@ -5652,6 +5793,7 @@ export declare const catchCauseIf: {
|
|
|
5652
5793
|
* @see {@link catchCauseFilter} for selecting full causes with a `Filter`
|
|
5653
5794
|
* @see {@link catchIf} for predicate-based recovery from typed errors
|
|
5654
5795
|
*
|
|
5796
|
+
* @stability stable
|
|
5655
5797
|
* @category error handling
|
|
5656
5798
|
* @since 4.0.0
|
|
5657
5799
|
*/
|
|
@@ -5676,6 +5818,7 @@ export declare const catchCauseIf: {
|
|
|
5676
5818
|
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
5677
5819
|
* @see {@link catchCause} for recovering from every cause without filtering
|
|
5678
5820
|
*
|
|
5821
|
+
* @stability stable
|
|
5679
5822
|
* @category error handling
|
|
5680
5823
|
* @since 4.0.0
|
|
5681
5824
|
*/
|
|
@@ -5699,6 +5842,7 @@ export declare const catchCauseFilter: {
|
|
|
5699
5842
|
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
5700
5843
|
* @see {@link catchCause} for recovering from every cause without filtering
|
|
5701
5844
|
*
|
|
5845
|
+
* @stability stable
|
|
5702
5846
|
* @category error handling
|
|
5703
5847
|
* @since 4.0.0
|
|
5704
5848
|
*/
|
|
@@ -5722,6 +5866,7 @@ export declare const catchCauseFilter: {
|
|
|
5722
5866
|
* @see {@link catchFilter} for filtering typed error values instead of full causes
|
|
5723
5867
|
* @see {@link catchCause} for recovering from every cause without filtering
|
|
5724
5868
|
*
|
|
5869
|
+
* @stability stable
|
|
5725
5870
|
* @category error handling
|
|
5726
5871
|
* @since 4.0.0
|
|
5727
5872
|
*/
|
|
@@ -5763,6 +5908,7 @@ export declare const catchCauseFilter: {
|
|
|
5763
5908
|
* @see {@link map} for a version that operates on the success channel.
|
|
5764
5909
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
5765
5910
|
*
|
|
5911
|
+
* @stability stable
|
|
5766
5912
|
* @category error handling
|
|
5767
5913
|
* @since 2.0.0
|
|
5768
5914
|
*/
|
|
@@ -5803,6 +5949,7 @@ export declare const mapError: {
|
|
|
5803
5949
|
* @see {@link map} for a version that operates on the success channel.
|
|
5804
5950
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
5805
5951
|
*
|
|
5952
|
+
* @stability stable
|
|
5806
5953
|
* @category error handling
|
|
5807
5954
|
* @since 2.0.0
|
|
5808
5955
|
*/
|
|
@@ -5843,6 +5990,7 @@ export declare const mapError: {
|
|
|
5843
5990
|
* @see {@link map} for a version that operates on the success channel.
|
|
5844
5991
|
* @see {@link mapBoth} for a version that operates on both channels.
|
|
5845
5992
|
*
|
|
5993
|
+
* @stability stable
|
|
5846
5994
|
* @category error handling
|
|
5847
5995
|
* @since 2.0.0
|
|
5848
5996
|
*/
|
|
@@ -5886,6 +6034,7 @@ export declare const mapError: {
|
|
|
5886
6034
|
* @see {@link map} for a version that operates on the success channel.
|
|
5887
6035
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
5888
6036
|
*
|
|
6037
|
+
* @stability stable
|
|
5889
6038
|
* @category mapping
|
|
5890
6039
|
* @since 2.0.0
|
|
5891
6040
|
*/
|
|
@@ -5928,6 +6077,7 @@ export declare const mapBoth: {
|
|
|
5928
6077
|
* @see {@link map} for a version that operates on the success channel.
|
|
5929
6078
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
5930
6079
|
*
|
|
6080
|
+
* @stability stable
|
|
5931
6081
|
* @category mapping
|
|
5932
6082
|
* @since 2.0.0
|
|
5933
6083
|
*/
|
|
@@ -5973,6 +6123,7 @@ export declare const mapBoth: {
|
|
|
5973
6123
|
* @see {@link map} for a version that operates on the success channel.
|
|
5974
6124
|
* @see {@link mapError} for a version that operates on the error channel.
|
|
5975
6125
|
*
|
|
6126
|
+
* @stability stable
|
|
5976
6127
|
* @category mapping
|
|
5977
6128
|
* @since 2.0.0
|
|
5978
6129
|
*/
|
|
@@ -6009,6 +6160,7 @@ export declare const mapBoth: {
|
|
|
6009
6160
|
* Effect.runSyncExit(program) // => Exit.die(new DivideByZeroError())
|
|
6010
6161
|
* ```
|
|
6011
6162
|
*
|
|
6163
|
+
* @stability stable
|
|
6012
6164
|
* @category error handling
|
|
6013
6165
|
* @since 2.0.0
|
|
6014
6166
|
*/
|
|
@@ -6042,6 +6194,7 @@ export declare const orDie: <A, E, R>(self: Effect<A, E, R>) => Effect<A, never,
|
|
|
6042
6194
|
* output // => ["expected error: NetworkError", Exit.fail("NetworkError")]
|
|
6043
6195
|
* ```
|
|
6044
6196
|
*
|
|
6197
|
+
* @stability stable
|
|
6045
6198
|
* @category error handling
|
|
6046
6199
|
* @since 2.0.0
|
|
6047
6200
|
*/
|
|
@@ -6075,6 +6228,7 @@ export declare const tapError: {
|
|
|
6075
6228
|
* output // => ["expected error: NetworkError", Exit.fail("NetworkError")]
|
|
6076
6229
|
* ```
|
|
6077
6230
|
*
|
|
6231
|
+
* @stability stable
|
|
6078
6232
|
* @category error handling
|
|
6079
6233
|
* @since 2.0.0
|
|
6080
6234
|
*/
|
|
@@ -6108,6 +6262,7 @@ export declare const tapError: {
|
|
|
6108
6262
|
* output // => ["expected error: NetworkError", Exit.fail("NetworkError")]
|
|
6109
6263
|
* ```
|
|
6110
6264
|
*
|
|
6265
|
+
* @stability stable
|
|
6111
6266
|
* @category error handling
|
|
6112
6267
|
* @since 2.0.0
|
|
6113
6268
|
*/
|
|
@@ -6147,6 +6302,7 @@ export declare const tapError: {
|
|
|
6147
6302
|
* output // => ["expected error: 504", Exit.fail(new NetworkError({ statusCode: 504 }))]
|
|
6148
6303
|
* ```
|
|
6149
6304
|
*
|
|
6305
|
+
* @stability stable
|
|
6150
6306
|
* @category error handling
|
|
6151
6307
|
* @since 2.0.0
|
|
6152
6308
|
*/
|
|
@@ -6185,6 +6341,7 @@ export declare const tapErrorTag: {
|
|
|
6185
6341
|
* output // => ["expected error: 504", Exit.fail(new NetworkError({ statusCode: 504 }))]
|
|
6186
6342
|
* ```
|
|
6187
6343
|
*
|
|
6344
|
+
* @stability stable
|
|
6188
6345
|
* @category error handling
|
|
6189
6346
|
* @since 2.0.0
|
|
6190
6347
|
*/
|
|
@@ -6223,6 +6380,7 @@ export declare const tapErrorTag: {
|
|
|
6223
6380
|
* output // => ["expected error: 504", Exit.fail(new NetworkError({ statusCode: 504 }))]
|
|
6224
6381
|
* ```
|
|
6225
6382
|
*
|
|
6383
|
+
* @stability stable
|
|
6226
6384
|
* @category error handling
|
|
6227
6385
|
* @since 2.0.0
|
|
6228
6386
|
*/
|
|
@@ -6260,6 +6418,7 @@ export declare const tapErrorTag: {
|
|
|
6260
6418
|
* output // => ["Logging cause: Something went wrong", Exit.fail("Something went wrong")]
|
|
6261
6419
|
* ```
|
|
6262
6420
|
*
|
|
6421
|
+
* @stability stable
|
|
6263
6422
|
* @category error handling
|
|
6264
6423
|
* @since 4.0.0
|
|
6265
6424
|
*/
|
|
@@ -6296,6 +6455,7 @@ export declare const tapCause: {
|
|
|
6296
6455
|
* output // => ["Logging cause: Something went wrong", Exit.fail("Something went wrong")]
|
|
6297
6456
|
* ```
|
|
6298
6457
|
*
|
|
6458
|
+
* @stability stable
|
|
6299
6459
|
* @category error handling
|
|
6300
6460
|
* @since 4.0.0
|
|
6301
6461
|
*/
|
|
@@ -6332,6 +6492,7 @@ export declare const tapCause: {
|
|
|
6332
6492
|
* output // => ["Logging cause: Something went wrong", Exit.fail("Something went wrong")]
|
|
6333
6493
|
* ```
|
|
6334
6494
|
*
|
|
6495
|
+
* @stability stable
|
|
6335
6496
|
* @category error handling
|
|
6336
6497
|
* @since 4.0.0
|
|
6337
6498
|
*/
|
|
@@ -6365,6 +6526,7 @@ export declare const tapCause: {
|
|
|
6365
6526
|
* output // => ["Logging failure cause: Network timeout", Exit.fail("Network timeout")]
|
|
6366
6527
|
* ```
|
|
6367
6528
|
*
|
|
6529
|
+
* @stability stable
|
|
6368
6530
|
* @category error handling
|
|
6369
6531
|
* @since 4.0.0
|
|
6370
6532
|
*/
|
|
@@ -6397,6 +6559,7 @@ export declare const tapCauseIf: {
|
|
|
6397
6559
|
* output // => ["Logging failure cause: Network timeout", Exit.fail("Network timeout")]
|
|
6398
6560
|
* ```
|
|
6399
6561
|
*
|
|
6562
|
+
* @stability stable
|
|
6400
6563
|
* @category error handling
|
|
6401
6564
|
* @since 4.0.0
|
|
6402
6565
|
*/
|
|
@@ -6429,6 +6592,7 @@ export declare const tapCauseIf: {
|
|
|
6429
6592
|
* output // => ["Logging failure cause: Network timeout", Exit.fail("Network timeout")]
|
|
6430
6593
|
* ```
|
|
6431
6594
|
*
|
|
6595
|
+
* @stability stable
|
|
6432
6596
|
* @category error handling
|
|
6433
6597
|
* @since 4.0.0
|
|
6434
6598
|
*/
|
|
@@ -6453,6 +6617,7 @@ export declare const tapCauseIf: {
|
|
|
6453
6617
|
* @see {@link tapCause} for observing every failure cause
|
|
6454
6618
|
* @see {@link catchCauseFilter} for recovering from selected causes instead of only observing them
|
|
6455
6619
|
*
|
|
6620
|
+
* @stability stable
|
|
6456
6621
|
* @category error handling
|
|
6457
6622
|
* @since 4.0.0
|
|
6458
6623
|
*/
|
|
@@ -6476,6 +6641,7 @@ export declare const tapCauseFilter: {
|
|
|
6476
6641
|
* @see {@link tapCause} for observing every failure cause
|
|
6477
6642
|
* @see {@link catchCauseFilter} for recovering from selected causes instead of only observing them
|
|
6478
6643
|
*
|
|
6644
|
+
* @stability stable
|
|
6479
6645
|
* @category error handling
|
|
6480
6646
|
* @since 4.0.0
|
|
6481
6647
|
*/
|
|
@@ -6499,6 +6665,7 @@ export declare const tapCauseFilter: {
|
|
|
6499
6665
|
* @see {@link tapCause} for observing every failure cause
|
|
6500
6666
|
* @see {@link catchCauseFilter} for recovering from selected causes instead of only observing them
|
|
6501
6667
|
*
|
|
6668
|
+
* @stability stable
|
|
6502
6669
|
* @category error handling
|
|
6503
6670
|
* @since 4.0.0
|
|
6504
6671
|
*/
|
|
@@ -6535,6 +6702,7 @@ export declare const tapCauseFilter: {
|
|
|
6535
6702
|
* output // => ["defect: Something went wrong", Exit.die("Something went wrong")]
|
|
6536
6703
|
* ```
|
|
6537
6704
|
*
|
|
6705
|
+
* @stability stable
|
|
6538
6706
|
* @category error handling
|
|
6539
6707
|
* @since 2.0.0
|
|
6540
6708
|
*/
|
|
@@ -6570,6 +6738,7 @@ export declare const tapDefect: {
|
|
|
6570
6738
|
* output // => ["defect: Something went wrong", Exit.die("Something went wrong")]
|
|
6571
6739
|
* ```
|
|
6572
6740
|
*
|
|
6741
|
+
* @stability stable
|
|
6573
6742
|
* @category error handling
|
|
6574
6743
|
* @since 2.0.0
|
|
6575
6744
|
*/
|
|
@@ -6605,6 +6774,7 @@ export declare const tapDefect: {
|
|
|
6605
6774
|
* output // => ["defect: Something went wrong", Exit.die("Something went wrong")]
|
|
6606
6775
|
* ```
|
|
6607
6776
|
*
|
|
6777
|
+
* @stability stable
|
|
6608
6778
|
* @category error handling
|
|
6609
6779
|
* @since 2.0.0
|
|
6610
6780
|
*/
|
|
@@ -6640,6 +6810,7 @@ export declare const tapDefect: {
|
|
|
6640
6810
|
* output // => ["Attempt 1", "Attempt 2", "Attempt 3", "Ready"]
|
|
6641
6811
|
* ```
|
|
6642
6812
|
*
|
|
6813
|
+
* @stability stable
|
|
6643
6814
|
* @category repetition
|
|
6644
6815
|
* @since 2.0.0
|
|
6645
6816
|
*/
|
|
@@ -6647,6 +6818,7 @@ export declare const eventually: <A, E, R>(self: Effect<A, E, R>) => Effect<A, n
|
|
|
6647
6818
|
/**
|
|
6648
6819
|
* Type helpers for retrying effects.
|
|
6649
6820
|
*
|
|
6821
|
+
* @stability stable
|
|
6650
6822
|
* @category error handling
|
|
6651
6823
|
* @since 2.0.0
|
|
6652
6824
|
*/
|
|
@@ -6739,6 +6911,7 @@ export declare namespace Retry {
|
|
|
6739
6911
|
*
|
|
6740
6912
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6741
6913
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6914
|
+
* @stability stable
|
|
6742
6915
|
* @category error handling
|
|
6743
6916
|
* @since 2.0.0
|
|
6744
6917
|
*/
|
|
@@ -6791,6 +6964,7 @@ export declare const retry: {
|
|
|
6791
6964
|
*
|
|
6792
6965
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6793
6966
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
6967
|
+
* @stability stable
|
|
6794
6968
|
* @category error handling
|
|
6795
6969
|
* @since 2.0.0
|
|
6796
6970
|
*/
|
|
@@ -6843,6 +7017,7 @@ export declare const retry: {
|
|
|
6843
7017
|
*
|
|
6844
7018
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6845
7019
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
7020
|
+
* @stability stable
|
|
6846
7021
|
* @category error handling
|
|
6847
7022
|
* @since 2.0.0
|
|
6848
7023
|
*/
|
|
@@ -6895,6 +7070,7 @@ export declare const retry: {
|
|
|
6895
7070
|
*
|
|
6896
7071
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6897
7072
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
7073
|
+
* @stability stable
|
|
6898
7074
|
* @category error handling
|
|
6899
7075
|
* @since 2.0.0
|
|
6900
7076
|
*/
|
|
@@ -6947,6 +7123,7 @@ export declare const retry: {
|
|
|
6947
7123
|
*
|
|
6948
7124
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
6949
7125
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
7126
|
+
* @stability stable
|
|
6950
7127
|
* @category error handling
|
|
6951
7128
|
* @since 2.0.0
|
|
6952
7129
|
*/
|
|
@@ -6999,6 +7176,7 @@ export declare const retry: {
|
|
|
6999
7176
|
*
|
|
7000
7177
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
7001
7178
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
7179
|
+
* @stability stable
|
|
7002
7180
|
* @category error handling
|
|
7003
7181
|
* @since 2.0.0
|
|
7004
7182
|
*/
|
|
@@ -7051,6 +7229,7 @@ export declare const retry: {
|
|
|
7051
7229
|
*
|
|
7052
7230
|
* @see {@link retryOrElse} for a version that allows you to run a fallback.
|
|
7053
7231
|
* @see {@link repeat} if your retry condition is based on successful outcomes rather than errors.
|
|
7232
|
+
* @stability stable
|
|
7054
7233
|
* @category error handling
|
|
7055
7234
|
* @since 2.0.0
|
|
7056
7235
|
*/
|
|
@@ -7106,6 +7285,7 @@ export declare const retry: {
|
|
|
7106
7285
|
* ```
|
|
7107
7286
|
*
|
|
7108
7287
|
* @see {@link retry} for a version that does not run a fallback effect.
|
|
7288
|
+
* @stability stable
|
|
7109
7289
|
* @category error handling
|
|
7110
7290
|
* @since 2.0.0
|
|
7111
7291
|
*/
|
|
@@ -7160,6 +7340,7 @@ export declare const retryOrElse: {
|
|
|
7160
7340
|
* ```
|
|
7161
7341
|
*
|
|
7162
7342
|
* @see {@link retry} for a version that does not run a fallback effect.
|
|
7343
|
+
* @stability stable
|
|
7163
7344
|
* @category error handling
|
|
7164
7345
|
* @since 2.0.0
|
|
7165
7346
|
*/
|
|
@@ -7214,6 +7395,7 @@ export declare const retryOrElse: {
|
|
|
7214
7395
|
* ```
|
|
7215
7396
|
*
|
|
7216
7397
|
* @see {@link retry} for a version that does not run a fallback effect.
|
|
7398
|
+
* @stability stable
|
|
7217
7399
|
* @category error handling
|
|
7218
7400
|
* @since 2.0.0
|
|
7219
7401
|
*/
|
|
@@ -7244,6 +7426,7 @@ export declare const retryOrElse: {
|
|
|
7244
7426
|
* Effect.runSync(program) // => "Caught cause: Something went wrong"
|
|
7245
7427
|
* ```
|
|
7246
7428
|
*
|
|
7429
|
+
* @stability stable
|
|
7247
7430
|
* @category error handling
|
|
7248
7431
|
* @since 2.0.0
|
|
7249
7432
|
*/
|
|
@@ -7287,6 +7470,7 @@ export declare const sandbox: <A, E, R>(self: Effect<A, E, R>) => Effect<A, Caus
|
|
|
7287
7470
|
* Effect.runSync(program) // => undefined
|
|
7288
7471
|
* ```
|
|
7289
7472
|
*
|
|
7473
|
+
* @stability stable
|
|
7290
7474
|
* @category error handling
|
|
7291
7475
|
* @since 2.0.0
|
|
7292
7476
|
*/
|
|
@@ -7324,6 +7508,7 @@ export declare const ignore: <Arg extends Effect<any, any, any> | {
|
|
|
7324
7508
|
* Effect.runSync(program) // => undefined
|
|
7325
7509
|
* ```
|
|
7326
7510
|
*
|
|
7511
|
+
* @stability stable
|
|
7327
7512
|
* @category error handling
|
|
7328
7513
|
* @since 4.0.0
|
|
7329
7514
|
*/
|
|
@@ -7409,6 +7594,7 @@ export declare const ignoreCause: <Arg extends Effect<any, any, any> | {
|
|
|
7409
7594
|
* events // => ["AttemptStart:0", "AttemptFailure:0", "AttemptStart:1", "AttemptSuccess:1"]
|
|
7410
7595
|
* ```
|
|
7411
7596
|
*
|
|
7597
|
+
* @stability unstable
|
|
7412
7598
|
* @category error handling
|
|
7413
7599
|
* @since 3.16.0
|
|
7414
7600
|
*/
|
|
@@ -7485,6 +7671,7 @@ export declare const withExecutionPlan: {
|
|
|
7485
7671
|
* events // => ["AttemptStart:0", "AttemptFailure:0", "AttemptStart:1", "AttemptSuccess:1"]
|
|
7486
7672
|
* ```
|
|
7487
7673
|
*
|
|
7674
|
+
* @stability unstable
|
|
7488
7675
|
* @category error handling
|
|
7489
7676
|
* @since 3.16.0
|
|
7490
7677
|
*/
|
|
@@ -7568,6 +7755,7 @@ export declare const withExecutionPlan: {
|
|
|
7568
7755
|
* events // => ["AttemptStart:0", "AttemptFailure:0", "AttemptStart:1", "AttemptSuccess:1"]
|
|
7569
7756
|
* ```
|
|
7570
7757
|
*
|
|
7758
|
+
* @stability unstable
|
|
7571
7759
|
* @category error handling
|
|
7572
7760
|
* @since 3.16.0
|
|
7573
7761
|
*/
|
|
@@ -7588,6 +7776,7 @@ export declare const withExecutionPlan: {
|
|
|
7588
7776
|
* If the `defectsOnly` option is set to `true`, only defects (unrecoverable
|
|
7589
7777
|
* errors) will be reported, while regular failures will be ignored.
|
|
7590
7778
|
*
|
|
7779
|
+
* @stability unstable
|
|
7591
7780
|
* @category error handling
|
|
7592
7781
|
* @since 4.0.0
|
|
7593
7782
|
*/
|
|
@@ -7630,6 +7819,7 @@ export declare const withErrorReporting: <Arg extends Effect<any, any, any> | {
|
|
|
7630
7819
|
* Effect.runSyncExit(program) // => Exit.succeed(0)
|
|
7631
7820
|
* ```
|
|
7632
7821
|
*
|
|
7822
|
+
* @stability stable
|
|
7633
7823
|
* @category error handling
|
|
7634
7824
|
* @since 2.0.0
|
|
7635
7825
|
*/
|
|
@@ -7666,6 +7856,7 @@ export declare const orElseSucceed: {
|
|
|
7666
7856
|
* Effect.runSyncExit(program) // => Exit.succeed(0)
|
|
7667
7857
|
* ```
|
|
7668
7858
|
*
|
|
7859
|
+
* @stability stable
|
|
7669
7860
|
* @category error handling
|
|
7670
7861
|
* @since 2.0.0
|
|
7671
7862
|
*/
|
|
@@ -7702,6 +7893,7 @@ export declare const orElseSucceed: {
|
|
|
7702
7893
|
* Effect.runSyncExit(program) // => Exit.succeed(0)
|
|
7703
7894
|
* ```
|
|
7704
7895
|
*
|
|
7896
|
+
* @stability stable
|
|
7705
7897
|
* @category error handling
|
|
7706
7898
|
* @since 2.0.0
|
|
7707
7899
|
*/
|
|
@@ -7747,6 +7939,7 @@ export declare const orElseSucceed: {
|
|
|
7747
7939
|
* Effect.runSync(program) // => "secondary result"
|
|
7748
7940
|
* ```
|
|
7749
7941
|
*
|
|
7942
|
+
* @stability stable
|
|
7750
7943
|
* @category error handling
|
|
7751
7944
|
* @since 2.0.0
|
|
7752
7945
|
*/
|
|
@@ -7785,6 +7978,7 @@ export declare const firstSuccessOf: <Eff extends Effect<any, any, any>>(effects
|
|
|
7785
7978
|
* @see {@link timeoutOption} for returning `Option.none` on timeout.
|
|
7786
7979
|
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7787
7980
|
*
|
|
7981
|
+
* @stability stable
|
|
7788
7982
|
* @category delays & timeouts
|
|
7789
7983
|
* @since 2.0.0
|
|
7790
7984
|
*/
|
|
@@ -7823,6 +8017,7 @@ export declare const timeout: {
|
|
|
7823
8017
|
* @see {@link timeoutOption} for returning `Option.none` on timeout.
|
|
7824
8018
|
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7825
8019
|
*
|
|
8020
|
+
* @stability stable
|
|
7826
8021
|
* @category delays & timeouts
|
|
7827
8022
|
* @since 2.0.0
|
|
7828
8023
|
*/
|
|
@@ -7861,6 +8056,7 @@ export declare const timeout: {
|
|
|
7861
8056
|
* @see {@link timeoutOption} for returning `Option.none` on timeout.
|
|
7862
8057
|
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7863
8058
|
*
|
|
8059
|
+
* @stability stable
|
|
7864
8060
|
* @category delays & timeouts
|
|
7865
8061
|
* @since 2.0.0
|
|
7866
8062
|
*/
|
|
@@ -7893,6 +8089,7 @@ export declare const timeout: {
|
|
|
7893
8089
|
* @see {@link timeout} for a version that raises a `TimeoutError`.
|
|
7894
8090
|
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7895
8091
|
*
|
|
8092
|
+
* @stability stable
|
|
7896
8093
|
* @category delays & timeouts
|
|
7897
8094
|
* @since 3.1.0
|
|
7898
8095
|
*/
|
|
@@ -7924,6 +8121,7 @@ export declare const timeoutOption: {
|
|
|
7924
8121
|
* @see {@link timeout} for a version that raises a `TimeoutError`.
|
|
7925
8122
|
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7926
8123
|
*
|
|
8124
|
+
* @stability stable
|
|
7927
8125
|
* @category delays & timeouts
|
|
7928
8126
|
* @since 3.1.0
|
|
7929
8127
|
*/
|
|
@@ -7955,6 +8153,7 @@ export declare const timeoutOption: {
|
|
|
7955
8153
|
* @see {@link timeout} for a version that raises a `TimeoutError`.
|
|
7956
8154
|
* @see {@link timeoutOrElse} for a version that allows specifying both success and timeout handlers.
|
|
7957
8155
|
*
|
|
8156
|
+
* @stability stable
|
|
7958
8157
|
* @category delays & timeouts
|
|
7959
8158
|
* @since 3.1.0
|
|
7960
8159
|
*/
|
|
@@ -7984,6 +8183,7 @@ export declare const timeoutOption: {
|
|
|
7984
8183
|
* @see {@link timeout} for failing with a `TimeoutError`.
|
|
7985
8184
|
* @see {@link timeoutOption} for returning `Option.none` on timeout.
|
|
7986
8185
|
*
|
|
8186
|
+
* @stability stable
|
|
7987
8187
|
* @category delays & timeouts
|
|
7988
8188
|
* @since 4.0.0
|
|
7989
8189
|
*/
|
|
@@ -8012,6 +8212,7 @@ export declare const timeoutOrElse: {
|
|
|
8012
8212
|
* @see {@link timeout} for failing with a `TimeoutError`.
|
|
8013
8213
|
* @see {@link timeoutOption} for returning `Option.none` on timeout.
|
|
8014
8214
|
*
|
|
8215
|
+
* @stability stable
|
|
8015
8216
|
* @category delays & timeouts
|
|
8016
8217
|
* @since 4.0.0
|
|
8017
8218
|
*/
|
|
@@ -8043,6 +8244,7 @@ export declare const timeoutOrElse: {
|
|
|
8043
8244
|
* @see {@link timeout} for failing with a `TimeoutError`.
|
|
8044
8245
|
* @see {@link timeoutOption} for returning `Option.none` on timeout.
|
|
8045
8246
|
*
|
|
8247
|
+
* @stability stable
|
|
8046
8248
|
* @category delays & timeouts
|
|
8047
8249
|
* @since 4.0.0
|
|
8048
8250
|
*/
|
|
@@ -8067,6 +8269,7 @@ export declare const timeoutOrElse: {
|
|
|
8067
8269
|
* output // => ["Delayed message"]
|
|
8068
8270
|
* ```
|
|
8069
8271
|
*
|
|
8272
|
+
* @stability stable
|
|
8070
8273
|
* @category delays & timeouts
|
|
8071
8274
|
* @since 2.0.0
|
|
8072
8275
|
*/
|
|
@@ -8087,6 +8290,7 @@ export declare const delay: {
|
|
|
8087
8290
|
* output // => ["Delayed message"]
|
|
8088
8291
|
* ```
|
|
8089
8292
|
*
|
|
8293
|
+
* @stability stable
|
|
8090
8294
|
* @category delays & timeouts
|
|
8091
8295
|
* @since 2.0.0
|
|
8092
8296
|
*/
|
|
@@ -8107,6 +8311,7 @@ export declare const delay: {
|
|
|
8107
8311
|
* output // => ["Delayed message"]
|
|
8108
8312
|
* ```
|
|
8109
8313
|
*
|
|
8314
|
+
* @stability stable
|
|
8110
8315
|
* @category delays & timeouts
|
|
8111
8316
|
* @since 2.0.0
|
|
8112
8317
|
*/
|
|
@@ -8132,6 +8337,7 @@ export declare const delay: {
|
|
|
8132
8337
|
* output // => ["Start", "End"]
|
|
8133
8338
|
* ```
|
|
8134
8339
|
*
|
|
8340
|
+
* @stability stable
|
|
8135
8341
|
* @category delays & timeouts
|
|
8136
8342
|
* @since 2.0.0
|
|
8137
8343
|
*/
|
|
@@ -8157,6 +8363,7 @@ export declare const sleep: (duration: Duration.Input) => Effect<void>;
|
|
|
8157
8363
|
* Effect.runSync(program) // => "ok"
|
|
8158
8364
|
* ```
|
|
8159
8365
|
*
|
|
8366
|
+
* @stability stable
|
|
8160
8367
|
* @category delays & timeouts
|
|
8161
8368
|
* @since 2.0.0
|
|
8162
8369
|
*/
|
|
@@ -8189,6 +8396,7 @@ export declare const timed: <A, E, R>(self: Effect<A, E, R>) => Effect<[duration
|
|
|
8189
8396
|
* ```
|
|
8190
8397
|
*
|
|
8191
8398
|
* @see {@link race} for a version that handles only two effects.
|
|
8399
|
+
* @stability stable
|
|
8192
8400
|
* @category racing
|
|
8193
8401
|
* @since 2.0.0
|
|
8194
8402
|
*/
|
|
@@ -8221,6 +8429,7 @@ export declare const raceAll: <Eff extends Effect<any, any, any>>(all: Iterable<
|
|
|
8221
8429
|
* await Effect.runPromise(Effect.flip(raced)) // => "First failed"
|
|
8222
8430
|
* ```
|
|
8223
8431
|
*
|
|
8432
|
+
* @stability stable
|
|
8224
8433
|
* @category racing
|
|
8225
8434
|
* @since 4.0.0
|
|
8226
8435
|
*/
|
|
@@ -8257,6 +8466,7 @@ export declare const raceAllFirst: <Eff extends Effect<any, any, any>>(all: Iter
|
|
|
8257
8466
|
* output // => ["winner: slow-success"]
|
|
8258
8467
|
* ```
|
|
8259
8468
|
*
|
|
8469
|
+
* @stability stable
|
|
8260
8470
|
* @category racing
|
|
8261
8471
|
* @since 2.0.0
|
|
8262
8472
|
*/
|
|
@@ -8287,6 +8497,7 @@ export declare const race: {
|
|
|
8287
8497
|
* output // => ["winner: slow-success"]
|
|
8288
8498
|
* ```
|
|
8289
8499
|
*
|
|
8500
|
+
* @stability stable
|
|
8290
8501
|
* @category racing
|
|
8291
8502
|
* @since 2.0.0
|
|
8292
8503
|
*/
|
|
@@ -8323,6 +8534,7 @@ export declare const race: {
|
|
|
8323
8534
|
* output // => ["winner: slow-success"]
|
|
8324
8535
|
* ```
|
|
8325
8536
|
*
|
|
8537
|
+
* @stability stable
|
|
8326
8538
|
* @category racing
|
|
8327
8539
|
* @since 2.0.0
|
|
8328
8540
|
*/
|
|
@@ -8368,6 +8580,7 @@ export declare const race: {
|
|
|
8368
8580
|
* output // => ["failed: fast-fail"]
|
|
8369
8581
|
* ```
|
|
8370
8582
|
*
|
|
8583
|
+
* @stability stable
|
|
8371
8584
|
* @category racing
|
|
8372
8585
|
* @since 2.0.0
|
|
8373
8586
|
*/
|
|
@@ -8406,6 +8619,7 @@ export declare const raceFirst: {
|
|
|
8406
8619
|
* output // => ["failed: fast-fail"]
|
|
8407
8620
|
* ```
|
|
8408
8621
|
*
|
|
8622
|
+
* @stability stable
|
|
8409
8623
|
* @category racing
|
|
8410
8624
|
* @since 2.0.0
|
|
8411
8625
|
*/
|
|
@@ -8450,6 +8664,7 @@ export declare const raceFirst: {
|
|
|
8450
8664
|
* output // => ["failed: fast-fail"]
|
|
8451
8665
|
* ```
|
|
8452
8666
|
*
|
|
8667
|
+
* @stability stable
|
|
8453
8668
|
* @category racing
|
|
8454
8669
|
* @since 2.0.0
|
|
8455
8670
|
*/
|
|
@@ -8482,6 +8697,7 @@ export declare const raceFirst: {
|
|
|
8482
8697
|
* output // => [[2, 4], [2, 3]]
|
|
8483
8698
|
* ```
|
|
8484
8699
|
*
|
|
8700
|
+
* @stability stable
|
|
8485
8701
|
* @category collecting
|
|
8486
8702
|
* @since 2.0.0
|
|
8487
8703
|
*/
|
|
@@ -8507,6 +8723,7 @@ export declare const filter: {
|
|
|
8507
8723
|
* output // => [[2, 4], [2, 3]]
|
|
8508
8724
|
* ```
|
|
8509
8725
|
*
|
|
8726
|
+
* @stability stable
|
|
8510
8727
|
* @category collecting
|
|
8511
8728
|
* @since 2.0.0
|
|
8512
8729
|
*/
|
|
@@ -8532,6 +8749,7 @@ export declare const filter: {
|
|
|
8532
8749
|
* output // => [[2, 4], [2, 3]]
|
|
8533
8750
|
* ```
|
|
8534
8751
|
*
|
|
8752
|
+
* @stability stable
|
|
8535
8753
|
* @category collecting
|
|
8536
8754
|
* @since 2.0.0
|
|
8537
8755
|
*/
|
|
@@ -8557,6 +8775,7 @@ export declare const filter: {
|
|
|
8557
8775
|
* output // => [[2, 4], [2, 3]]
|
|
8558
8776
|
* ```
|
|
8559
8777
|
*
|
|
8778
|
+
* @stability stable
|
|
8560
8779
|
* @category collecting
|
|
8561
8780
|
* @since 2.0.0
|
|
8562
8781
|
*/
|
|
@@ -8584,6 +8803,7 @@ export declare const filter: {
|
|
|
8584
8803
|
* output // => [[2, 4], [2, 3]]
|
|
8585
8804
|
* ```
|
|
8586
8805
|
*
|
|
8806
|
+
* @stability stable
|
|
8587
8807
|
* @category collecting
|
|
8588
8808
|
* @since 2.0.0
|
|
8589
8809
|
*/
|
|
@@ -8609,6 +8829,7 @@ export declare const filter: {
|
|
|
8609
8829
|
* output // => [[2, 4], [2, 3]]
|
|
8610
8830
|
* ```
|
|
8611
8831
|
*
|
|
8832
|
+
* @stability stable
|
|
8612
8833
|
* @category collecting
|
|
8613
8834
|
* @since 2.0.0
|
|
8614
8835
|
*/
|
|
@@ -8634,6 +8855,7 @@ export declare const filter: {
|
|
|
8634
8855
|
* output // => [[2, 4], [2, 3]]
|
|
8635
8856
|
* ```
|
|
8636
8857
|
*
|
|
8858
|
+
* @stability stable
|
|
8637
8859
|
* @category collecting
|
|
8638
8860
|
* @since 2.0.0
|
|
8639
8861
|
*/
|
|
@@ -8657,6 +8879,7 @@ export declare const filter: {
|
|
|
8657
8879
|
* @see {@link filter} for keeping original elements with a boolean predicate, refinement, or effectful predicate
|
|
8658
8880
|
* @see {@link filterMapEffect} for using an effectful `Filter`
|
|
8659
8881
|
*
|
|
8882
|
+
* @stability stable
|
|
8660
8883
|
* @category collecting
|
|
8661
8884
|
* @since 2.0.0
|
|
8662
8885
|
*/
|
|
@@ -8677,6 +8900,7 @@ export declare const filterMap: {
|
|
|
8677
8900
|
* @see {@link filter} for keeping original elements with a boolean predicate, refinement, or effectful predicate
|
|
8678
8901
|
* @see {@link filterMapEffect} for using an effectful `Filter`
|
|
8679
8902
|
*
|
|
8903
|
+
* @stability stable
|
|
8680
8904
|
* @category collecting
|
|
8681
8905
|
* @since 2.0.0
|
|
8682
8906
|
*/
|
|
@@ -8697,6 +8921,7 @@ export declare const filterMap: {
|
|
|
8697
8921
|
* @see {@link filter} for keeping original elements with a boolean predicate, refinement, or effectful predicate
|
|
8698
8922
|
* @see {@link filterMapEffect} for using an effectful `Filter`
|
|
8699
8923
|
*
|
|
8924
|
+
* @stability stable
|
|
8700
8925
|
* @category collecting
|
|
8701
8926
|
* @since 2.0.0
|
|
8702
8927
|
*/
|
|
@@ -8723,6 +8948,7 @@ export declare const filterMap: {
|
|
|
8723
8948
|
* @see {@link filterMap} for using a synchronous `Filter`
|
|
8724
8949
|
* @see {@link filter} for keeping original elements with a predicate
|
|
8725
8950
|
*
|
|
8951
|
+
* @stability stable
|
|
8726
8952
|
* @category collecting
|
|
8727
8953
|
* @since 4.0.0
|
|
8728
8954
|
*/
|
|
@@ -8748,6 +8974,7 @@ export declare const filterMapEffect: {
|
|
|
8748
8974
|
* @see {@link filterMap} for using a synchronous `Filter`
|
|
8749
8975
|
* @see {@link filter} for keeping original elements with a predicate
|
|
8750
8976
|
*
|
|
8977
|
+
* @stability stable
|
|
8751
8978
|
* @category collecting
|
|
8752
8979
|
* @since 4.0.0
|
|
8753
8980
|
*/
|
|
@@ -8775,6 +9002,7 @@ export declare const filterMapEffect: {
|
|
|
8775
9002
|
* @see {@link filterMap} for using a synchronous `Filter`
|
|
8776
9003
|
* @see {@link filter} for keeping original elements with a predicate
|
|
8777
9004
|
*
|
|
9005
|
+
* @stability stable
|
|
8778
9006
|
* @category collecting
|
|
8779
9007
|
* @since 4.0.0
|
|
8780
9008
|
*/
|
|
@@ -8815,6 +9043,7 @@ export declare const filterMapEffect: {
|
|
|
8815
9043
|
* Effect.runSync(filtered) // => "Number 5 is odd"
|
|
8816
9044
|
* ```
|
|
8817
9045
|
*
|
|
9046
|
+
* @stability stable
|
|
8818
9047
|
* @category filtering
|
|
8819
9048
|
* @since 2.0.0
|
|
8820
9049
|
*/
|
|
@@ -8852,6 +9081,7 @@ export declare const filterOrElse: {
|
|
|
8852
9081
|
* Effect.runSync(filtered) // => "Number 5 is odd"
|
|
8853
9082
|
* ```
|
|
8854
9083
|
*
|
|
9084
|
+
* @stability stable
|
|
8855
9085
|
* @category filtering
|
|
8856
9086
|
* @since 2.0.0
|
|
8857
9087
|
*/
|
|
@@ -8889,6 +9119,7 @@ export declare const filterOrElse: {
|
|
|
8889
9119
|
* Effect.runSync(filtered) // => "Number 5 is odd"
|
|
8890
9120
|
* ```
|
|
8891
9121
|
*
|
|
9122
|
+
* @stability stable
|
|
8892
9123
|
* @category filtering
|
|
8893
9124
|
* @since 2.0.0
|
|
8894
9125
|
*/
|
|
@@ -8926,6 +9157,7 @@ export declare const filterOrElse: {
|
|
|
8926
9157
|
* Effect.runSync(filtered) // => "Number 5 is odd"
|
|
8927
9158
|
* ```
|
|
8928
9159
|
*
|
|
9160
|
+
* @stability stable
|
|
8929
9161
|
* @category filtering
|
|
8930
9162
|
* @since 2.0.0
|
|
8931
9163
|
*/
|
|
@@ -8963,6 +9195,7 @@ export declare const filterOrElse: {
|
|
|
8963
9195
|
* Effect.runSync(filtered) // => "Number 5 is odd"
|
|
8964
9196
|
* ```
|
|
8965
9197
|
*
|
|
9198
|
+
* @stability stable
|
|
8966
9199
|
* @category filtering
|
|
8967
9200
|
* @since 2.0.0
|
|
8968
9201
|
*/
|
|
@@ -8985,6 +9218,7 @@ export declare const filterOrElse: {
|
|
|
8985
9218
|
* @see {@link filterOrElse} for using a predicate and fallback effect
|
|
8986
9219
|
* @see {@link filterMapOrFail} for failing the effect when the filter fails
|
|
8987
9220
|
*
|
|
9221
|
+
* @stability stable
|
|
8988
9222
|
* @category filtering
|
|
8989
9223
|
* @since 4.0.0
|
|
8990
9224
|
*/
|
|
@@ -9006,6 +9240,7 @@ export declare const filterMapOrElse: {
|
|
|
9006
9240
|
* @see {@link filterOrElse} for using a predicate and fallback effect
|
|
9007
9241
|
* @see {@link filterMapOrFail} for failing the effect when the filter fails
|
|
9008
9242
|
*
|
|
9243
|
+
* @stability stable
|
|
9009
9244
|
* @category filtering
|
|
9010
9245
|
* @since 4.0.0
|
|
9011
9246
|
*/
|
|
@@ -9027,6 +9262,7 @@ export declare const filterMapOrElse: {
|
|
|
9027
9262
|
* @see {@link filterOrElse} for using a predicate and fallback effect
|
|
9028
9263
|
* @see {@link filterMapOrFail} for failing the effect when the filter fails
|
|
9029
9264
|
*
|
|
9265
|
+
* @stability stable
|
|
9030
9266
|
* @category filtering
|
|
9031
9267
|
* @since 4.0.0
|
|
9032
9268
|
*/
|
|
@@ -9059,6 +9295,7 @@ export declare const filterMapOrElse: {
|
|
|
9059
9295
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9060
9296
|
* ```
|
|
9061
9297
|
*
|
|
9298
|
+
* @stability stable
|
|
9062
9299
|
* @category filtering
|
|
9063
9300
|
* @since 2.0.0
|
|
9064
9301
|
*/
|
|
@@ -9090,6 +9327,7 @@ export declare const filterOrFail: {
|
|
|
9090
9327
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9091
9328
|
* ```
|
|
9092
9329
|
*
|
|
9330
|
+
* @stability stable
|
|
9093
9331
|
* @category filtering
|
|
9094
9332
|
* @since 2.0.0
|
|
9095
9333
|
*/
|
|
@@ -9121,6 +9359,7 @@ export declare const filterOrFail: {
|
|
|
9121
9359
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9122
9360
|
* ```
|
|
9123
9361
|
*
|
|
9362
|
+
* @stability stable
|
|
9124
9363
|
* @category filtering
|
|
9125
9364
|
* @since 2.0.0
|
|
9126
9365
|
*/
|
|
@@ -9152,6 +9391,7 @@ export declare const filterOrFail: {
|
|
|
9152
9391
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9153
9392
|
* ```
|
|
9154
9393
|
*
|
|
9394
|
+
* @stability stable
|
|
9155
9395
|
* @category filtering
|
|
9156
9396
|
* @since 2.0.0
|
|
9157
9397
|
*/
|
|
@@ -9183,6 +9423,7 @@ export declare const filterOrFail: {
|
|
|
9183
9423
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9184
9424
|
* ```
|
|
9185
9425
|
*
|
|
9426
|
+
* @stability stable
|
|
9186
9427
|
* @category filtering
|
|
9187
9428
|
* @since 2.0.0
|
|
9188
9429
|
*/
|
|
@@ -9214,6 +9455,7 @@ export declare const filterOrFail: {
|
|
|
9214
9455
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9215
9456
|
* ```
|
|
9216
9457
|
*
|
|
9458
|
+
* @stability stable
|
|
9217
9459
|
* @category filtering
|
|
9218
9460
|
* @since 2.0.0
|
|
9219
9461
|
*/
|
|
@@ -9245,6 +9487,7 @@ export declare const filterOrFail: {
|
|
|
9245
9487
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9246
9488
|
* ```
|
|
9247
9489
|
*
|
|
9490
|
+
* @stability stable
|
|
9248
9491
|
* @category filtering
|
|
9249
9492
|
* @since 2.0.0
|
|
9250
9493
|
*/
|
|
@@ -9276,6 +9519,7 @@ export declare const filterOrFail: {
|
|
|
9276
9519
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9277
9520
|
* ```
|
|
9278
9521
|
*
|
|
9522
|
+
* @stability stable
|
|
9279
9523
|
* @category filtering
|
|
9280
9524
|
* @since 2.0.0
|
|
9281
9525
|
*/
|
|
@@ -9307,6 +9551,7 @@ export declare const filterOrFail: {
|
|
|
9307
9551
|
* Effect.runSync(Effect.flip(filtered)) // => "Expected even number, got 5"
|
|
9308
9552
|
* ```
|
|
9309
9553
|
*
|
|
9554
|
+
* @stability stable
|
|
9310
9555
|
* @category filtering
|
|
9311
9556
|
* @since 2.0.0
|
|
9312
9557
|
*/
|
|
@@ -9329,6 +9574,7 @@ export declare const filterOrFail: {
|
|
|
9329
9574
|
* @see {@link filterOrFail} for validating with a predicate instead of a `Filter`
|
|
9330
9575
|
* @see {@link filterMap} for filtering and mapping iterable elements
|
|
9331
9576
|
*
|
|
9577
|
+
* @stability stable
|
|
9332
9578
|
* @category filtering
|
|
9333
9579
|
* @since 4.0.0
|
|
9334
9580
|
*/
|
|
@@ -9350,6 +9596,7 @@ export declare const filterMapOrFail: {
|
|
|
9350
9596
|
* @see {@link filterOrFail} for validating with a predicate instead of a `Filter`
|
|
9351
9597
|
* @see {@link filterMap} for filtering and mapping iterable elements
|
|
9352
9598
|
*
|
|
9599
|
+
* @stability stable
|
|
9353
9600
|
* @category filtering
|
|
9354
9601
|
* @since 4.0.0
|
|
9355
9602
|
*/
|
|
@@ -9371,6 +9618,7 @@ export declare const filterMapOrFail: {
|
|
|
9371
9618
|
* @see {@link filterOrFail} for validating with a predicate instead of a `Filter`
|
|
9372
9619
|
* @see {@link filterMap} for filtering and mapping iterable elements
|
|
9373
9620
|
*
|
|
9621
|
+
* @stability stable
|
|
9374
9622
|
* @category filtering
|
|
9375
9623
|
* @since 4.0.0
|
|
9376
9624
|
*/
|
|
@@ -9392,6 +9640,7 @@ export declare const filterMapOrFail: {
|
|
|
9392
9640
|
* @see {@link filterOrFail} for validating with a predicate instead of a `Filter`
|
|
9393
9641
|
* @see {@link filterMap} for filtering and mapping iterable elements
|
|
9394
9642
|
*
|
|
9643
|
+
* @stability stable
|
|
9395
9644
|
* @category filtering
|
|
9396
9645
|
* @since 4.0.0
|
|
9397
9646
|
*/
|
|
@@ -9413,6 +9662,7 @@ export declare const filterMapOrFail: {
|
|
|
9413
9662
|
* @see {@link filterOrFail} for validating with a predicate instead of a `Filter`
|
|
9414
9663
|
* @see {@link filterMap} for filtering and mapping iterable elements
|
|
9415
9664
|
*
|
|
9665
|
+
* @stability stable
|
|
9416
9666
|
* @category filtering
|
|
9417
9667
|
* @since 4.0.0
|
|
9418
9668
|
*/
|
|
@@ -9451,6 +9701,7 @@ export declare const filterMapOrFail: {
|
|
|
9451
9701
|
* output // => ["Condition is true!", Option.some(undefined)]
|
|
9452
9702
|
* ```
|
|
9453
9703
|
*
|
|
9704
|
+
* @stability stable
|
|
9454
9705
|
* @category filtering
|
|
9455
9706
|
* @since 2.0.0
|
|
9456
9707
|
*/
|
|
@@ -9488,6 +9739,7 @@ export declare const when: {
|
|
|
9488
9739
|
* output // => ["Condition is true!", Option.some(undefined)]
|
|
9489
9740
|
* ```
|
|
9490
9741
|
*
|
|
9742
|
+
* @stability stable
|
|
9491
9743
|
* @category filtering
|
|
9492
9744
|
* @since 2.0.0
|
|
9493
9745
|
*/
|
|
@@ -9525,6 +9777,7 @@ export declare const when: {
|
|
|
9525
9777
|
* output // => ["Condition is true!", Option.some(undefined)]
|
|
9526
9778
|
* ```
|
|
9527
9779
|
*
|
|
9780
|
+
* @stability stable
|
|
9528
9781
|
* @category filtering
|
|
9529
9782
|
* @since 2.0.0
|
|
9530
9783
|
*/
|
|
@@ -9577,6 +9830,7 @@ export declare const when: {
|
|
|
9577
9830
|
* ```
|
|
9578
9831
|
*
|
|
9579
9832
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
9833
|
+
* @stability stable
|
|
9580
9834
|
* @category pattern matching
|
|
9581
9835
|
* @since 2.0.0
|
|
9582
9836
|
*/
|
|
@@ -9628,6 +9882,7 @@ export declare const match: {
|
|
|
9628
9882
|
* ```
|
|
9629
9883
|
*
|
|
9630
9884
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
9885
|
+
* @stability stable
|
|
9631
9886
|
* @category pattern matching
|
|
9632
9887
|
* @since 2.0.0
|
|
9633
9888
|
*/
|
|
@@ -9682,6 +9937,7 @@ export declare const match: {
|
|
|
9682
9937
|
* ```
|
|
9683
9938
|
*
|
|
9684
9939
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
9940
|
+
* @stability stable
|
|
9685
9941
|
* @category pattern matching
|
|
9686
9942
|
* @since 2.0.0
|
|
9687
9943
|
*/
|
|
@@ -9726,6 +9982,7 @@ export declare const match: {
|
|
|
9726
9982
|
*
|
|
9727
9983
|
* @see {@link match} for the non-eager version.
|
|
9728
9984
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
9985
|
+
* @stability stable
|
|
9729
9986
|
* @category pattern matching
|
|
9730
9987
|
* @since 4.0.0
|
|
9731
9988
|
*/
|
|
@@ -9766,6 +10023,7 @@ export declare const matchEager: {
|
|
|
9766
10023
|
*
|
|
9767
10024
|
* @see {@link match} for the non-eager version.
|
|
9768
10025
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
10026
|
+
* @stability stable
|
|
9769
10027
|
* @category pattern matching
|
|
9770
10028
|
* @since 4.0.0
|
|
9771
10029
|
*/
|
|
@@ -9809,6 +10067,7 @@ export declare const matchEager: {
|
|
|
9809
10067
|
*
|
|
9810
10068
|
* @see {@link match} for the non-eager version.
|
|
9811
10069
|
* @see {@link matchEffect} if you need to perform side effects in the handlers.
|
|
10070
|
+
* @stability stable
|
|
9812
10071
|
* @category pattern matching
|
|
9813
10072
|
* @since 4.0.0
|
|
9814
10073
|
*/
|
|
@@ -9848,6 +10107,7 @@ export declare const matchEager: {
|
|
|
9848
10107
|
* @see {@link matchCauseEffect} if you need to perform side effects in the
|
|
9849
10108
|
* handlers.
|
|
9850
10109
|
* @see {@link match} if you don't need to handle the cause of the failure.
|
|
10110
|
+
* @stability stable
|
|
9851
10111
|
* @category pattern matching
|
|
9852
10112
|
* @since 2.0.0
|
|
9853
10113
|
*/
|
|
@@ -9883,6 +10143,7 @@ export declare const matchCause: {
|
|
|
9883
10143
|
* @see {@link matchCauseEffect} if you need to perform side effects in the
|
|
9884
10144
|
* handlers.
|
|
9885
10145
|
* @see {@link match} if you don't need to handle the cause of the failure.
|
|
10146
|
+
* @stability stable
|
|
9886
10147
|
* @category pattern matching
|
|
9887
10148
|
* @since 2.0.0
|
|
9888
10149
|
*/
|
|
@@ -9921,6 +10182,7 @@ export declare const matchCause: {
|
|
|
9921
10182
|
* @see {@link matchCauseEffect} if you need to perform side effects in the
|
|
9922
10183
|
* handlers.
|
|
9923
10184
|
* @see {@link match} if you don't need to handle the cause of the failure.
|
|
10185
|
+
* @stability stable
|
|
9924
10186
|
* @category pattern matching
|
|
9925
10187
|
* @since 2.0.0
|
|
9926
10188
|
*/
|
|
@@ -9955,6 +10217,7 @@ export declare const matchCause: {
|
|
|
9955
10217
|
* Effect.runSync(handleResult) // => "Success: 42"
|
|
9956
10218
|
* ```
|
|
9957
10219
|
*
|
|
10220
|
+
* @stability stable
|
|
9958
10221
|
* @category pattern matching
|
|
9959
10222
|
* @since 4.0.0
|
|
9960
10223
|
*/
|
|
@@ -9985,6 +10248,7 @@ export declare const matchCauseEager: {
|
|
|
9985
10248
|
* Effect.runSync(handleResult) // => "Success: 42"
|
|
9986
10249
|
* ```
|
|
9987
10250
|
*
|
|
10251
|
+
* @stability stable
|
|
9988
10252
|
* @category pattern matching
|
|
9989
10253
|
* @since 4.0.0
|
|
9990
10254
|
*/
|
|
@@ -10018,6 +10282,7 @@ export declare const matchCauseEager: {
|
|
|
10018
10282
|
* Effect.runSync(handleResult) // => "Success: 42"
|
|
10019
10283
|
* ```
|
|
10020
10284
|
*
|
|
10285
|
+
* @stability stable
|
|
10021
10286
|
* @category pattern matching
|
|
10022
10287
|
* @since 4.0.0
|
|
10023
10288
|
*/
|
|
@@ -10043,6 +10308,7 @@ export declare const matchCauseEager: {
|
|
|
10043
10308
|
* @see {@link matchCauseEager} for eager cause matching with pure handlers
|
|
10044
10309
|
* @see {@link matchEffect} for effectful matching on typed failures instead of full causes
|
|
10045
10310
|
*
|
|
10311
|
+
* @stability stable
|
|
10046
10312
|
* @category pattern matching
|
|
10047
10313
|
* @since 4.0.0
|
|
10048
10314
|
*/
|
|
@@ -10064,6 +10330,7 @@ export declare const matchCauseEffectEager: {
|
|
|
10064
10330
|
* @see {@link matchCauseEager} for eager cause matching with pure handlers
|
|
10065
10331
|
* @see {@link matchEffect} for effectful matching on typed failures instead of full causes
|
|
10066
10332
|
*
|
|
10333
|
+
* @stability stable
|
|
10067
10334
|
* @category pattern matching
|
|
10068
10335
|
* @since 4.0.0
|
|
10069
10336
|
*/
|
|
@@ -10088,6 +10355,7 @@ export declare const matchCauseEffectEager: {
|
|
|
10088
10355
|
* @see {@link matchCauseEager} for eager cause matching with pure handlers
|
|
10089
10356
|
* @see {@link matchEffect} for effectful matching on typed failures instead of full causes
|
|
10090
10357
|
*
|
|
10358
|
+
* @stability stable
|
|
10091
10359
|
* @category pattern matching
|
|
10092
10360
|
* @since 4.0.0
|
|
10093
10361
|
*/
|
|
@@ -10151,6 +10419,7 @@ export declare const matchCauseEffectEager: {
|
|
|
10151
10419
|
* @see {@link matchCause} if you don't need side effects and only want to handle the result or failure.
|
|
10152
10420
|
* @see {@link matchEffect} if you don't need to handle the cause of the failure.
|
|
10153
10421
|
*
|
|
10422
|
+
* @stability stable
|
|
10154
10423
|
* @category pattern matching
|
|
10155
10424
|
* @since 2.0.0
|
|
10156
10425
|
*/
|
|
@@ -10210,6 +10479,7 @@ export declare const matchCauseEffect: {
|
|
|
10210
10479
|
* @see {@link matchCause} if you don't need side effects and only want to handle the result or failure.
|
|
10211
10480
|
* @see {@link matchEffect} if you don't need to handle the cause of the failure.
|
|
10212
10481
|
*
|
|
10482
|
+
* @stability stable
|
|
10213
10483
|
* @category pattern matching
|
|
10214
10484
|
* @since 2.0.0
|
|
10215
10485
|
*/
|
|
@@ -10272,6 +10542,7 @@ export declare const matchCauseEffect: {
|
|
|
10272
10542
|
* @see {@link matchCause} if you don't need side effects and only want to handle the result or failure.
|
|
10273
10543
|
* @see {@link matchEffect} if you don't need to handle the cause of the failure.
|
|
10274
10544
|
*
|
|
10545
|
+
* @stability stable
|
|
10275
10546
|
* @category pattern matching
|
|
10276
10547
|
* @since 2.0.0
|
|
10277
10548
|
*/
|
|
@@ -10327,6 +10598,7 @@ export declare const matchCauseEffect: {
|
|
|
10327
10598
|
*
|
|
10328
10599
|
* @see {@link match} if you don't need side effects and only want to handle the
|
|
10329
10600
|
* result or failure.
|
|
10601
|
+
* @stability stable
|
|
10330
10602
|
* @category pattern matching
|
|
10331
10603
|
* @since 2.0.0
|
|
10332
10604
|
*/
|
|
@@ -10378,6 +10650,7 @@ export declare const matchEffect: {
|
|
|
10378
10650
|
*
|
|
10379
10651
|
* @see {@link match} if you don't need side effects and only want to handle the
|
|
10380
10652
|
* result or failure.
|
|
10653
|
+
* @stability stable
|
|
10381
10654
|
* @category pattern matching
|
|
10382
10655
|
* @since 2.0.0
|
|
10383
10656
|
*/
|
|
@@ -10432,6 +10705,7 @@ export declare const matchEffect: {
|
|
|
10432
10705
|
*
|
|
10433
10706
|
* @see {@link match} if you don't need side effects and only want to handle the
|
|
10434
10707
|
* result or failure.
|
|
10708
|
+
* @stability stable
|
|
10435
10709
|
* @category pattern matching
|
|
10436
10710
|
* @since 2.0.0
|
|
10437
10711
|
*/
|
|
@@ -10462,6 +10736,7 @@ export declare const matchEffect: {
|
|
|
10462
10736
|
* output // => [true]
|
|
10463
10737
|
* ```
|
|
10464
10738
|
*
|
|
10739
|
+
* @stability stable
|
|
10465
10740
|
* @category predicates
|
|
10466
10741
|
* @since 2.0.0
|
|
10467
10742
|
*/
|
|
@@ -10491,6 +10766,7 @@ export declare const isFailure: <A, E, R>(self: Effect<A, E, R>) => Effect<boole
|
|
|
10491
10766
|
* output // => ["ok: true", "failed: false"]
|
|
10492
10767
|
* ```
|
|
10493
10768
|
*
|
|
10769
|
+
* @stability stable
|
|
10494
10770
|
* @category predicates
|
|
10495
10771
|
* @since 2.0.0
|
|
10496
10772
|
*/
|
|
@@ -10543,6 +10819,7 @@ export declare const isSuccess: <A, E, R>(self: Effect<A, E, R>) => Effect<boole
|
|
|
10543
10819
|
* @see {@link contextWith} for deriving an effect from the complete context
|
|
10544
10820
|
* @see {@link service} for reading one service from the context
|
|
10545
10821
|
*
|
|
10822
|
+
* @stability stable
|
|
10546
10823
|
* @category accessors
|
|
10547
10824
|
* @since 2.0.0
|
|
10548
10825
|
*/
|
|
@@ -10601,6 +10878,7 @@ export declare const context: <R = never>() => Effect<Context.Context<R>, never,
|
|
|
10601
10878
|
* @see {@link context} for reading the complete context as a value
|
|
10602
10879
|
* @see {@link service} for reading one service from the context
|
|
10603
10880
|
*
|
|
10881
|
+
* @stability stable
|
|
10604
10882
|
* @category accessors
|
|
10605
10883
|
* @since 2.0.0
|
|
10606
10884
|
*/
|
|
@@ -10635,6 +10913,7 @@ export declare const contextWith: <R, A, E, R2>(f: (context: Context.Context<R>)
|
|
|
10635
10913
|
* await Effect.runPromise(provided) // => "Result for: SELECT * FROM users"
|
|
10636
10914
|
* ```
|
|
10637
10915
|
*
|
|
10916
|
+
* @stability stable
|
|
10638
10917
|
* @category providing services
|
|
10639
10918
|
* @since 2.0.0
|
|
10640
10919
|
*/
|
|
@@ -10669,6 +10948,7 @@ export declare const provide: {
|
|
|
10669
10948
|
* await Effect.runPromise(provided) // => "Result for: SELECT * FROM users"
|
|
10670
10949
|
* ```
|
|
10671
10950
|
*
|
|
10951
|
+
* @stability stable
|
|
10672
10952
|
* @category providing services
|
|
10673
10953
|
* @since 2.0.0
|
|
10674
10954
|
*/
|
|
@@ -10705,6 +10985,7 @@ export declare const provide: {
|
|
|
10705
10985
|
* await Effect.runPromise(provided) // => "Result for: SELECT * FROM users"
|
|
10706
10986
|
* ```
|
|
10707
10987
|
*
|
|
10988
|
+
* @stability stable
|
|
10708
10989
|
* @category providing services
|
|
10709
10990
|
* @since 2.0.0
|
|
10710
10991
|
*/
|
|
@@ -10741,6 +11022,7 @@ export declare const provide: {
|
|
|
10741
11022
|
* await Effect.runPromise(provided) // => "Result for: SELECT * FROM users"
|
|
10742
11023
|
* ```
|
|
10743
11024
|
*
|
|
11025
|
+
* @stability stable
|
|
10744
11026
|
* @category providing services
|
|
10745
11027
|
* @since 2.0.0
|
|
10746
11028
|
*/
|
|
@@ -10775,6 +11057,7 @@ export declare const provide: {
|
|
|
10775
11057
|
* await Effect.runPromise(provided) // => "Result for: SELECT * FROM users"
|
|
10776
11058
|
* ```
|
|
10777
11059
|
*
|
|
11060
|
+
* @stability stable
|
|
10778
11061
|
* @category providing services
|
|
10779
11062
|
* @since 2.0.0
|
|
10780
11063
|
*/
|
|
@@ -10811,6 +11094,7 @@ export declare const provide: {
|
|
|
10811
11094
|
* await Effect.runPromise(provided) // => "Result for: SELECT * FROM users"
|
|
10812
11095
|
* ```
|
|
10813
11096
|
*
|
|
11097
|
+
* @stability stable
|
|
10814
11098
|
* @category providing services
|
|
10815
11099
|
* @since 2.0.0
|
|
10816
11100
|
*/
|
|
@@ -10847,6 +11131,7 @@ export declare const provide: {
|
|
|
10847
11131
|
* await Effect.runPromise(provided) // => "Result for: SELECT * FROM users"
|
|
10848
11132
|
* ```
|
|
10849
11133
|
*
|
|
11134
|
+
* @stability stable
|
|
10850
11135
|
* @category providing services
|
|
10851
11136
|
* @since 2.0.0
|
|
10852
11137
|
*/
|
|
@@ -10892,6 +11177,7 @@ export declare const provide: {
|
|
|
10892
11177
|
* output // => ["Querying database", "result"]
|
|
10893
11178
|
* ```
|
|
10894
11179
|
*
|
|
11180
|
+
* @stability stable
|
|
10895
11181
|
* @category providing services
|
|
10896
11182
|
* @since 4.0.0
|
|
10897
11183
|
*/
|
|
@@ -10936,6 +11222,7 @@ export declare const provideContext: {
|
|
|
10936
11222
|
* output // => ["Querying database", "result"]
|
|
10937
11223
|
* ```
|
|
10938
11224
|
*
|
|
11225
|
+
* @stability stable
|
|
10939
11226
|
* @category providing services
|
|
10940
11227
|
* @since 4.0.0
|
|
10941
11228
|
*/
|
|
@@ -10980,6 +11267,7 @@ export declare const provideContext: {
|
|
|
10980
11267
|
* output // => ["Querying database", "result"]
|
|
10981
11268
|
* ```
|
|
10982
11269
|
*
|
|
11270
|
+
* @stability stable
|
|
10983
11271
|
* @category providing services
|
|
10984
11272
|
* @since 4.0.0
|
|
10985
11273
|
*/
|
|
@@ -11023,6 +11311,7 @@ export declare const provideContext: {
|
|
|
11023
11311
|
* @see {@link provideContext} for partially satisfying an effect's context requirements.
|
|
11024
11312
|
* @see {@link updateContext} for deriving the required context from the current one.
|
|
11025
11313
|
*
|
|
11314
|
+
* @stability stable
|
|
11026
11315
|
* @category providing services
|
|
11027
11316
|
* @since 4.0.0
|
|
11028
11317
|
*/
|
|
@@ -11065,6 +11354,7 @@ export declare const setContext: {
|
|
|
11065
11354
|
* @see {@link provideContext} for partially satisfying an effect's context requirements.
|
|
11066
11355
|
* @see {@link updateContext} for deriving the required context from the current one.
|
|
11067
11356
|
*
|
|
11357
|
+
* @stability stable
|
|
11068
11358
|
* @category providing services
|
|
11069
11359
|
* @since 4.0.0
|
|
11070
11360
|
*/
|
|
@@ -11107,6 +11397,7 @@ export declare const setContext: {
|
|
|
11107
11397
|
* @see {@link provideContext} for partially satisfying an effect's context requirements.
|
|
11108
11398
|
* @see {@link updateContext} for deriving the required context from the current one.
|
|
11109
11399
|
*
|
|
11400
|
+
* @stability stable
|
|
11110
11401
|
* @category providing services
|
|
11111
11402
|
* @since 4.0.0
|
|
11112
11403
|
*/
|
|
@@ -11137,6 +11428,7 @@ export declare const setContext: {
|
|
|
11137
11428
|
* Effect.runSync(runnable) // => "Result for: SELECT * FROM users"
|
|
11138
11429
|
* ```
|
|
11139
11430
|
*
|
|
11431
|
+
* @stability stable
|
|
11140
11432
|
* @category accessors
|
|
11141
11433
|
* @since 4.0.0
|
|
11142
11434
|
*/
|
|
@@ -11182,6 +11474,7 @@ export declare const service: <I, S>(service: Context.Key<I, S>) => Effect<S, ne
|
|
|
11182
11474
|
* output // => ["Service not available"]
|
|
11183
11475
|
* ```
|
|
11184
11476
|
*
|
|
11477
|
+
* @stability stable
|
|
11185
11478
|
* @category accessors
|
|
11186
11479
|
* @since 2.0.0
|
|
11187
11480
|
*/
|
|
@@ -11225,6 +11518,7 @@ export declare const serviceOption: <I, S>(key: Context.Key<I, S>) => Effect<Opt
|
|
|
11225
11518
|
* Effect.runSync(result) // => "Hello World!"
|
|
11226
11519
|
* ```
|
|
11227
11520
|
*
|
|
11521
|
+
* @stability stable
|
|
11228
11522
|
* @category providing services
|
|
11229
11523
|
* @since 4.0.0
|
|
11230
11524
|
*/
|
|
@@ -11268,6 +11562,7 @@ export declare const updateContext: {
|
|
|
11268
11562
|
* Effect.runSync(result) // => "Hello World!"
|
|
11269
11563
|
* ```
|
|
11270
11564
|
*
|
|
11565
|
+
* @stability stable
|
|
11271
11566
|
* @category providing services
|
|
11272
11567
|
* @since 4.0.0
|
|
11273
11568
|
*/
|
|
@@ -11311,6 +11606,7 @@ export declare const updateContext: {
|
|
|
11311
11606
|
* Effect.runSync(result) // => "Hello World!"
|
|
11312
11607
|
* ```
|
|
11313
11608
|
*
|
|
11609
|
+
* @stability stable
|
|
11314
11610
|
* @category providing services
|
|
11315
11611
|
* @since 4.0.0
|
|
11316
11612
|
*/
|
|
@@ -11348,6 +11644,7 @@ export declare const updateContext: {
|
|
|
11348
11644
|
* output // => ["Updated count: 1", 1]
|
|
11349
11645
|
* ```
|
|
11350
11646
|
*
|
|
11647
|
+
* @stability stable
|
|
11351
11648
|
* @category providing services
|
|
11352
11649
|
* @since 2.0.0
|
|
11353
11650
|
*/
|
|
@@ -11384,6 +11681,7 @@ export declare const updateService: {
|
|
|
11384
11681
|
* output // => ["Updated count: 1", 1]
|
|
11385
11682
|
* ```
|
|
11386
11683
|
*
|
|
11684
|
+
* @stability stable
|
|
11387
11685
|
* @category providing services
|
|
11388
11686
|
* @since 2.0.0
|
|
11389
11687
|
*/
|
|
@@ -11420,6 +11718,7 @@ export declare const updateService: {
|
|
|
11420
11718
|
* output // => ["Updated count: 1", 1]
|
|
11421
11719
|
* ```
|
|
11422
11720
|
*
|
|
11721
|
+
* @stability stable
|
|
11423
11722
|
* @category providing services
|
|
11424
11723
|
* @since 2.0.0
|
|
11425
11724
|
*/
|
|
@@ -11481,6 +11780,7 @@ export declare const updateService: {
|
|
|
11481
11780
|
*
|
|
11482
11781
|
* @see {@link updateService} for updating a service only within a wrapped effect
|
|
11483
11782
|
*
|
|
11783
|
+
* @stability stable
|
|
11484
11784
|
* @category providing services
|
|
11485
11785
|
* @since 4.0.0
|
|
11486
11786
|
*/
|
|
@@ -11531,6 +11831,7 @@ export declare const updateServiceScoped: <I, A>(service: Context.Key<I, A>, f:
|
|
|
11531
11831
|
* @see {@link provide} for providing multiple layers to an effect.
|
|
11532
11832
|
* @see {@link provideServiceEffect} for acquiring the service implementation effectfully.
|
|
11533
11833
|
* @see {@link provideContext} for providing a complete context.
|
|
11834
|
+
* @stability stable
|
|
11534
11835
|
* @category providing services
|
|
11535
11836
|
* @since 2.0.0
|
|
11536
11837
|
*/
|
|
@@ -11579,6 +11880,7 @@ export declare const provideService: {
|
|
|
11579
11880
|
* @see {@link provide} for providing multiple layers to an effect.
|
|
11580
11881
|
* @see {@link provideServiceEffect} for acquiring the service implementation effectfully.
|
|
11581
11882
|
* @see {@link provideContext} for providing a complete context.
|
|
11883
|
+
* @stability stable
|
|
11582
11884
|
* @category providing services
|
|
11583
11885
|
* @since 2.0.0
|
|
11584
11886
|
*/
|
|
@@ -11627,6 +11929,7 @@ export declare const provideService: {
|
|
|
11627
11929
|
* @see {@link provide} for providing multiple layers to an effect.
|
|
11628
11930
|
* @see {@link provideServiceEffect} for acquiring the service implementation effectfully.
|
|
11629
11931
|
* @see {@link provideContext} for providing a complete context.
|
|
11932
|
+
* @stability stable
|
|
11630
11933
|
* @category providing services
|
|
11631
11934
|
* @since 2.0.0
|
|
11632
11935
|
*/
|
|
@@ -11675,6 +11978,7 @@ export declare const provideService: {
|
|
|
11675
11978
|
* @see {@link provide} for providing multiple layers to an effect.
|
|
11676
11979
|
* @see {@link provideServiceEffect} for acquiring the service implementation effectfully.
|
|
11677
11980
|
* @see {@link provideContext} for providing a complete context.
|
|
11981
|
+
* @stability stable
|
|
11678
11982
|
* @category providing services
|
|
11679
11983
|
* @since 2.0.0
|
|
11680
11984
|
*/
|
|
@@ -11724,6 +12028,7 @@ export declare const provideService: {
|
|
|
11724
12028
|
* @see {@link provide} for providing multiple layers to an effect.
|
|
11725
12029
|
* @see {@link provideServiceEffect} for acquiring the service implementation effectfully.
|
|
11726
12030
|
* @see {@link provideContext} for providing a complete context.
|
|
12031
|
+
* @stability stable
|
|
11727
12032
|
* @category providing services
|
|
11728
12033
|
* @since 2.0.0
|
|
11729
12034
|
*/
|
|
@@ -11772,6 +12077,7 @@ export declare const provideService: {
|
|
|
11772
12077
|
* @see {@link provide} for providing multiple layers to an effect.
|
|
11773
12078
|
* @see {@link provideServiceEffect} for acquiring the service implementation effectfully.
|
|
11774
12079
|
* @see {@link provideContext} for providing a complete context.
|
|
12080
|
+
* @stability stable
|
|
11775
12081
|
* @category providing services
|
|
11776
12082
|
* @since 2.0.0
|
|
11777
12083
|
*/
|
|
@@ -11829,6 +12135,7 @@ export declare const provideService: {
|
|
|
11829
12135
|
* output // => ["Establishing database connection...", "Database connected!", "Result for: SELECT * FROM users"]
|
|
11830
12136
|
* ```
|
|
11831
12137
|
*
|
|
12138
|
+
* @stability stable
|
|
11832
12139
|
* @category providing services
|
|
11833
12140
|
* @since 2.0.0
|
|
11834
12141
|
*/
|
|
@@ -11885,6 +12192,7 @@ export declare const provideServiceEffect: {
|
|
|
11885
12192
|
* output // => ["Establishing database connection...", "Database connected!", "Result for: SELECT * FROM users"]
|
|
11886
12193
|
* ```
|
|
11887
12194
|
*
|
|
12195
|
+
* @stability stable
|
|
11888
12196
|
* @category providing services
|
|
11889
12197
|
* @since 2.0.0
|
|
11890
12198
|
*/
|
|
@@ -11941,6 +12249,7 @@ export declare const provideServiceEffect: {
|
|
|
11941
12249
|
* output // => ["Establishing database connection...", "Database connected!", "Result for: SELECT * FROM users"]
|
|
11942
12250
|
* ```
|
|
11943
12251
|
*
|
|
12252
|
+
* @stability stable
|
|
11944
12253
|
* @category providing services
|
|
11945
12254
|
* @since 2.0.0
|
|
11946
12255
|
*/
|
|
@@ -11972,6 +12281,7 @@ export declare const provideServiceEffect: {
|
|
|
11972
12281
|
* output // => ["Got scope for resource management", "Acquiring resource", "Releasing resource", "resource"]
|
|
11973
12282
|
* ```
|
|
11974
12283
|
*
|
|
12284
|
+
* @stability stable
|
|
11975
12285
|
* @category resource management
|
|
11976
12286
|
* @since 2.0.0
|
|
11977
12287
|
*/
|
|
@@ -12011,6 +12321,7 @@ export declare const scope: Effect<Scope, never, Scope>;
|
|
|
12011
12321
|
* output // => ["Acquiring resource", "Using resource", "Releasing resource"]
|
|
12012
12322
|
* ```
|
|
12013
12323
|
*
|
|
12324
|
+
* @stability stable
|
|
12014
12325
|
* @category resource management
|
|
12015
12326
|
* @since 2.0.0
|
|
12016
12327
|
*/
|
|
@@ -12052,6 +12363,7 @@ export declare const scoped: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Ex
|
|
|
12052
12363
|
* output // => ["Inside scoped context", "Acquiring resource", "Releasing resource", "Manual finalizer", "resource"]
|
|
12053
12364
|
* ```
|
|
12054
12365
|
*
|
|
12366
|
+
* @stability stable
|
|
12055
12367
|
* @category resource management
|
|
12056
12368
|
* @since 3.11.0
|
|
12057
12369
|
*/
|
|
@@ -12118,6 +12430,7 @@ export declare const scopedWith: <A, E, R>(f: (scope: Scope) => Effect<A, E, R>)
|
|
|
12118
12430
|
* @see {@link acquireDisposable} for resources that implement JavaScript disposal protocols
|
|
12119
12431
|
* @see {@link acquireUseRelease} for bracketing acquire, use, and release in one effect
|
|
12120
12432
|
*
|
|
12433
|
+
* @stability stable
|
|
12121
12434
|
* @category resource management
|
|
12122
12435
|
* @since 2.0.0
|
|
12123
12436
|
*/
|
|
@@ -12169,6 +12482,7 @@ export declare const acquireRelease: <A, E, R, R2>(acquire: Effect<A, E, R>, rel
|
|
|
12169
12482
|
*
|
|
12170
12483
|
* @see {@link acquireRelease} for resources that need an explicit finalizer
|
|
12171
12484
|
*
|
|
12485
|
+
* @stability stable
|
|
12172
12486
|
* @category resource management
|
|
12173
12487
|
* @since 4.0.0
|
|
12174
12488
|
*/
|
|
@@ -12244,6 +12558,7 @@ export declare const acquireDisposable: <A extends AsyncDisposable | Disposable,
|
|
|
12244
12558
|
*
|
|
12245
12559
|
* @see {@link acquireRelease} for scoped resources whose use happens later
|
|
12246
12560
|
*
|
|
12561
|
+
* @stability stable
|
|
12247
12562
|
* @category resource management
|
|
12248
12563
|
* @since 2.0.0
|
|
12249
12564
|
*/
|
|
@@ -12291,6 +12606,7 @@ export declare const acquireUseRelease: <Resource, E, R, A, E2, R2, E3, R3>(acqu
|
|
|
12291
12606
|
* @see {@link acquireRelease} for resource acquisition with a release finalizer
|
|
12292
12607
|
* @see {@link ensuring} for attaching a finalizer to one effect
|
|
12293
12608
|
*
|
|
12609
|
+
* @stability stable
|
|
12294
12610
|
* @category resource management
|
|
12295
12611
|
* @since 2.0.0
|
|
12296
12612
|
*/
|
|
@@ -12330,6 +12646,7 @@ export declare const addFinalizer: <R>(finalizer: (exit: Exit.Exit<unknown, unkn
|
|
|
12330
12646
|
* output // => ["Task started", "Task completed", "Cleanup: This always runs!", 42]
|
|
12331
12647
|
* ```
|
|
12332
12648
|
*
|
|
12649
|
+
* @stability stable
|
|
12333
12650
|
* @category resource management
|
|
12334
12651
|
* @since 2.0.0
|
|
12335
12652
|
*/
|
|
@@ -12369,6 +12686,7 @@ export declare const ensuring: {
|
|
|
12369
12686
|
* output // => ["Task started", "Task completed", "Cleanup: This always runs!", 42]
|
|
12370
12687
|
* ```
|
|
12371
12688
|
*
|
|
12689
|
+
* @stability stable
|
|
12372
12690
|
* @category resource management
|
|
12373
12691
|
* @since 2.0.0
|
|
12374
12692
|
*/
|
|
@@ -12408,6 +12726,7 @@ export declare const ensuring: {
|
|
|
12408
12726
|
* output // => ["Task started", "Task completed", "Cleanup: This always runs!", 42]
|
|
12409
12727
|
* ```
|
|
12410
12728
|
*
|
|
12729
|
+
* @stability stable
|
|
12411
12730
|
* @category resource management
|
|
12412
12731
|
* @since 2.0.0
|
|
12413
12732
|
*/
|
|
@@ -12437,6 +12756,7 @@ export declare const ensuring: {
|
|
|
12437
12756
|
* output // => ["Cleanup on error: TaskError: Something went wrong", Exit.fail(error)]
|
|
12438
12757
|
* ```
|
|
12439
12758
|
*
|
|
12759
|
+
* @stability stable
|
|
12440
12760
|
* @category resource management
|
|
12441
12761
|
* @since 2.0.0
|
|
12442
12762
|
*/
|
|
@@ -12465,6 +12785,7 @@ export declare const onError: {
|
|
|
12465
12785
|
* output // => ["Cleanup on error: TaskError: Something went wrong", Exit.fail(error)]
|
|
12466
12786
|
* ```
|
|
12467
12787
|
*
|
|
12788
|
+
* @stability stable
|
|
12468
12789
|
* @category resource management
|
|
12469
12790
|
* @since 2.0.0
|
|
12470
12791
|
*/
|
|
@@ -12493,6 +12814,7 @@ export declare const onError: {
|
|
|
12493
12814
|
* output // => ["Cleanup on error: TaskError: Something went wrong", Exit.fail(error)]
|
|
12494
12815
|
* ```
|
|
12495
12816
|
*
|
|
12817
|
+
* @stability stable
|
|
12496
12818
|
* @category resource management
|
|
12497
12819
|
* @since 2.0.0
|
|
12498
12820
|
*/
|
|
@@ -12523,6 +12845,7 @@ export declare const onError: {
|
|
|
12523
12845
|
* output // => ["Cause: boom", Exit.fail("boom")]
|
|
12524
12846
|
* ```
|
|
12525
12847
|
*
|
|
12848
|
+
* @stability stable
|
|
12526
12849
|
* @category resource management
|
|
12527
12850
|
* @since 4.0.0
|
|
12528
12851
|
*/
|
|
@@ -12552,6 +12875,7 @@ export declare const onErrorIf: {
|
|
|
12552
12875
|
* output // => ["Cause: boom", Exit.fail("boom")]
|
|
12553
12876
|
* ```
|
|
12554
12877
|
*
|
|
12878
|
+
* @stability stable
|
|
12555
12879
|
* @category resource management
|
|
12556
12880
|
* @since 4.0.0
|
|
12557
12881
|
*/
|
|
@@ -12581,6 +12905,7 @@ export declare const onErrorIf: {
|
|
|
12581
12905
|
* output // => ["Cause: boom", Exit.fail("boom")]
|
|
12582
12906
|
* ```
|
|
12583
12907
|
*
|
|
12908
|
+
* @stability stable
|
|
12584
12909
|
* @category resource management
|
|
12585
12910
|
* @since 4.0.0
|
|
12586
12911
|
*/
|
|
@@ -12599,6 +12924,7 @@ export declare const onErrorIf: {
|
|
|
12599
12924
|
* @see {@link onErrorIf} for selecting failures with a boolean predicate
|
|
12600
12925
|
* @see {@link onExitFilter} for selecting from every exit instead of only failures
|
|
12601
12926
|
*
|
|
12927
|
+
* @stability stable
|
|
12602
12928
|
* @category resource management
|
|
12603
12929
|
* @since 4.0.0
|
|
12604
12930
|
*/
|
|
@@ -12616,6 +12942,7 @@ export declare const onErrorFilter: {
|
|
|
12616
12942
|
* @see {@link onErrorIf} for selecting failures with a boolean predicate
|
|
12617
12943
|
* @see {@link onExitFilter} for selecting from every exit instead of only failures
|
|
12618
12944
|
*
|
|
12945
|
+
* @stability stable
|
|
12619
12946
|
* @category resource management
|
|
12620
12947
|
* @since 4.0.0
|
|
12621
12948
|
*/
|
|
@@ -12633,6 +12960,7 @@ export declare const onErrorFilter: {
|
|
|
12633
12960
|
* @see {@link onErrorIf} for selecting failures with a boolean predicate
|
|
12634
12961
|
* @see {@link onExitFilter} for selecting from every exit instead of only failures
|
|
12635
12962
|
*
|
|
12963
|
+
* @stability stable
|
|
12636
12964
|
* @category resource management
|
|
12637
12965
|
* @since 4.0.0
|
|
12638
12966
|
*/
|
|
@@ -12656,6 +12984,7 @@ export declare const onErrorFilter: {
|
|
|
12656
12984
|
*
|
|
12657
12985
|
* @see {@link onExit} for ordinary exit-aware cleanup whose finalizer always returns an effect
|
|
12658
12986
|
*
|
|
12987
|
+
* @stability stable
|
|
12659
12988
|
* @category resource management
|
|
12660
12989
|
* @since 4.0.0
|
|
12661
12990
|
*/
|
|
@@ -12687,6 +13016,7 @@ export declare const onExitPrimitive: <A, E, R, XE = never, XR = never>(self: Ef
|
|
|
12687
13016
|
* output // => ["Task succeeded with: 42", 42]
|
|
12688
13017
|
* ```
|
|
12689
13018
|
*
|
|
13019
|
+
* @stability stable
|
|
12690
13020
|
* @category resource management
|
|
12691
13021
|
* @since 2.0.0
|
|
12692
13022
|
*/
|
|
@@ -12718,6 +13048,7 @@ export declare const onExit: {
|
|
|
12718
13048
|
* output // => ["Task succeeded with: 42", 42]
|
|
12719
13049
|
* ```
|
|
12720
13050
|
*
|
|
13051
|
+
* @stability stable
|
|
12721
13052
|
* @category resource management
|
|
12722
13053
|
* @since 2.0.0
|
|
12723
13054
|
*/
|
|
@@ -12749,6 +13080,7 @@ export declare const onExit: {
|
|
|
12749
13080
|
* output // => ["Task succeeded with: 42", 42]
|
|
12750
13081
|
* ```
|
|
12751
13082
|
*
|
|
13083
|
+
* @stability stable
|
|
12752
13084
|
* @category resource management
|
|
12753
13085
|
* @since 2.0.0
|
|
12754
13086
|
*/
|
|
@@ -12777,6 +13109,7 @@ export declare const onExit: {
|
|
|
12777
13109
|
* output // => ["Succeeded with: 42", 42]
|
|
12778
13110
|
* ```
|
|
12779
13111
|
*
|
|
13112
|
+
* @stability stable
|
|
12780
13113
|
* @category resource management
|
|
12781
13114
|
* @since 4.0.0
|
|
12782
13115
|
*/
|
|
@@ -12804,6 +13137,7 @@ export declare const onExitIf: {
|
|
|
12804
13137
|
* output // => ["Succeeded with: 42", 42]
|
|
12805
13138
|
* ```
|
|
12806
13139
|
*
|
|
13140
|
+
* @stability stable
|
|
12807
13141
|
* @category resource management
|
|
12808
13142
|
* @since 4.0.0
|
|
12809
13143
|
*/
|
|
@@ -12831,6 +13165,7 @@ export declare const onExitIf: {
|
|
|
12831
13165
|
* output // => ["Succeeded with: 42", 42]
|
|
12832
13166
|
* ```
|
|
12833
13167
|
*
|
|
13168
|
+
* @stability stable
|
|
12834
13169
|
* @category resource management
|
|
12835
13170
|
* @since 4.0.0
|
|
12836
13171
|
*/
|
|
@@ -12854,6 +13189,7 @@ export declare const onExitIf: {
|
|
|
12854
13189
|
* @see {@link onExitIf} for selecting exits with a boolean predicate
|
|
12855
13190
|
* @see {@link onErrorFilter} for selecting only failure causes
|
|
12856
13191
|
*
|
|
13192
|
+
* @stability stable
|
|
12857
13193
|
* @category resource management
|
|
12858
13194
|
* @since 4.0.0
|
|
12859
13195
|
*/
|
|
@@ -12876,6 +13212,7 @@ export declare const onExitFilter: {
|
|
|
12876
13212
|
* @see {@link onExitIf} for selecting exits with a boolean predicate
|
|
12877
13213
|
* @see {@link onErrorFilter} for selecting only failure causes
|
|
12878
13214
|
*
|
|
13215
|
+
* @stability stable
|
|
12879
13216
|
* @category resource management
|
|
12880
13217
|
* @since 4.0.0
|
|
12881
13218
|
*/
|
|
@@ -12898,6 +13235,7 @@ export declare const onExitFilter: {
|
|
|
12898
13235
|
* @see {@link onExitIf} for selecting exits with a boolean predicate
|
|
12899
13236
|
* @see {@link onErrorFilter} for selecting only failure causes
|
|
12900
13237
|
*
|
|
13238
|
+
* @stability stable
|
|
12901
13239
|
* @category resource management
|
|
12902
13240
|
* @since 4.0.0
|
|
12903
13241
|
*/
|
|
@@ -12919,6 +13257,11 @@ export declare const onExitFilter: {
|
|
|
12919
13257
|
* evaluations of the same effect will return the cached result without
|
|
12920
13258
|
* re-executing the logic.
|
|
12921
13259
|
*
|
|
13260
|
+
* Concurrent callers share the pending computation, which is interrupted only
|
|
13261
|
+
* once every caller waiting on it has been interrupted. Interrupted
|
|
13262
|
+
* computations are never cached, so the next evaluation starts a fresh
|
|
13263
|
+
* computation.
|
|
13264
|
+
*
|
|
12922
13265
|
* **Example** (Memoizing an effect until invalidated)
|
|
12923
13266
|
*
|
|
12924
13267
|
* ```ts import.meta.vitest
|
|
@@ -12950,6 +13293,7 @@ export declare const onExitFilter: {
|
|
|
12950
13293
|
* time-to-live duration for the cached value.
|
|
12951
13294
|
* @see {@link cachedInvalidateWithTTL} for a similar function that includes an
|
|
12952
13295
|
* additional effect for manually invalidating the cached value.
|
|
13296
|
+
* @stability stable
|
|
12953
13297
|
* @category caching
|
|
12954
13298
|
* @since 2.0.0
|
|
12955
13299
|
*/
|
|
@@ -12979,11 +13323,12 @@ export declare const cached: <A, E, R>(self: Effect<A, E, R>) => Effect<Effect<A
|
|
|
12979
13323
|
* `Duration.Input`. The function runs once after each fresh computation,
|
|
12980
13324
|
* including failures, so successes and failures can have different TTLs. It
|
|
12981
13325
|
* does not run when the cache is created or when a cached result is reused.
|
|
12982
|
-
*
|
|
12983
|
-
* returned duration.
|
|
13326
|
+
* Interrupted computations are never cached and do not call the function.
|
|
12984
13327
|
*
|
|
12985
13328
|
* The TTL starts when the computation completes. Concurrent callers share the
|
|
12986
|
-
* pending computation
|
|
13329
|
+
* pending computation, which is interrupted only once every caller waiting on
|
|
13330
|
+
* it has been interrupted. The next evaluation then starts a fresh
|
|
13331
|
+
* computation. A zero TTL expires immediately, and an infinite TTL
|
|
12987
13332
|
* keeps the result indefinitely.
|
|
12988
13333
|
*
|
|
12989
13334
|
* **Example** (Memoizing an effect with TTL)
|
|
@@ -13034,6 +13379,7 @@ export declare const cached: <A, E, R>(self: Effect<A, E, R>) => Effect<Effect<A
|
|
|
13034
13379
|
* indefinitely.
|
|
13035
13380
|
* @see {@link cachedInvalidateWithTTL} for a similar function that includes an
|
|
13036
13381
|
* additional effect for manually invalidating the cached value.
|
|
13382
|
+
* @stability stable
|
|
13037
13383
|
* @category caching
|
|
13038
13384
|
* @since 2.0.0
|
|
13039
13385
|
*/
|
|
@@ -13063,11 +13409,12 @@ export declare const cachedWithTTL: {
|
|
|
13063
13409
|
* `Duration.Input`. The function runs once after each fresh computation,
|
|
13064
13410
|
* including failures, so successes and failures can have different TTLs. It
|
|
13065
13411
|
* does not run when the cache is created or when a cached result is reused.
|
|
13066
|
-
*
|
|
13067
|
-
* returned duration.
|
|
13412
|
+
* Interrupted computations are never cached and do not call the function.
|
|
13068
13413
|
*
|
|
13069
13414
|
* The TTL starts when the computation completes. Concurrent callers share the
|
|
13070
|
-
* pending computation
|
|
13415
|
+
* pending computation, which is interrupted only once every caller waiting on
|
|
13416
|
+
* it has been interrupted. The next evaluation then starts a fresh
|
|
13417
|
+
* computation. A zero TTL expires immediately, and an infinite TTL
|
|
13071
13418
|
* keeps the result indefinitely.
|
|
13072
13419
|
*
|
|
13073
13420
|
* **Example** (Memoizing an effect with TTL)
|
|
@@ -13118,6 +13465,7 @@ export declare const cachedWithTTL: {
|
|
|
13118
13465
|
* indefinitely.
|
|
13119
13466
|
* @see {@link cachedInvalidateWithTTL} for a similar function that includes an
|
|
13120
13467
|
* additional effect for manually invalidating the cached value.
|
|
13468
|
+
* @stability stable
|
|
13121
13469
|
* @category caching
|
|
13122
13470
|
* @since 2.0.0
|
|
13123
13471
|
*/
|
|
@@ -13147,11 +13495,12 @@ export declare const cachedWithTTL: {
|
|
|
13147
13495
|
* `Duration.Input`. The function runs once after each fresh computation,
|
|
13148
13496
|
* including failures, so successes and failures can have different TTLs. It
|
|
13149
13497
|
* does not run when the cache is created or when a cached result is reused.
|
|
13150
|
-
*
|
|
13151
|
-
* returned duration.
|
|
13498
|
+
* Interrupted computations are never cached and do not call the function.
|
|
13152
13499
|
*
|
|
13153
13500
|
* The TTL starts when the computation completes. Concurrent callers share the
|
|
13154
|
-
* pending computation
|
|
13501
|
+
* pending computation, which is interrupted only once every caller waiting on
|
|
13502
|
+
* it has been interrupted. The next evaluation then starts a fresh
|
|
13503
|
+
* computation. A zero TTL expires immediately, and an infinite TTL
|
|
13155
13504
|
* keeps the result indefinitely.
|
|
13156
13505
|
*
|
|
13157
13506
|
* **Example** (Memoizing an effect with TTL)
|
|
@@ -13202,6 +13551,7 @@ export declare const cachedWithTTL: {
|
|
|
13202
13551
|
* indefinitely.
|
|
13203
13552
|
* @see {@link cachedInvalidateWithTTL} for a similar function that includes an
|
|
13204
13553
|
* additional effect for manually invalidating the cached value.
|
|
13554
|
+
* @stability stable
|
|
13205
13555
|
* @category caching
|
|
13206
13556
|
* @since 2.0.0
|
|
13207
13557
|
*/
|
|
@@ -13231,11 +13581,12 @@ export declare const cachedWithTTL: {
|
|
|
13231
13581
|
* `Duration.Input`. The function runs once after each fresh computation,
|
|
13232
13582
|
* including failures, so successes and failures can have different TTLs. It
|
|
13233
13583
|
* does not run when the cache is created or when a cached result is reused.
|
|
13234
|
-
*
|
|
13235
|
-
* returned duration.
|
|
13584
|
+
* Interrupted computations are never cached and do not call the function.
|
|
13236
13585
|
*
|
|
13237
13586
|
* The TTL starts when the computation completes. Concurrent callers share the
|
|
13238
|
-
* pending computation
|
|
13587
|
+
* pending computation, which is interrupted only once every caller waiting on
|
|
13588
|
+
* it has been interrupted. The next evaluation then starts a fresh
|
|
13589
|
+
* computation. A zero TTL expires immediately, and an infinite TTL
|
|
13239
13590
|
* keeps the result indefinitely.
|
|
13240
13591
|
*
|
|
13241
13592
|
* **Example** (Memoizing an effect with TTL)
|
|
@@ -13286,6 +13637,7 @@ export declare const cachedWithTTL: {
|
|
|
13286
13637
|
* indefinitely.
|
|
13287
13638
|
* @see {@link cachedInvalidateWithTTL} for a similar function that includes an
|
|
13288
13639
|
* additional effect for manually invalidating the cached value.
|
|
13640
|
+
* @stability stable
|
|
13289
13641
|
* @category caching
|
|
13290
13642
|
* @since 2.0.0
|
|
13291
13643
|
*/
|
|
@@ -13315,11 +13667,12 @@ export declare const cachedWithTTL: {
|
|
|
13315
13667
|
* `Duration.Input`. The function runs once after each fresh computation,
|
|
13316
13668
|
* including failures, so successes and failures can have different TTLs. It
|
|
13317
13669
|
* does not run when the cache is created or when a cached result is reused.
|
|
13318
|
-
*
|
|
13319
|
-
* returned duration.
|
|
13670
|
+
* Interrupted computations are never cached and do not call the function.
|
|
13320
13671
|
*
|
|
13321
13672
|
* The TTL starts when the computation completes. Concurrent callers share the
|
|
13322
|
-
* pending computation
|
|
13673
|
+
* pending computation, which is interrupted only once every caller waiting on
|
|
13674
|
+
* it has been interrupted. The next evaluation then starts a fresh
|
|
13675
|
+
* computation. A zero TTL expires immediately, and an infinite TTL
|
|
13323
13676
|
* keeps the result indefinitely.
|
|
13324
13677
|
*
|
|
13325
13678
|
* **Example** (Memoizing an effect with TTL)
|
|
@@ -13370,14 +13723,15 @@ export declare const cachedWithTTL: {
|
|
|
13370
13723
|
* indefinitely.
|
|
13371
13724
|
* @see {@link cachedInvalidateWithTTL} for a similar function that includes an
|
|
13372
13725
|
* additional effect for manually invalidating the cached value.
|
|
13726
|
+
* @stability stable
|
|
13373
13727
|
* @category caching
|
|
13374
13728
|
* @since 2.0.0
|
|
13375
13729
|
*/
|
|
13376
13730
|
<A, E, R>(self: Effect<A, E, R>, timeToLive: Duration.Input | ((exit: Exit.Exit<A, E>) => Duration.Input)): Effect<Effect<A, E, R>>;
|
|
13377
13731
|
};
|
|
13378
13732
|
/**
|
|
13379
|
-
* Creates a cached effect result for a
|
|
13380
|
-
* invalidation before expiration.
|
|
13733
|
+
* Creates a cached effect result for a fixed duration or a duration computed
|
|
13734
|
+
* from its `Exit` and allows manual invalidation before expiration.
|
|
13381
13735
|
*
|
|
13382
13736
|
* **When to use**
|
|
13383
13737
|
*
|
|
@@ -13430,13 +13784,74 @@ export declare const cachedWithTTL: {
|
|
|
13430
13784
|
* indefinitely.
|
|
13431
13785
|
* @see {@link cachedWithTTL} for a similar function that caches the result for
|
|
13432
13786
|
* a specified duration but does not include an effect for manual invalidation.
|
|
13787
|
+
* @stability stable
|
|
13433
13788
|
* @category caching
|
|
13434
13789
|
* @since 2.0.0
|
|
13435
13790
|
*/
|
|
13436
13791
|
export declare const cachedInvalidateWithTTL: {
|
|
13437
13792
|
/**
|
|
13438
|
-
* Creates a cached effect result for a
|
|
13439
|
-
* invalidation before expiration.
|
|
13793
|
+
* Creates a cached effect result for a fixed duration or a duration computed
|
|
13794
|
+
* from its `Exit` and allows manual invalidation before expiration.
|
|
13795
|
+
*
|
|
13796
|
+
* **When to use**
|
|
13797
|
+
*
|
|
13798
|
+
* Use when an effect result should be cached for a bounded time and callers
|
|
13799
|
+
* also need a manual invalidation effect to force recomputation before
|
|
13800
|
+
* expiration.
|
|
13801
|
+
*
|
|
13802
|
+
* **Details**
|
|
13803
|
+
*
|
|
13804
|
+
* This function behaves similarly to {@link cachedWithTTL} by caching the
|
|
13805
|
+
* result of an effect for a specified period of time. However, it introduces an
|
|
13806
|
+
* additional feature: it provides an effect that allows you to manually
|
|
13807
|
+
* invalidate the cached result before it naturally expires.
|
|
13808
|
+
*
|
|
13809
|
+
* This gives you more control over the cache, allowing you to refresh the
|
|
13810
|
+
* result when needed, even if the original cache has not yet expired.
|
|
13811
|
+
*
|
|
13812
|
+
* Once the cache is invalidated, the next time the effect is evaluated, the
|
|
13813
|
+
* result will be recomputed, and the cache will be refreshed.
|
|
13814
|
+
*
|
|
13815
|
+
* **Example** (Memoizing with TTL and invalidation)
|
|
13816
|
+
*
|
|
13817
|
+
* ```ts import.meta.vitest
|
|
13818
|
+
* import { Effect } from "effect"
|
|
13819
|
+
* const output: Array<unknown> = []
|
|
13820
|
+
* const record = (value: unknown) => Effect.sync(() => { output.push(value) })
|
|
13821
|
+
*
|
|
13822
|
+
* let i = 1
|
|
13823
|
+
* const expensiveTask = Effect.sync(() => {
|
|
13824
|
+
* void output.push("expensive task...")
|
|
13825
|
+
* return `result ${i++}`
|
|
13826
|
+
* })
|
|
13827
|
+
*
|
|
13828
|
+
* const program = Effect.gen(function*() {
|
|
13829
|
+
* const [cached, invalidate] = yield* Effect.cachedInvalidateWithTTL(
|
|
13830
|
+
* expensiveTask,
|
|
13831
|
+
* "1 hour"
|
|
13832
|
+
* )
|
|
13833
|
+
* yield* cached.pipe(Effect.andThen(record))
|
|
13834
|
+
* yield* cached.pipe(Effect.andThen(record))
|
|
13835
|
+
* yield* invalidate
|
|
13836
|
+
* yield* cached.pipe(Effect.andThen(record))
|
|
13837
|
+
* })
|
|
13838
|
+
*
|
|
13839
|
+
* Effect.runSync(program)
|
|
13840
|
+
* output // => ["expensive task...", "result 1", "result 1", "expensive task...", "result 2"]
|
|
13841
|
+
* ```
|
|
13842
|
+
*
|
|
13843
|
+
* @see {@link cached} for a similar function that caches the result
|
|
13844
|
+
* indefinitely.
|
|
13845
|
+
* @see {@link cachedWithTTL} for a similar function that caches the result for
|
|
13846
|
+
* a specified duration but does not include an effect for manual invalidation.
|
|
13847
|
+
* @stability stable
|
|
13848
|
+
* @category caching
|
|
13849
|
+
* @since 2.0.0
|
|
13850
|
+
*/
|
|
13851
|
+
<A, E>(timeToLive: (exit: Exit.Exit<A, E>) => Duration.Input): <R>(self: Effect<A, E, R>) => Effect<[Effect<A, E, R>, Effect<void>]>;
|
|
13852
|
+
/**
|
|
13853
|
+
* Creates a cached effect result for a fixed duration or a duration computed
|
|
13854
|
+
* from its `Exit` and allows manual invalidation before expiration.
|
|
13440
13855
|
*
|
|
13441
13856
|
* **When to use**
|
|
13442
13857
|
*
|
|
@@ -13489,13 +13904,74 @@ export declare const cachedInvalidateWithTTL: {
|
|
|
13489
13904
|
* indefinitely.
|
|
13490
13905
|
* @see {@link cachedWithTTL} for a similar function that caches the result for
|
|
13491
13906
|
* a specified duration but does not include an effect for manual invalidation.
|
|
13907
|
+
* @stability stable
|
|
13492
13908
|
* @category caching
|
|
13493
13909
|
* @since 2.0.0
|
|
13494
13910
|
*/
|
|
13495
13911
|
(timeToLive: Duration.Input): <A, E, R>(self: Effect<A, E, R>) => Effect<[Effect<A, E, R>, Effect<void>]>;
|
|
13496
13912
|
/**
|
|
13497
|
-
* Creates a cached effect result for a
|
|
13498
|
-
* invalidation before expiration.
|
|
13913
|
+
* Creates a cached effect result for a fixed duration or a duration computed
|
|
13914
|
+
* from its `Exit` and allows manual invalidation before expiration.
|
|
13915
|
+
*
|
|
13916
|
+
* **When to use**
|
|
13917
|
+
*
|
|
13918
|
+
* Use when an effect result should be cached for a bounded time and callers
|
|
13919
|
+
* also need a manual invalidation effect to force recomputation before
|
|
13920
|
+
* expiration.
|
|
13921
|
+
*
|
|
13922
|
+
* **Details**
|
|
13923
|
+
*
|
|
13924
|
+
* This function behaves similarly to {@link cachedWithTTL} by caching the
|
|
13925
|
+
* result of an effect for a specified period of time. However, it introduces an
|
|
13926
|
+
* additional feature: it provides an effect that allows you to manually
|
|
13927
|
+
* invalidate the cached result before it naturally expires.
|
|
13928
|
+
*
|
|
13929
|
+
* This gives you more control over the cache, allowing you to refresh the
|
|
13930
|
+
* result when needed, even if the original cache has not yet expired.
|
|
13931
|
+
*
|
|
13932
|
+
* Once the cache is invalidated, the next time the effect is evaluated, the
|
|
13933
|
+
* result will be recomputed, and the cache will be refreshed.
|
|
13934
|
+
*
|
|
13935
|
+
* **Example** (Memoizing with TTL and invalidation)
|
|
13936
|
+
*
|
|
13937
|
+
* ```ts import.meta.vitest
|
|
13938
|
+
* import { Effect } from "effect"
|
|
13939
|
+
* const output: Array<unknown> = []
|
|
13940
|
+
* const record = (value: unknown) => Effect.sync(() => { output.push(value) })
|
|
13941
|
+
*
|
|
13942
|
+
* let i = 1
|
|
13943
|
+
* const expensiveTask = Effect.sync(() => {
|
|
13944
|
+
* void output.push("expensive task...")
|
|
13945
|
+
* return `result ${i++}`
|
|
13946
|
+
* })
|
|
13947
|
+
*
|
|
13948
|
+
* const program = Effect.gen(function*() {
|
|
13949
|
+
* const [cached, invalidate] = yield* Effect.cachedInvalidateWithTTL(
|
|
13950
|
+
* expensiveTask,
|
|
13951
|
+
* "1 hour"
|
|
13952
|
+
* )
|
|
13953
|
+
* yield* cached.pipe(Effect.andThen(record))
|
|
13954
|
+
* yield* cached.pipe(Effect.andThen(record))
|
|
13955
|
+
* yield* invalidate
|
|
13956
|
+
* yield* cached.pipe(Effect.andThen(record))
|
|
13957
|
+
* })
|
|
13958
|
+
*
|
|
13959
|
+
* Effect.runSync(program)
|
|
13960
|
+
* output // => ["expensive task...", "result 1", "result 1", "expensive task...", "result 2"]
|
|
13961
|
+
* ```
|
|
13962
|
+
*
|
|
13963
|
+
* @see {@link cached} for a similar function that caches the result
|
|
13964
|
+
* indefinitely.
|
|
13965
|
+
* @see {@link cachedWithTTL} for a similar function that caches the result for
|
|
13966
|
+
* a specified duration but does not include an effect for manual invalidation.
|
|
13967
|
+
* @stability stable
|
|
13968
|
+
* @category caching
|
|
13969
|
+
* @since 2.0.0
|
|
13970
|
+
*/
|
|
13971
|
+
<A, E>(timeToLive: Duration.Input | ((exit: Exit.Exit<A, E>) => Duration.Input)): <R>(self: Effect<A, E, R>) => Effect<[Effect<A, E, R>, Effect<void>]>;
|
|
13972
|
+
/**
|
|
13973
|
+
* Creates a cached effect result for a fixed duration or a duration computed
|
|
13974
|
+
* from its `Exit` and allows manual invalidation before expiration.
|
|
13499
13975
|
*
|
|
13500
13976
|
* **When to use**
|
|
13501
13977
|
*
|
|
@@ -13548,10 +14024,11 @@ export declare const cachedInvalidateWithTTL: {
|
|
|
13548
14024
|
* indefinitely.
|
|
13549
14025
|
* @see {@link cachedWithTTL} for a similar function that caches the result for
|
|
13550
14026
|
* a specified duration but does not include an effect for manual invalidation.
|
|
14027
|
+
* @stability stable
|
|
13551
14028
|
* @category caching
|
|
13552
14029
|
* @since 2.0.0
|
|
13553
14030
|
*/
|
|
13554
|
-
<A, E, R>(self: Effect<A, E, R>, timeToLive: Duration.Input): Effect<[Effect<A, E, R>, Effect<void>]>;
|
|
14031
|
+
<A, E, R>(self: Effect<A, E, R>, timeToLive: Duration.Input | ((exit: Exit.Exit<A, E>) => Duration.Input)): Effect<[Effect<A, E, R>, Effect<void>]>;
|
|
13555
14032
|
};
|
|
13556
14033
|
/**
|
|
13557
14034
|
* Returns an effect that is immediately interrupted.
|
|
@@ -13569,6 +14046,7 @@ export declare const cachedInvalidateWithTTL: {
|
|
|
13569
14046
|
* Effect.runSyncExit(program)._tag // => "Failure"
|
|
13570
14047
|
* ```
|
|
13571
14048
|
*
|
|
14049
|
+
* @stability stable
|
|
13572
14050
|
* @category interruption
|
|
13573
14051
|
* @since 2.0.0
|
|
13574
14052
|
*/
|
|
@@ -13587,6 +14065,7 @@ export declare const interrupt: Effect<never>;
|
|
|
13587
14065
|
* await Effect.runPromise(program) // => Option.none()
|
|
13588
14066
|
* ```
|
|
13589
14067
|
*
|
|
14068
|
+
* @stability stable
|
|
13590
14069
|
* @category interruption
|
|
13591
14070
|
* @since 2.0.0
|
|
13592
14071
|
*/
|
|
@@ -13612,6 +14091,7 @@ export declare const interruptible: <A, E, R>(self: Effect<A, E, R>) => Effect<A
|
|
|
13612
14091
|
* output // => ["Task was interrupted, cleaning up..."]
|
|
13613
14092
|
* ```
|
|
13614
14093
|
*
|
|
14094
|
+
* @stability stable
|
|
13615
14095
|
* @category interruption
|
|
13616
14096
|
* @since 2.0.0
|
|
13617
14097
|
*/
|
|
@@ -13637,6 +14117,7 @@ export declare const onInterrupt: {
|
|
|
13637
14117
|
* output // => ["Task was interrupted, cleaning up..."]
|
|
13638
14118
|
* ```
|
|
13639
14119
|
*
|
|
14120
|
+
* @stability stable
|
|
13640
14121
|
* @category interruption
|
|
13641
14122
|
* @since 2.0.0
|
|
13642
14123
|
*/
|
|
@@ -13662,6 +14143,7 @@ export declare const onInterrupt: {
|
|
|
13662
14143
|
* output // => ["Task was interrupted, cleaning up..."]
|
|
13663
14144
|
* ```
|
|
13664
14145
|
*
|
|
14146
|
+
* @stability stable
|
|
13665
14147
|
* @category interruption
|
|
13666
14148
|
* @since 2.0.0
|
|
13667
14149
|
*/
|
|
@@ -13687,6 +14169,7 @@ export declare const onInterrupt: {
|
|
|
13687
14169
|
* output // => ["Starting critical section...", "Critical section completed"]
|
|
13688
14170
|
* ```
|
|
13689
14171
|
*
|
|
14172
|
+
* @stability stable
|
|
13690
14173
|
* @category interruption
|
|
13691
14174
|
* @since 2.0.0
|
|
13692
14175
|
*/
|
|
@@ -13719,6 +14202,7 @@ export declare const uninterruptible: <A, E, R>(self: Effect<A, E, R>) => Effect
|
|
|
13719
14202
|
* output // => ["Uninterruptible phase...", "Interruptible phase...", "Back to uninterruptible"]
|
|
13720
14203
|
* ```
|
|
13721
14204
|
*
|
|
14205
|
+
* @stability stable
|
|
13722
14206
|
* @category interruption
|
|
13723
14207
|
* @since 2.0.0
|
|
13724
14208
|
*/
|
|
@@ -13751,6 +14235,7 @@ export declare const uninterruptibleMask: <A, E, R>(f: (restore: <AX, EX, RX>(ef
|
|
|
13751
14235
|
* output // => ["Interruptible phase...", "Uninterruptible phase...", "Back to interruptible"]
|
|
13752
14236
|
* ```
|
|
13753
14237
|
*
|
|
14238
|
+
* @stability stable
|
|
13754
14239
|
* @category interruption
|
|
13755
14240
|
* @since 2.0.0
|
|
13756
14241
|
*/
|
|
@@ -13776,6 +14261,7 @@ export declare const interruptibleMask: <A, E, R>(f: (restore: <AX, EX, RX>(effe
|
|
|
13776
14261
|
*
|
|
13777
14262
|
* @see {@link scoped} for binding resource lifetime to a scope
|
|
13778
14263
|
*
|
|
14264
|
+
* @stability stable
|
|
13779
14265
|
* @category interruption
|
|
13780
14266
|
* @since 4.0.0
|
|
13781
14267
|
*/
|
|
@@ -13783,6 +14269,7 @@ export declare const abortSignal: Effect<AbortSignal, never, Scope>;
|
|
|
13783
14269
|
/**
|
|
13784
14270
|
* Type helpers for repeating effects.
|
|
13785
14271
|
*
|
|
14272
|
+
* @stability stable
|
|
13786
14273
|
* @category repetition
|
|
13787
14274
|
* @since 2.0.0
|
|
13788
14275
|
*/
|
|
@@ -13835,6 +14322,7 @@ export declare namespace Repeat {
|
|
|
13835
14322
|
* await Effect.runPromise(program) // => Option.none()
|
|
13836
14323
|
* ```
|
|
13837
14324
|
*
|
|
14325
|
+
* @stability stable
|
|
13838
14326
|
* @category repetition
|
|
13839
14327
|
* @since 2.0.0
|
|
13840
14328
|
*/
|
|
@@ -13922,6 +14410,7 @@ export declare const forever: <Arg extends Effect<any, any, any> | {
|
|
|
13922
14410
|
* @see {@link retry} for failure-based repetition
|
|
13923
14411
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
13924
14412
|
*
|
|
14413
|
+
* @stability stable
|
|
13925
14414
|
* @category repetition
|
|
13926
14415
|
* @since 2.0.0
|
|
13927
14416
|
*/
|
|
@@ -14003,6 +14492,7 @@ export declare const repeat: {
|
|
|
14003
14492
|
* @see {@link retry} for failure-based repetition
|
|
14004
14493
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14005
14494
|
*
|
|
14495
|
+
* @stability stable
|
|
14006
14496
|
* @category repetition
|
|
14007
14497
|
* @since 2.0.0
|
|
14008
14498
|
*/
|
|
@@ -14084,6 +14574,7 @@ export declare const repeat: {
|
|
|
14084
14574
|
* @see {@link retry} for failure-based repetition
|
|
14085
14575
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14086
14576
|
*
|
|
14577
|
+
* @stability stable
|
|
14087
14578
|
* @category repetition
|
|
14088
14579
|
* @since 2.0.0
|
|
14089
14580
|
*/
|
|
@@ -14165,6 +14656,7 @@ export declare const repeat: {
|
|
|
14165
14656
|
* @see {@link retry} for failure-based repetition
|
|
14166
14657
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14167
14658
|
*
|
|
14659
|
+
* @stability stable
|
|
14168
14660
|
* @category repetition
|
|
14169
14661
|
* @since 2.0.0
|
|
14170
14662
|
*/
|
|
@@ -14246,6 +14738,7 @@ export declare const repeat: {
|
|
|
14246
14738
|
* @see {@link retry} for failure-based repetition
|
|
14247
14739
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14248
14740
|
*
|
|
14741
|
+
* @stability stable
|
|
14249
14742
|
* @category repetition
|
|
14250
14743
|
* @since 2.0.0
|
|
14251
14744
|
*/
|
|
@@ -14327,6 +14820,7 @@ export declare const repeat: {
|
|
|
14327
14820
|
* @see {@link retry} for failure-based repetition
|
|
14328
14821
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14329
14822
|
*
|
|
14823
|
+
* @stability stable
|
|
14330
14824
|
* @category repetition
|
|
14331
14825
|
* @since 2.0.0
|
|
14332
14826
|
*/
|
|
@@ -14408,6 +14902,7 @@ export declare const repeat: {
|
|
|
14408
14902
|
* @see {@link retry} for failure-based repetition
|
|
14409
14903
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14410
14904
|
*
|
|
14905
|
+
* @stability stable
|
|
14411
14906
|
* @category repetition
|
|
14412
14907
|
* @since 2.0.0
|
|
14413
14908
|
*/
|
|
@@ -14461,6 +14956,7 @@ export declare const repeat: {
|
|
|
14461
14956
|
* output // => ["Attempt 1 failed", "Final failure: Error 1, after 0 attempts", 0]
|
|
14462
14957
|
* ```
|
|
14463
14958
|
*
|
|
14959
|
+
* @stability stable
|
|
14464
14960
|
* @category repetition
|
|
14465
14961
|
* @since 2.0.0
|
|
14466
14962
|
*/
|
|
@@ -14513,6 +15009,7 @@ export declare const repeatOrElse: {
|
|
|
14513
15009
|
* output // => ["Attempt 1 failed", "Final failure: Error 1, after 0 attempts", 0]
|
|
14514
15010
|
* ```
|
|
14515
15011
|
*
|
|
15012
|
+
* @stability stable
|
|
14516
15013
|
* @category repetition
|
|
14517
15014
|
* @since 2.0.0
|
|
14518
15015
|
*/
|
|
@@ -14565,6 +15062,7 @@ export declare const repeatOrElse: {
|
|
|
14565
15062
|
* output // => ["Attempt 1 failed", "Final failure: Error 1, after 0 attempts", 0]
|
|
14566
15063
|
* ```
|
|
14567
15064
|
*
|
|
15065
|
+
* @stability stable
|
|
14568
15066
|
* @category repetition
|
|
14569
15067
|
* @since 2.0.0
|
|
14570
15068
|
*/
|
|
@@ -14585,6 +15083,7 @@ export declare const repeatOrElse: {
|
|
|
14585
15083
|
* @see {@link all} for running the returned effects and collecting results
|
|
14586
15084
|
* @see {@link replicateEffect} for repeating an effect and collecting results in one step with concurrency and discard options
|
|
14587
15085
|
*
|
|
15086
|
+
* @stability stable
|
|
14588
15087
|
* @category repetition
|
|
14589
15088
|
* @since 2.0.0
|
|
14590
15089
|
*/
|
|
@@ -14604,6 +15103,7 @@ export declare const replicate: {
|
|
|
14604
15103
|
* @see {@link all} for running the returned effects and collecting results
|
|
14605
15104
|
* @see {@link replicateEffect} for repeating an effect and collecting results in one step with concurrency and discard options
|
|
14606
15105
|
*
|
|
15106
|
+
* @stability stable
|
|
14607
15107
|
* @category repetition
|
|
14608
15108
|
* @since 2.0.0
|
|
14609
15109
|
*/
|
|
@@ -14623,6 +15123,7 @@ export declare const replicate: {
|
|
|
14623
15123
|
* @see {@link all} for running the returned effects and collecting results
|
|
14624
15124
|
* @see {@link replicateEffect} for repeating an effect and collecting results in one step with concurrency and discard options
|
|
14625
15125
|
*
|
|
15126
|
+
* @stability stable
|
|
14626
15127
|
* @category repetition
|
|
14627
15128
|
* @since 2.0.0
|
|
14628
15129
|
*/
|
|
@@ -14655,6 +15156,7 @@ export declare const replicate: {
|
|
|
14655
15156
|
* output // => [[1, 1, 1]]
|
|
14656
15157
|
* ```
|
|
14657
15158
|
*
|
|
15159
|
+
* @stability stable
|
|
14658
15160
|
* @category repetition
|
|
14659
15161
|
* @since 2.0.0
|
|
14660
15162
|
*/
|
|
@@ -14686,6 +15188,7 @@ export declare const replicateEffect: {
|
|
|
14686
15188
|
* output // => [[1, 1, 1]]
|
|
14687
15189
|
* ```
|
|
14688
15190
|
*
|
|
15191
|
+
* @stability stable
|
|
14689
15192
|
* @category repetition
|
|
14690
15193
|
* @since 2.0.0
|
|
14691
15194
|
*/
|
|
@@ -14720,6 +15223,7 @@ export declare const replicateEffect: {
|
|
|
14720
15223
|
* output // => [[1, 1, 1]]
|
|
14721
15224
|
* ```
|
|
14722
15225
|
*
|
|
15226
|
+
* @stability stable
|
|
14723
15227
|
* @category repetition
|
|
14724
15228
|
* @since 2.0.0
|
|
14725
15229
|
*/
|
|
@@ -14754,6 +15258,7 @@ export declare const replicateEffect: {
|
|
|
14754
15258
|
* output // => [[1, 1, 1]]
|
|
14755
15259
|
* ```
|
|
14756
15260
|
*
|
|
15261
|
+
* @stability stable
|
|
14757
15262
|
* @category repetition
|
|
14758
15263
|
* @since 2.0.0
|
|
14759
15264
|
*/
|
|
@@ -14788,6 +15293,7 @@ export declare const replicateEffect: {
|
|
|
14788
15293
|
* output // => [[1, 1, 1]]
|
|
14789
15294
|
* ```
|
|
14790
15295
|
*
|
|
15296
|
+
* @stability stable
|
|
14791
15297
|
* @category repetition
|
|
14792
15298
|
* @since 2.0.0
|
|
14793
15299
|
*/
|
|
@@ -14833,6 +15339,7 @@ export declare const replicateEffect: {
|
|
|
14833
15339
|
* @see {@link scheduleFrom} for a variant that allows the schedule's decision
|
|
14834
15340
|
* to depend on the result of this effect.
|
|
14835
15341
|
*
|
|
15342
|
+
* @stability stable
|
|
14836
15343
|
* @category repetition
|
|
14837
15344
|
* @since 2.0.0
|
|
14838
15345
|
*/
|
|
@@ -14874,6 +15381,7 @@ export declare const schedule: {
|
|
|
14874
15381
|
* @see {@link scheduleFrom} for a variant that allows the schedule's decision
|
|
14875
15382
|
* to depend on the result of this effect.
|
|
14876
15383
|
*
|
|
15384
|
+
* @stability stable
|
|
14877
15385
|
* @category repetition
|
|
14878
15386
|
* @since 2.0.0
|
|
14879
15387
|
*/
|
|
@@ -14915,6 +15423,7 @@ export declare const schedule: {
|
|
|
14915
15423
|
* @see {@link scheduleFrom} for a variant that allows the schedule's decision
|
|
14916
15424
|
* to depend on the result of this effect.
|
|
14917
15425
|
*
|
|
15426
|
+
* @stability stable
|
|
14918
15427
|
* @category repetition
|
|
14919
15428
|
* @since 2.0.0
|
|
14920
15429
|
*/
|
|
@@ -14955,6 +15464,7 @@ export declare const schedule: {
|
|
|
14955
15464
|
* output // => ["Processing: 0", "Processing: 0", 2]
|
|
14956
15465
|
* ```
|
|
14957
15466
|
*
|
|
15467
|
+
* @stability stable
|
|
14958
15468
|
* @category repetition
|
|
14959
15469
|
* @since 2.0.0
|
|
14960
15470
|
*/
|
|
@@ -14994,6 +15504,7 @@ export declare const scheduleFrom: {
|
|
|
14994
15504
|
* output // => ["Processing: 0", "Processing: 0", 2]
|
|
14995
15505
|
* ```
|
|
14996
15506
|
*
|
|
15507
|
+
* @stability stable
|
|
14997
15508
|
* @category repetition
|
|
14998
15509
|
* @since 2.0.0
|
|
14999
15510
|
*/
|
|
@@ -15033,6 +15544,7 @@ export declare const scheduleFrom: {
|
|
|
15033
15544
|
* output // => ["Processing: 0", "Processing: 0", 2]
|
|
15034
15545
|
* ```
|
|
15035
15546
|
*
|
|
15547
|
+
* @stability stable
|
|
15036
15548
|
* @category repetition
|
|
15037
15549
|
* @since 2.0.0
|
|
15038
15550
|
*/
|
|
@@ -15054,6 +15566,7 @@ export declare const scheduleFrom: {
|
|
|
15054
15566
|
* Effect.runSync(program) // => "function"
|
|
15055
15567
|
* ```
|
|
15056
15568
|
*
|
|
15569
|
+
* @stability stable
|
|
15057
15570
|
* @category tracing
|
|
15058
15571
|
* @since 2.0.0
|
|
15059
15572
|
*/
|
|
@@ -15074,6 +15587,7 @@ export declare const tracer: Effect<Tracer>;
|
|
|
15074
15587
|
* Effect.runSync(program) // => "completed"
|
|
15075
15588
|
* ```
|
|
15076
15589
|
*
|
|
15590
|
+
* @stability stable
|
|
15077
15591
|
* @category tracing
|
|
15078
15592
|
* @since 2.0.0
|
|
15079
15593
|
*/
|
|
@@ -15094,6 +15608,7 @@ export declare const withTracer: {
|
|
|
15094
15608
|
* Effect.runSync(program) // => "completed"
|
|
15095
15609
|
* ```
|
|
15096
15610
|
*
|
|
15611
|
+
* @stability stable
|
|
15097
15612
|
* @category tracing
|
|
15098
15613
|
* @since 2.0.0
|
|
15099
15614
|
*/
|
|
@@ -15114,6 +15629,7 @@ export declare const withTracer: {
|
|
|
15114
15629
|
* Effect.runSync(program) // => "completed"
|
|
15115
15630
|
* ```
|
|
15116
15631
|
*
|
|
15632
|
+
* @stability stable
|
|
15117
15633
|
* @category tracing
|
|
15118
15634
|
* @since 2.0.0
|
|
15119
15635
|
*/
|
|
@@ -15140,6 +15656,7 @@ export declare const withTracer: {
|
|
|
15140
15656
|
* Effect.runSync(program) // => 42
|
|
15141
15657
|
* ```
|
|
15142
15658
|
*
|
|
15659
|
+
* @stability stable
|
|
15143
15660
|
* @category tracing
|
|
15144
15661
|
* @since 2.0.0
|
|
15145
15662
|
*/
|
|
@@ -15165,6 +15682,7 @@ export declare const withTracerEnabled: {
|
|
|
15165
15682
|
* Effect.runSync(program) // => 42
|
|
15166
15683
|
* ```
|
|
15167
15684
|
*
|
|
15685
|
+
* @stability stable
|
|
15168
15686
|
* @category tracing
|
|
15169
15687
|
* @since 2.0.0
|
|
15170
15688
|
*/
|
|
@@ -15190,6 +15708,7 @@ export declare const withTracerEnabled: {
|
|
|
15190
15708
|
* Effect.runSync(program) // => 42
|
|
15191
15709
|
* ```
|
|
15192
15710
|
*
|
|
15711
|
+
* @stability stable
|
|
15193
15712
|
* @category tracing
|
|
15194
15713
|
* @since 2.0.0
|
|
15195
15714
|
*/
|
|
@@ -15211,6 +15730,7 @@ export declare const withTracerEnabled: {
|
|
|
15211
15730
|
* Effect.runSync(program) // => 42
|
|
15212
15731
|
* ```
|
|
15213
15732
|
*
|
|
15733
|
+
* @stability stable
|
|
15214
15734
|
* @category tracing
|
|
15215
15735
|
* @since 2.0.0
|
|
15216
15736
|
*/
|
|
@@ -15231,6 +15751,7 @@ export declare const withTracerTiming: {
|
|
|
15231
15751
|
* Effect.runSync(program) // => 42
|
|
15232
15752
|
* ```
|
|
15233
15753
|
*
|
|
15754
|
+
* @stability stable
|
|
15234
15755
|
* @category tracing
|
|
15235
15756
|
* @since 2.0.0
|
|
15236
15757
|
*/
|
|
@@ -15251,6 +15772,7 @@ export declare const withTracerTiming: {
|
|
|
15251
15772
|
* Effect.runSync(program) // => 42
|
|
15252
15773
|
* ```
|
|
15253
15774
|
*
|
|
15775
|
+
* @stability stable
|
|
15254
15776
|
* @category tracing
|
|
15255
15777
|
* @since 2.0.0
|
|
15256
15778
|
*/
|
|
@@ -15279,6 +15801,7 @@ export declare const withTracerTiming: {
|
|
|
15279
15801
|
* Effect.runSync(Effect.all([annotated1, annotated2])) // => ['result', 'result']
|
|
15280
15802
|
* ```
|
|
15281
15803
|
*
|
|
15804
|
+
* @stability stable
|
|
15282
15805
|
* @category tracing
|
|
15283
15806
|
* @since 2.0.0
|
|
15284
15807
|
*/
|
|
@@ -15306,6 +15829,7 @@ export declare const annotateSpans: {
|
|
|
15306
15829
|
* Effect.runSync(Effect.all([annotated1, annotated2])) // => ['result', 'result']
|
|
15307
15830
|
* ```
|
|
15308
15831
|
*
|
|
15832
|
+
* @stability stable
|
|
15309
15833
|
* @category tracing
|
|
15310
15834
|
* @since 2.0.0
|
|
15311
15835
|
*/
|
|
@@ -15333,6 +15857,7 @@ export declare const annotateSpans: {
|
|
|
15333
15857
|
* Effect.runSync(Effect.all([annotated1, annotated2])) // => ['result', 'result']
|
|
15334
15858
|
* ```
|
|
15335
15859
|
*
|
|
15860
|
+
* @stability stable
|
|
15336
15861
|
* @category tracing
|
|
15337
15862
|
* @since 2.0.0
|
|
15338
15863
|
*/
|
|
@@ -15360,6 +15885,7 @@ export declare const annotateSpans: {
|
|
|
15360
15885
|
* Effect.runSync(Effect.all([annotated1, annotated2])) // => ['result', 'result']
|
|
15361
15886
|
* ```
|
|
15362
15887
|
*
|
|
15888
|
+
* @stability stable
|
|
15363
15889
|
* @category tracing
|
|
15364
15890
|
* @since 2.0.0
|
|
15365
15891
|
*/
|
|
@@ -15387,6 +15913,7 @@ export declare const annotateSpans: {
|
|
|
15387
15913
|
* Effect.runSync(Effect.all([annotated1, annotated2])) // => ['result', 'result']
|
|
15388
15914
|
* ```
|
|
15389
15915
|
*
|
|
15916
|
+
* @stability stable
|
|
15390
15917
|
* @category tracing
|
|
15391
15918
|
* @since 2.0.0
|
|
15392
15919
|
*/
|
|
@@ -15412,6 +15939,7 @@ export declare const annotateSpans: {
|
|
|
15412
15939
|
* Effect.runSync(traced) // => "success"
|
|
15413
15940
|
* ```
|
|
15414
15941
|
*
|
|
15942
|
+
* @stability stable
|
|
15415
15943
|
* @category tracing
|
|
15416
15944
|
* @since 2.0.0
|
|
15417
15945
|
*/
|
|
@@ -15436,6 +15964,7 @@ export declare const annotateCurrentSpan: {
|
|
|
15436
15964
|
* Effect.runSync(traced) // => "success"
|
|
15437
15965
|
* ```
|
|
15438
15966
|
*
|
|
15967
|
+
* @stability stable
|
|
15439
15968
|
* @category tracing
|
|
15440
15969
|
* @since 2.0.0
|
|
15441
15970
|
*/
|
|
@@ -15460,6 +15989,7 @@ export declare const annotateCurrentSpan: {
|
|
|
15460
15989
|
* Effect.runSync(traced) // => "success"
|
|
15461
15990
|
* ```
|
|
15462
15991
|
*
|
|
15992
|
+
* @stability stable
|
|
15463
15993
|
* @category tracing
|
|
15464
15994
|
* @since 2.0.0
|
|
15465
15995
|
*/
|
|
@@ -15487,6 +16017,7 @@ export declare const annotateCurrentSpan: {
|
|
|
15487
16017
|
* Effect.runSync(traced) // => "my-span"
|
|
15488
16018
|
* ```
|
|
15489
16019
|
*
|
|
16020
|
+
* @stability stable
|
|
15490
16021
|
* @category tracing
|
|
15491
16022
|
* @since 2.0.0
|
|
15492
16023
|
*/
|
|
@@ -15516,6 +16047,7 @@ export declare const currentSpan: Effect<Span, Cause.NoSuchElementError>;
|
|
|
15516
16047
|
* Effect.runSync(traced) // => "Span"
|
|
15517
16048
|
* ```
|
|
15518
16049
|
*
|
|
16050
|
+
* @stability stable
|
|
15519
16051
|
* @category tracing
|
|
15520
16052
|
* @since 2.0.0
|
|
15521
16053
|
*/
|
|
@@ -15541,6 +16073,7 @@ export declare const currentParentSpan: Effect<AnySpan, Cause.NoSuchElementError
|
|
|
15541
16073
|
* Effect.runSync(program) // => { userId: '123', operation: 'data-processing' }
|
|
15542
16074
|
* ```
|
|
15543
16075
|
*
|
|
16076
|
+
* @stability stable
|
|
15544
16077
|
* @category tracing
|
|
15545
16078
|
* @since 2.0.0
|
|
15546
16079
|
*/
|
|
@@ -15567,6 +16100,7 @@ export declare const spanAnnotations: Effect<Readonly<Record<string, unknown>>>;
|
|
|
15567
16100
|
* Effect.runSync(program).length // => 0
|
|
15568
16101
|
* ```
|
|
15569
16102
|
*
|
|
16103
|
+
* @stability stable
|
|
15570
16104
|
* @category tracing
|
|
15571
16105
|
* @since 2.0.0
|
|
15572
16106
|
*/
|
|
@@ -15615,6 +16149,7 @@ export declare const spanLinks: Effect<ReadonlyArray<SpanLink>>;
|
|
|
15615
16149
|
* Effect.runSync(program).length // => 2
|
|
15616
16150
|
* ```
|
|
15617
16151
|
*
|
|
16152
|
+
* @stability stable
|
|
15618
16153
|
* @category tracing
|
|
15619
16154
|
* @since 2.0.0
|
|
15620
16155
|
*/
|
|
@@ -15663,6 +16198,7 @@ export declare const linkSpans: {
|
|
|
15663
16198
|
* Effect.runSync(program).length // => 2
|
|
15664
16199
|
* ```
|
|
15665
16200
|
*
|
|
16201
|
+
* @stability stable
|
|
15666
16202
|
* @category tracing
|
|
15667
16203
|
* @since 2.0.0
|
|
15668
16204
|
*/
|
|
@@ -15711,6 +16247,7 @@ export declare const linkSpans: {
|
|
|
15711
16247
|
* Effect.runSync(program).length // => 2
|
|
15712
16248
|
* ```
|
|
15713
16249
|
*
|
|
16250
|
+
* @stability stable
|
|
15714
16251
|
* @category tracing
|
|
15715
16252
|
* @since 2.0.0
|
|
15716
16253
|
*/
|
|
@@ -15738,6 +16275,7 @@ export declare const linkSpans: {
|
|
|
15738
16275
|
* Effect.runSync(program) // => "my-operation"
|
|
15739
16276
|
* ```
|
|
15740
16277
|
*
|
|
16278
|
+
* @stability stable
|
|
15741
16279
|
* @category tracing
|
|
15742
16280
|
* @since 2.0.0
|
|
15743
16281
|
*/
|
|
@@ -15767,6 +16305,7 @@ export declare const makeSpan: (name: string, options?: SpanOptionsNoTrace) => E
|
|
|
15767
16305
|
* Effect.runSync(program) // => "scoped-operation"
|
|
15768
16306
|
* ```
|
|
15769
16307
|
*
|
|
16308
|
+
* @stability stable
|
|
15770
16309
|
* @category tracing
|
|
15771
16310
|
* @since 2.0.0
|
|
15772
16311
|
*/
|
|
@@ -15792,6 +16331,7 @@ export declare const makeSpanScoped: (name: string, options?: SpanOptionsNoTrace
|
|
|
15792
16331
|
* Effect.runSync(program) // => "user-operation: success"
|
|
15793
16332
|
* ```
|
|
15794
16333
|
*
|
|
16334
|
+
* @stability stable
|
|
15795
16335
|
* @category tracing
|
|
15796
16336
|
* @since 2.0.0
|
|
15797
16337
|
*/
|
|
@@ -15817,6 +16357,7 @@ export declare const useSpan: {
|
|
|
15817
16357
|
* Effect.runSync(program) // => "user-operation: success"
|
|
15818
16358
|
* ```
|
|
15819
16359
|
*
|
|
16360
|
+
* @stability stable
|
|
15820
16361
|
* @category tracing
|
|
15821
16362
|
* @since 2.0.0
|
|
15822
16363
|
*/
|
|
@@ -15842,6 +16383,7 @@ export declare const useSpan: {
|
|
|
15842
16383
|
* Effect.runSync(program) // => "user-operation: success"
|
|
15843
16384
|
* ```
|
|
15844
16385
|
*
|
|
16386
|
+
* @stability stable
|
|
15845
16387
|
* @category tracing
|
|
15846
16388
|
* @since 2.0.0
|
|
15847
16389
|
*/
|
|
@@ -15863,6 +16405,7 @@ export declare const useSpan: {
|
|
|
15863
16405
|
* Effect.runSync(traced) // => "result"
|
|
15864
16406
|
* ```
|
|
15865
16407
|
*
|
|
16408
|
+
* @stability stable
|
|
15866
16409
|
* @category tracing
|
|
15867
16410
|
* @since 2.0.0
|
|
15868
16411
|
*/
|
|
@@ -15883,6 +16426,7 @@ export declare const withSpan: {
|
|
|
15883
16426
|
* Effect.runSync(traced) // => "result"
|
|
15884
16427
|
* ```
|
|
15885
16428
|
*
|
|
16429
|
+
* @stability stable
|
|
15886
16430
|
* @category tracing
|
|
15887
16431
|
* @since 2.0.0
|
|
15888
16432
|
*/
|
|
@@ -15903,6 +16447,7 @@ export declare const withSpan: {
|
|
|
15903
16447
|
* Effect.runSync(traced) // => "result"
|
|
15904
16448
|
* ```
|
|
15905
16449
|
*
|
|
16450
|
+
* @stability stable
|
|
15906
16451
|
* @category tracing
|
|
15907
16452
|
* @since 2.0.0
|
|
15908
16453
|
*/
|
|
@@ -15930,6 +16475,7 @@ export declare const withSpan: {
|
|
|
15930
16475
|
* Effect.runSync(program) // => "completed"
|
|
15931
16476
|
* ```
|
|
15932
16477
|
*
|
|
16478
|
+
* @stability stable
|
|
15933
16479
|
* @category tracing
|
|
15934
16480
|
* @since 2.0.0
|
|
15935
16481
|
*/
|
|
@@ -15956,6 +16502,7 @@ export declare const withSpanScoped: {
|
|
|
15956
16502
|
* Effect.runSync(program) // => "completed"
|
|
15957
16503
|
* ```
|
|
15958
16504
|
*
|
|
16505
|
+
* @stability stable
|
|
15959
16506
|
* @category tracing
|
|
15960
16507
|
* @since 2.0.0
|
|
15961
16508
|
*/
|
|
@@ -15982,6 +16529,7 @@ export declare const withSpanScoped: {
|
|
|
15982
16529
|
* Effect.runSync(program) // => "completed"
|
|
15983
16530
|
* ```
|
|
15984
16531
|
*
|
|
16532
|
+
* @stability stable
|
|
15985
16533
|
* @category tracing
|
|
15986
16534
|
* @since 2.0.0
|
|
15987
16535
|
*/
|
|
@@ -16004,6 +16552,7 @@ export declare const withSpanScoped: {
|
|
|
16004
16552
|
* Effect.runSync(program) // => "completed"
|
|
16005
16553
|
* ```
|
|
16006
16554
|
*
|
|
16555
|
+
* @stability stable
|
|
16007
16556
|
* @category tracing
|
|
16008
16557
|
* @since 2.0.0
|
|
16009
16558
|
*/
|
|
@@ -16025,6 +16574,7 @@ export declare const withParentSpan: {
|
|
|
16025
16574
|
* Effect.runSync(program) // => "completed"
|
|
16026
16575
|
* ```
|
|
16027
16576
|
*
|
|
16577
|
+
* @stability stable
|
|
16028
16578
|
* @category tracing
|
|
16029
16579
|
* @since 2.0.0
|
|
16030
16580
|
*/
|
|
@@ -16046,6 +16596,7 @@ export declare const withParentSpan: {
|
|
|
16046
16596
|
* Effect.runSync(program) // => "completed"
|
|
16047
16597
|
* ```
|
|
16048
16598
|
*
|
|
16599
|
+
* @stability stable
|
|
16049
16600
|
* @category tracing
|
|
16050
16601
|
* @since 2.0.0
|
|
16051
16602
|
*/
|
|
@@ -16089,6 +16640,7 @@ export declare const withParentSpan: {
|
|
|
16089
16640
|
*
|
|
16090
16641
|
* @see {@link requestUnsafe} for the low-level entry point when you already have a `Context` and need to enqueue outside an `Effect`
|
|
16091
16642
|
*
|
|
16643
|
+
* @stability stable
|
|
16092
16644
|
* @category running
|
|
16093
16645
|
* @since 2.0.0
|
|
16094
16646
|
*/
|
|
@@ -16131,6 +16683,7 @@ export declare const request: {
|
|
|
16131
16683
|
*
|
|
16132
16684
|
* @see {@link requestUnsafe} for the low-level entry point when you already have a `Context` and need to enqueue outside an `Effect`
|
|
16133
16685
|
*
|
|
16686
|
+
* @stability stable
|
|
16134
16687
|
* @category running
|
|
16135
16688
|
* @since 2.0.0
|
|
16136
16689
|
*/
|
|
@@ -16173,6 +16726,7 @@ export declare const request: {
|
|
|
16173
16726
|
*
|
|
16174
16727
|
* @see {@link requestUnsafe} for the low-level entry point when you already have a `Context` and need to enqueue outside an `Effect`
|
|
16175
16728
|
*
|
|
16729
|
+
* @stability stable
|
|
16176
16730
|
* @category running
|
|
16177
16731
|
* @since 2.0.0
|
|
16178
16732
|
*/
|
|
@@ -16192,6 +16746,7 @@ export declare const request: {
|
|
|
16192
16746
|
*
|
|
16193
16747
|
* @see {@link request} for the `Effect`-returning API used for normal request execution
|
|
16194
16748
|
*
|
|
16749
|
+
* @stability stable
|
|
16195
16750
|
* @category unsafe
|
|
16196
16751
|
* @since 4.0.0
|
|
16197
16752
|
*/
|
|
@@ -16239,6 +16794,7 @@ export declare const requestUnsafe: <A extends Request.Any>(self: A, options: {
|
|
|
16239
16794
|
* await Effect.runPromise(program) // => "result"
|
|
16240
16795
|
* ```
|
|
16241
16796
|
*
|
|
16797
|
+
* @stability stable
|
|
16242
16798
|
* @category forking
|
|
16243
16799
|
* @since 4.0.0
|
|
16244
16800
|
*/
|
|
@@ -16275,6 +16831,7 @@ export declare const forkChild: <Arg extends Effect<any, any, any> | {
|
|
|
16275
16831
|
* await Effect.runPromise(program) // => "done"
|
|
16276
16832
|
* ```
|
|
16277
16833
|
*
|
|
16834
|
+
* @stability stable
|
|
16278
16835
|
* @category forking
|
|
16279
16836
|
* @since 2.0.0
|
|
16280
16837
|
*/
|
|
@@ -16302,6 +16859,7 @@ export declare const forkIn: {
|
|
|
16302
16859
|
* await Effect.runPromise(program) // => "done"
|
|
16303
16860
|
* ```
|
|
16304
16861
|
*
|
|
16862
|
+
* @stability stable
|
|
16305
16863
|
* @category forking
|
|
16306
16864
|
* @since 2.0.0
|
|
16307
16865
|
*/
|
|
@@ -16332,6 +16890,7 @@ export declare const forkIn: {
|
|
|
16332
16890
|
* await Effect.runPromise(program) // => "done"
|
|
16333
16891
|
* ```
|
|
16334
16892
|
*
|
|
16893
|
+
* @stability stable
|
|
16335
16894
|
* @category forking
|
|
16336
16895
|
* @since 2.0.0
|
|
16337
16896
|
*/
|
|
@@ -16362,6 +16921,7 @@ export declare const forkIn: {
|
|
|
16362
16921
|
* await Effect.runPromise(program) // => "scope completed"
|
|
16363
16922
|
* ```
|
|
16364
16923
|
*
|
|
16924
|
+
* @stability stable
|
|
16365
16925
|
* @category forking
|
|
16366
16926
|
* @since 2.0.0
|
|
16367
16927
|
*/
|
|
@@ -16395,6 +16955,7 @@ export declare const forkScoped: <Arg extends Effect<any, any, any> | {
|
|
|
16395
16955
|
* await Effect.runPromise(program) // => "daemon result"
|
|
16396
16956
|
* ```
|
|
16397
16957
|
*
|
|
16958
|
+
* @stability stable
|
|
16398
16959
|
* @category forking
|
|
16399
16960
|
* @since 4.0.0
|
|
16400
16961
|
*/
|
|
@@ -16431,6 +16992,7 @@ export declare const forkDetach: <Arg extends Effect<any, any, any> | {
|
|
|
16431
16992
|
* @see {@link forkIn} for forking into an explicit scope
|
|
16432
16993
|
* @see {@link forkScoped} for forking fibers tied to the current scope
|
|
16433
16994
|
*
|
|
16995
|
+
* @stability stable
|
|
16434
16996
|
* @category forking
|
|
16435
16997
|
* @since 2.0.0
|
|
16436
16998
|
*/
|
|
@@ -16453,6 +17015,7 @@ export declare const awaitAllChildren: <A, E, R>(self: Effect<A, E, R>) => Effec
|
|
|
16453
17015
|
* output // => ["number"]
|
|
16454
17016
|
* ```
|
|
16455
17017
|
*
|
|
17018
|
+
* @stability stable
|
|
16456
17019
|
* @category accessors
|
|
16457
17020
|
* @since 4.0.0
|
|
16458
17021
|
*/
|
|
@@ -16469,6 +17032,7 @@ export declare const fiber: Effect<Fiber<unknown, unknown>>;
|
|
|
16469
17032
|
* Effect.runSync(program) // => "number"
|
|
16470
17033
|
* ```
|
|
16471
17034
|
*
|
|
17035
|
+
* @stability stable
|
|
16472
17036
|
* @category accessors
|
|
16473
17037
|
* @since 2.0.0
|
|
16474
17038
|
*/
|
|
@@ -16493,6 +17057,7 @@ export declare const fiberId: Effect<number>;
|
|
|
16493
17057
|
* @see {@link runPromise} for promise-based running with these options
|
|
16494
17058
|
* @see {@link runPromiseExit} for promise-based running that returns an `Exit`
|
|
16495
17059
|
*
|
|
17060
|
+
* @stability stable
|
|
16496
17061
|
* @category running
|
|
16497
17062
|
* @since 4.0.0
|
|
16498
17063
|
*/
|
|
@@ -16528,6 +17093,7 @@ export interface RunOptions {
|
|
|
16528
17093
|
* output // => ["running...", "done"]
|
|
16529
17094
|
* ```
|
|
16530
17095
|
*
|
|
17096
|
+
* @stability stable
|
|
16531
17097
|
* @category running
|
|
16532
17098
|
* @since 2.0.0
|
|
16533
17099
|
*/
|
|
@@ -16567,6 +17133,7 @@ export declare const runFork: <A, E>(effect: Effect<A, E, never>, options?: RunO
|
|
|
16567
17133
|
* output // => ["Hello from service!", "done"]
|
|
16568
17134
|
* ```
|
|
16569
17135
|
*
|
|
17136
|
+
* @stability stable
|
|
16570
17137
|
* @category running
|
|
16571
17138
|
* @since 4.0.0
|
|
16572
17139
|
*/
|
|
@@ -16616,6 +17183,7 @@ export declare const runForkWith: <R>(context: Context.Context<R>) => <A, E>(eff
|
|
|
16616
17183
|
* output // => ["Started", "Success"]
|
|
16617
17184
|
* ```
|
|
16618
17185
|
*
|
|
17186
|
+
* @stability stable
|
|
16619
17187
|
* @category running
|
|
16620
17188
|
* @since 4.0.0
|
|
16621
17189
|
*/
|
|
@@ -16659,6 +17227,7 @@ export declare const runCallbackWith: <R>(context: Context.Context<R>) => <A, E>
|
|
|
16659
17227
|
* output // => ["working", "success: done"]
|
|
16660
17228
|
* ```
|
|
16661
17229
|
*
|
|
17230
|
+
* @stability stable
|
|
16662
17231
|
* @category running
|
|
16663
17232
|
* @since 2.0.0
|
|
16664
17233
|
*/
|
|
@@ -16699,6 +17268,7 @@ export declare const runCallback: <A, E>(effect: Effect<A, E, never>, options?:
|
|
|
16699
17268
|
* ```
|
|
16700
17269
|
*
|
|
16701
17270
|
* @see {@link runPromiseExit} for a version that returns an `Exit` type instead of rejecting.
|
|
17271
|
+
* @stability stable
|
|
16702
17272
|
* @category running
|
|
16703
17273
|
* @since 2.0.0
|
|
16704
17274
|
*/
|
|
@@ -16734,6 +17304,7 @@ export declare const runPromise: <A, E>(effect: Effect<A, E>, options?: RunOptio
|
|
|
16734
17304
|
* await Effect.runPromiseWith(context)(program) // => "Connecting to https://api.example.com"
|
|
16735
17305
|
* ```
|
|
16736
17306
|
*
|
|
17307
|
+
* @stability stable
|
|
16737
17308
|
* @category running
|
|
16738
17309
|
* @since 4.0.0
|
|
16739
17310
|
*/
|
|
@@ -16767,6 +17338,7 @@ export declare const runPromiseWith: <R>(context: Context.Context<R>) => <A, E>(
|
|
|
16767
17338
|
*
|
|
16768
17339
|
* @see {@link runPromise} for a version that rejects on failure.
|
|
16769
17340
|
*
|
|
17341
|
+
* @stability stable
|
|
16770
17342
|
* @category running
|
|
16771
17343
|
* @since 2.0.0
|
|
16772
17344
|
*/
|
|
@@ -16807,6 +17379,7 @@ export declare const runPromiseExit: <A, E>(effect: Effect<A, E>, options?: RunO
|
|
|
16807
17379
|
* output // => ["Success: Result for: SELECT * FROM users"]
|
|
16808
17380
|
* ```
|
|
16809
17381
|
*
|
|
17382
|
+
* @stability stable
|
|
16810
17383
|
* @category running
|
|
16811
17384
|
* @since 4.0.0
|
|
16812
17385
|
*/
|
|
@@ -16864,6 +17437,7 @@ export declare const runPromiseExitWith: <R>(context: Context.Context<R>) => <A,
|
|
|
16864
17437
|
*
|
|
16865
17438
|
* @see {@link runSyncExit} for a version that returns an `Exit` type instead of
|
|
16866
17439
|
* throwing an error.
|
|
17440
|
+
* @stability stable
|
|
16867
17441
|
* @category running
|
|
16868
17442
|
* @since 2.0.0
|
|
16869
17443
|
*/
|
|
@@ -16900,6 +17474,7 @@ export declare const runSync: <A, E>(effect: Effect<A, E>) => A;
|
|
|
16900
17474
|
* result // => 5
|
|
16901
17475
|
* ```
|
|
16902
17476
|
*
|
|
17477
|
+
* @stability stable
|
|
16903
17478
|
* @category running
|
|
16904
17479
|
* @since 4.0.0
|
|
16905
17480
|
*/
|
|
@@ -16948,6 +17523,7 @@ export declare const runSyncWith: <R>(context: Context.Context<R>) => <A, E>(eff
|
|
|
16948
17523
|
*
|
|
16949
17524
|
* @see {@link runSync} for a version that throws on failure.
|
|
16950
17525
|
*
|
|
17526
|
+
* @stability stable
|
|
16951
17527
|
* @category running
|
|
16952
17528
|
* @since 2.0.0
|
|
16953
17529
|
*/
|
|
@@ -16992,6 +17568,7 @@ export declare const runSyncExit: <A, E>(effect: Effect<A, E>) => Exit.Exit<A, E
|
|
|
16992
17568
|
* output // => ["[LOG] Computing result...", "Success: 42"]
|
|
16993
17569
|
* ```
|
|
16994
17570
|
*
|
|
17571
|
+
* @stability stable
|
|
16995
17572
|
* @category running
|
|
16996
17573
|
* @since 4.0.0
|
|
16997
17574
|
*/
|
|
@@ -17003,6 +17580,7 @@ export declare const runSyncExitWith: <R>(context: Context.Context<R>) => <A, E>
|
|
|
17003
17580
|
*
|
|
17004
17581
|
* Use these to describe generator-based signatures and traced or untraced variants.
|
|
17005
17582
|
*
|
|
17583
|
+
* @stability stable
|
|
17006
17584
|
* @category constructors
|
|
17007
17585
|
* @since 3.11.0
|
|
17008
17586
|
*/
|
|
@@ -17728,6 +18306,7 @@ export declare namespace fn {
|
|
|
17728
18306
|
* Effect.runSync(program) // => "hello"
|
|
17729
18307
|
* ```
|
|
17730
18308
|
*
|
|
18309
|
+
* @stability stable
|
|
17731
18310
|
* @category constructors
|
|
17732
18311
|
* @since 3.12.0
|
|
17733
18312
|
*/
|
|
@@ -17851,6 +18430,7 @@ export declare const fnUntraced: fn.Untraced;
|
|
|
17851
18430
|
* Effect.runSync(program) // => "hello"
|
|
17852
18431
|
* ```
|
|
17853
18432
|
*
|
|
18433
|
+
* @stability stable
|
|
17854
18434
|
* @category constructors
|
|
17855
18435
|
* @since 3.11.0
|
|
17856
18436
|
*/
|
|
@@ -17875,6 +18455,7 @@ export declare const fn: fn.Traced & {
|
|
|
17875
18455
|
* Effect.runSync(program) // => "Clock is available"
|
|
17876
18456
|
* ```
|
|
17877
18457
|
*
|
|
18458
|
+
* @stability stable
|
|
17878
18459
|
* @category accessors
|
|
17879
18460
|
* @since 2.0.0
|
|
17880
18461
|
*/
|
|
@@ -17909,6 +18490,7 @@ export declare const clockWith: <A, E, R>(f: (clock: Clock) => Effect<A, E, R>)
|
|
|
17909
18490
|
* output // => ["Warn: Cache miss"]
|
|
17910
18491
|
* ```
|
|
17911
18492
|
*
|
|
18493
|
+
* @stability stable
|
|
17912
18494
|
* @category logging
|
|
17913
18495
|
* @since 2.0.0
|
|
17914
18496
|
*/
|
|
@@ -17936,6 +18518,7 @@ export declare const logWithLevel: (level?: Severity) => (...message: ReadonlyAr
|
|
|
17936
18518
|
* output // => ["Info: Result: 4", 4]
|
|
17937
18519
|
* ```
|
|
17938
18520
|
*
|
|
18521
|
+
* @stability stable
|
|
17939
18522
|
* @category logging
|
|
17940
18523
|
* @since 2.0.0
|
|
17941
18524
|
*/
|
|
@@ -17961,6 +18544,7 @@ export declare const log: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
17961
18544
|
* output // => ["Fatal: Critical system failure"]
|
|
17962
18545
|
* ```
|
|
17963
18546
|
*
|
|
18547
|
+
* @stability stable
|
|
17964
18548
|
* @category logging
|
|
17965
18549
|
* @since 2.0.0
|
|
17966
18550
|
*/
|
|
@@ -17985,6 +18569,7 @@ export declare const logFatal: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
17985
18569
|
* output // => ["Warn: API rate limit approaching"]
|
|
17986
18570
|
* ```
|
|
17987
18571
|
*
|
|
18572
|
+
* @stability stable
|
|
17988
18573
|
* @category logging
|
|
17989
18574
|
* @since 2.0.0
|
|
17990
18575
|
*/
|
|
@@ -18009,6 +18594,7 @@ export declare const logWarning: (...message: ReadonlyArray<any>) => Effect<void
|
|
|
18009
18594
|
* output // => ["Error: Database connection failed"]
|
|
18010
18595
|
* ```
|
|
18011
18596
|
*
|
|
18597
|
+
* @stability stable
|
|
18012
18598
|
* @category logging
|
|
18013
18599
|
* @since 2.0.0
|
|
18014
18600
|
*/
|
|
@@ -18033,6 +18619,7 @@ export declare const logError: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
18033
18619
|
* output // => ["Info: Application starting up"]
|
|
18034
18620
|
* ```
|
|
18035
18621
|
*
|
|
18622
|
+
* @stability stable
|
|
18036
18623
|
* @category logging
|
|
18037
18624
|
* @since 2.0.0
|
|
18038
18625
|
*/
|
|
@@ -18061,6 +18648,7 @@ export declare const logInfo: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
18061
18648
|
* output // => ["Debug: Debug mode enabled"]
|
|
18062
18649
|
* ```
|
|
18063
18650
|
*
|
|
18651
|
+
* @stability stable
|
|
18064
18652
|
* @category logging
|
|
18065
18653
|
* @since 2.0.0
|
|
18066
18654
|
*/
|
|
@@ -18089,6 +18677,7 @@ export declare const logDebug: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
18089
18677
|
* output // => ["Trace: Entering function processData"]
|
|
18090
18678
|
* ```
|
|
18091
18679
|
*
|
|
18680
|
+
* @stability stable
|
|
18092
18681
|
* @category logging
|
|
18093
18682
|
* @since 2.0.0
|
|
18094
18683
|
*/
|
|
@@ -18119,6 +18708,7 @@ export declare const logTrace: (...message: ReadonlyArray<any>) => Effect<void>;
|
|
|
18119
18708
|
* output // => ["[CUSTOM]: This will go to both default and custom logger"]
|
|
18120
18709
|
* ```
|
|
18121
18710
|
*
|
|
18711
|
+
* @stability stable
|
|
18122
18712
|
* @category logging
|
|
18123
18713
|
* @since 4.0.0
|
|
18124
18714
|
*/
|
|
@@ -18149,6 +18739,7 @@ export declare const withLogger: {
|
|
|
18149
18739
|
* output // => ["[CUSTOM]: This will go to both default and custom logger"]
|
|
18150
18740
|
* ```
|
|
18151
18741
|
*
|
|
18742
|
+
* @stability stable
|
|
18152
18743
|
* @category logging
|
|
18153
18744
|
* @since 4.0.0
|
|
18154
18745
|
*/
|
|
@@ -18179,6 +18770,7 @@ export declare const withLogger: {
|
|
|
18179
18770
|
* output // => ["[CUSTOM]: This will go to both default and custom logger"]
|
|
18180
18771
|
* ```
|
|
18181
18772
|
*
|
|
18773
|
+
* @stability stable
|
|
18182
18774
|
* @category logging
|
|
18183
18775
|
* @since 4.0.0
|
|
18184
18776
|
*/
|
|
@@ -18216,6 +18808,7 @@ export declare const withLogger: {
|
|
|
18216
18808
|
* output // => ["Starting operation", "Starting operation"]
|
|
18217
18809
|
* ```
|
|
18218
18810
|
*
|
|
18811
|
+
* @stability stable
|
|
18219
18812
|
* @category logging
|
|
18220
18813
|
* @since 2.0.0
|
|
18221
18814
|
*/
|
|
@@ -18252,6 +18845,7 @@ export declare const annotateLogs: {
|
|
|
18252
18845
|
* output // => ["Starting operation", "Starting operation"]
|
|
18253
18846
|
* ```
|
|
18254
18847
|
*
|
|
18848
|
+
* @stability stable
|
|
18255
18849
|
* @category logging
|
|
18256
18850
|
* @since 2.0.0
|
|
18257
18851
|
*/
|
|
@@ -18288,6 +18882,7 @@ export declare const annotateLogs: {
|
|
|
18288
18882
|
* output // => ["Starting operation", "Starting operation"]
|
|
18289
18883
|
* ```
|
|
18290
18884
|
*
|
|
18885
|
+
* @stability stable
|
|
18291
18886
|
* @category logging
|
|
18292
18887
|
* @since 2.0.0
|
|
18293
18888
|
*/
|
|
@@ -18324,6 +18919,7 @@ export declare const annotateLogs: {
|
|
|
18324
18919
|
* output // => ["Starting operation", "Starting operation"]
|
|
18325
18920
|
* ```
|
|
18326
18921
|
*
|
|
18922
|
+
* @stability stable
|
|
18327
18923
|
* @category logging
|
|
18328
18924
|
* @since 2.0.0
|
|
18329
18925
|
*/
|
|
@@ -18360,6 +18956,7 @@ export declare const annotateLogs: {
|
|
|
18360
18956
|
* output // => ["Starting operation", "Starting operation"]
|
|
18361
18957
|
* ```
|
|
18362
18958
|
*
|
|
18959
|
+
* @stability stable
|
|
18363
18960
|
* @category logging
|
|
18364
18961
|
* @since 2.0.0
|
|
18365
18962
|
*/
|
|
@@ -18401,6 +18998,7 @@ export declare const annotateLogs: {
|
|
|
18401
18998
|
*
|
|
18402
18999
|
* @see {@link annotateLogs} for annotating one effect
|
|
18403
19000
|
*
|
|
19001
|
+
* @stability stable
|
|
18404
19002
|
* @category logging
|
|
18405
19003
|
* @since 3.1.0
|
|
18406
19004
|
*/
|
|
@@ -18441,6 +19039,7 @@ export declare const annotateLogsScoped: {
|
|
|
18441
19039
|
*
|
|
18442
19040
|
* @see {@link annotateLogs} for annotating one effect
|
|
18443
19041
|
*
|
|
19042
|
+
* @stability stable
|
|
18444
19043
|
* @category logging
|
|
18445
19044
|
* @since 3.1.0
|
|
18446
19045
|
*/
|
|
@@ -18481,6 +19080,7 @@ export declare const annotateLogsScoped: {
|
|
|
18481
19080
|
*
|
|
18482
19081
|
* @see {@link annotateLogs} for annotating one effect
|
|
18483
19082
|
*
|
|
19083
|
+
* @stability stable
|
|
18484
19084
|
* @category logging
|
|
18485
19085
|
* @since 3.1.0
|
|
18486
19086
|
*/
|
|
@@ -18518,6 +19118,7 @@ export declare const annotateLogsScoped: {
|
|
|
18518
19118
|
* output // => ["Making HTTP request", "Connecting to database", "Executing query", "Processing results", "Sending response", "data"]
|
|
18519
19119
|
* ```
|
|
18520
19120
|
*
|
|
19121
|
+
* @stability stable
|
|
18521
19122
|
* @category logging
|
|
18522
19123
|
* @since 2.0.0
|
|
18523
19124
|
*/
|
|
@@ -18554,6 +19155,7 @@ export declare const withLogSpan: {
|
|
|
18554
19155
|
* output // => ["Making HTTP request", "Connecting to database", "Executing query", "Processing results", "Sending response", "data"]
|
|
18555
19156
|
* ```
|
|
18556
19157
|
*
|
|
19158
|
+
* @stability stable
|
|
18557
19159
|
* @category logging
|
|
18558
19160
|
* @since 2.0.0
|
|
18559
19161
|
*/
|
|
@@ -18590,6 +19192,7 @@ export declare const withLogSpan: {
|
|
|
18590
19192
|
* output // => ["Making HTTP request", "Connecting to database", "Executing query", "Processing results", "Sending response", "data"]
|
|
18591
19193
|
* ```
|
|
18592
19194
|
*
|
|
19195
|
+
* @stability stable
|
|
18593
19196
|
* @category logging
|
|
18594
19197
|
* @since 2.0.0
|
|
18595
19198
|
*/
|
|
@@ -18638,6 +19241,7 @@ export declare const withLogSpan: {
|
|
|
18638
19241
|
* Effect.runSync(Metric.value(exitTracker)).occurrences.get("success") // => 1
|
|
18639
19242
|
* ```
|
|
18640
19243
|
*
|
|
19244
|
+
* @stability stable
|
|
18641
19245
|
* @category metrics
|
|
18642
19246
|
* @since 4.0.0
|
|
18643
19247
|
*/
|
|
@@ -18685,6 +19289,7 @@ export declare const track: {
|
|
|
18685
19289
|
* Effect.runSync(Metric.value(exitTracker)).occurrences.get("success") // => 1
|
|
18686
19290
|
* ```
|
|
18687
19291
|
*
|
|
19292
|
+
* @stability stable
|
|
18688
19293
|
* @category metrics
|
|
18689
19294
|
* @since 4.0.0
|
|
18690
19295
|
*/
|
|
@@ -18732,6 +19337,7 @@ export declare const track: {
|
|
|
18732
19337
|
* Effect.runSync(Metric.value(exitTracker)).occurrences.get("success") // => 1
|
|
18733
19338
|
* ```
|
|
18734
19339
|
*
|
|
19340
|
+
* @stability stable
|
|
18735
19341
|
* @category metrics
|
|
18736
19342
|
* @since 4.0.0
|
|
18737
19343
|
*/
|
|
@@ -18779,6 +19385,7 @@ export declare const track: {
|
|
|
18779
19385
|
* Effect.runSync(Metric.value(exitTracker)).occurrences.get("success") // => 1
|
|
18780
19386
|
* ```
|
|
18781
19387
|
*
|
|
19388
|
+
* @stability stable
|
|
18782
19389
|
* @category metrics
|
|
18783
19390
|
* @since 4.0.0
|
|
18784
19391
|
*/
|
|
@@ -18826,6 +19433,7 @@ export declare const track: {
|
|
|
18826
19433
|
* Effect.runSync(Metric.value(exitTracker)).occurrences.get("success") // => 1
|
|
18827
19434
|
* ```
|
|
18828
19435
|
*
|
|
19436
|
+
* @stability stable
|
|
18829
19437
|
* @category metrics
|
|
18830
19438
|
* @since 4.0.0
|
|
18831
19439
|
*/
|
|
@@ -18873,6 +19481,7 @@ export declare const track: {
|
|
|
18873
19481
|
* Effect.runSync(Metric.value(requestSizeGauge)).value // => 12
|
|
18874
19482
|
* ```
|
|
18875
19483
|
*
|
|
19484
|
+
* @stability stable
|
|
18876
19485
|
* @category metrics
|
|
18877
19486
|
* @since 4.0.0
|
|
18878
19487
|
*/
|
|
@@ -18919,6 +19528,7 @@ export declare const trackSuccesses: {
|
|
|
18919
19528
|
* Effect.runSync(Metric.value(requestSizeGauge)).value // => 12
|
|
18920
19529
|
* ```
|
|
18921
19530
|
*
|
|
19531
|
+
* @stability stable
|
|
18922
19532
|
* @category metrics
|
|
18923
19533
|
* @since 4.0.0
|
|
18924
19534
|
*/
|
|
@@ -18965,6 +19575,7 @@ export declare const trackSuccesses: {
|
|
|
18965
19575
|
* Effect.runSync(Metric.value(requestSizeGauge)).value // => 12
|
|
18966
19576
|
* ```
|
|
18967
19577
|
*
|
|
19578
|
+
* @stability stable
|
|
18968
19579
|
* @category metrics
|
|
18969
19580
|
* @since 4.0.0
|
|
18970
19581
|
*/
|
|
@@ -19011,6 +19622,7 @@ export declare const trackSuccesses: {
|
|
|
19011
19622
|
* Effect.runSync(Metric.value(requestSizeGauge)).value // => 12
|
|
19012
19623
|
* ```
|
|
19013
19624
|
*
|
|
19625
|
+
* @stability stable
|
|
19014
19626
|
* @category metrics
|
|
19015
19627
|
* @since 4.0.0
|
|
19016
19628
|
*/
|
|
@@ -19057,6 +19669,7 @@ export declare const trackSuccesses: {
|
|
|
19057
19669
|
* Effect.runSync(Metric.value(requestSizeGauge)).value // => 12
|
|
19058
19670
|
* ```
|
|
19059
19671
|
*
|
|
19672
|
+
* @stability stable
|
|
19060
19673
|
* @category metrics
|
|
19061
19674
|
* @since 4.0.0
|
|
19062
19675
|
*/
|
|
@@ -19106,6 +19719,7 @@ export declare const trackSuccesses: {
|
|
|
19106
19719
|
* Effect.runSync(Metric.value(errorTypeFrequency)).occurrences.get("ConnectionFailedError") // => 1
|
|
19107
19720
|
* ```
|
|
19108
19721
|
*
|
|
19722
|
+
* @stability stable
|
|
19109
19723
|
* @category metrics
|
|
19110
19724
|
* @since 4.0.0
|
|
19111
19725
|
*/
|
|
@@ -19154,6 +19768,7 @@ export declare const trackErrors: {
|
|
|
19154
19768
|
* Effect.runSync(Metric.value(errorTypeFrequency)).occurrences.get("ConnectionFailedError") // => 1
|
|
19155
19769
|
* ```
|
|
19156
19770
|
*
|
|
19771
|
+
* @stability stable
|
|
19157
19772
|
* @category metrics
|
|
19158
19773
|
* @since 4.0.0
|
|
19159
19774
|
*/
|
|
@@ -19202,6 +19817,7 @@ export declare const trackErrors: {
|
|
|
19202
19817
|
* Effect.runSync(Metric.value(errorTypeFrequency)).occurrences.get("ConnectionFailedError") // => 1
|
|
19203
19818
|
* ```
|
|
19204
19819
|
*
|
|
19820
|
+
* @stability stable
|
|
19205
19821
|
* @category metrics
|
|
19206
19822
|
* @since 4.0.0
|
|
19207
19823
|
*/
|
|
@@ -19250,6 +19866,7 @@ export declare const trackErrors: {
|
|
|
19250
19866
|
* Effect.runSync(Metric.value(errorTypeFrequency)).occurrences.get("ConnectionFailedError") // => 1
|
|
19251
19867
|
* ```
|
|
19252
19868
|
*
|
|
19869
|
+
* @stability stable
|
|
19253
19870
|
* @category metrics
|
|
19254
19871
|
* @since 4.0.0
|
|
19255
19872
|
*/
|
|
@@ -19298,6 +19915,7 @@ export declare const trackErrors: {
|
|
|
19298
19915
|
* Effect.runSync(Metric.value(errorTypeFrequency)).occurrences.get("ConnectionFailedError") // => 1
|
|
19299
19916
|
* ```
|
|
19300
19917
|
*
|
|
19918
|
+
* @stability stable
|
|
19301
19919
|
* @category metrics
|
|
19302
19920
|
* @since 4.0.0
|
|
19303
19921
|
*/
|
|
@@ -19348,6 +19966,7 @@ export declare const trackErrors: {
|
|
|
19348
19966
|
* Effect.runSync(Metric.value(defectTypeFrequency)).occurrences.get("Error") // => 1
|
|
19349
19967
|
* ```
|
|
19350
19968
|
*
|
|
19969
|
+
* @stability stable
|
|
19351
19970
|
* @category metrics
|
|
19352
19971
|
* @since 4.0.0
|
|
19353
19972
|
*/
|
|
@@ -19397,6 +20016,7 @@ export declare const trackDefects: {
|
|
|
19397
20016
|
* Effect.runSync(Metric.value(defectTypeFrequency)).occurrences.get("Error") // => 1
|
|
19398
20017
|
* ```
|
|
19399
20018
|
*
|
|
20019
|
+
* @stability stable
|
|
19400
20020
|
* @category metrics
|
|
19401
20021
|
* @since 4.0.0
|
|
19402
20022
|
*/
|
|
@@ -19446,6 +20066,7 @@ export declare const trackDefects: {
|
|
|
19446
20066
|
* Effect.runSync(Metric.value(defectTypeFrequency)).occurrences.get("Error") // => 1
|
|
19447
20067
|
* ```
|
|
19448
20068
|
*
|
|
20069
|
+
* @stability stable
|
|
19449
20070
|
* @category metrics
|
|
19450
20071
|
* @since 4.0.0
|
|
19451
20072
|
*/
|
|
@@ -19495,6 +20116,7 @@ export declare const trackDefects: {
|
|
|
19495
20116
|
* Effect.runSync(Metric.value(defectTypeFrequency)).occurrences.get("Error") // => 1
|
|
19496
20117
|
* ```
|
|
19497
20118
|
*
|
|
20119
|
+
* @stability stable
|
|
19498
20120
|
* @category metrics
|
|
19499
20121
|
* @since 4.0.0
|
|
19500
20122
|
*/
|
|
@@ -19544,6 +20166,7 @@ export declare const trackDefects: {
|
|
|
19544
20166
|
* Effect.runSync(Metric.value(defectTypeFrequency)).occurrences.get("Error") // => 1
|
|
19545
20167
|
* ```
|
|
19546
20168
|
*
|
|
20169
|
+
* @stability stable
|
|
19547
20170
|
* @category metrics
|
|
19548
20171
|
* @since 4.0.0
|
|
19549
20172
|
*/
|
|
@@ -19590,6 +20213,7 @@ export declare const trackDefects: {
|
|
|
19590
20213
|
* Effect.runSync(Metric.value(durationGauge)).value // => 1
|
|
19591
20214
|
* ```
|
|
19592
20215
|
*
|
|
20216
|
+
* @stability stable
|
|
19593
20217
|
* @category metrics
|
|
19594
20218
|
* @since 4.0.0
|
|
19595
20219
|
*/
|
|
@@ -19635,6 +20259,7 @@ export declare const trackDuration: {
|
|
|
19635
20259
|
* Effect.runSync(Metric.value(durationGauge)).value // => 1
|
|
19636
20260
|
* ```
|
|
19637
20261
|
*
|
|
20262
|
+
* @stability stable
|
|
19638
20263
|
* @category metrics
|
|
19639
20264
|
* @since 4.0.0
|
|
19640
20265
|
*/
|
|
@@ -19680,6 +20305,7 @@ export declare const trackDuration: {
|
|
|
19680
20305
|
* Effect.runSync(Metric.value(durationGauge)).value // => 1
|
|
19681
20306
|
* ```
|
|
19682
20307
|
*
|
|
20308
|
+
* @stability stable
|
|
19683
20309
|
* @category metrics
|
|
19684
20310
|
* @since 4.0.0
|
|
19685
20311
|
*/
|
|
@@ -19725,6 +20351,7 @@ export declare const trackDuration: {
|
|
|
19725
20351
|
* Effect.runSync(Metric.value(durationGauge)).value // => 1
|
|
19726
20352
|
* ```
|
|
19727
20353
|
*
|
|
20354
|
+
* @stability stable
|
|
19728
20355
|
* @category metrics
|
|
19729
20356
|
* @since 4.0.0
|
|
19730
20357
|
*/
|
|
@@ -19770,6 +20397,7 @@ export declare const trackDuration: {
|
|
|
19770
20397
|
* Effect.runSync(Metric.value(durationGauge)).value // => 1
|
|
19771
20398
|
* ```
|
|
19772
20399
|
*
|
|
20400
|
+
* @stability stable
|
|
19773
20401
|
* @category metrics
|
|
19774
20402
|
* @since 4.0.0
|
|
19775
20403
|
*/
|
|
@@ -19810,6 +20438,7 @@ declare const Transaction_base: Context.ServiceClass<Transaction, "effect/Effect
|
|
|
19810
20438
|
* Effect.runSync(runnable) // => "Transaction complete"
|
|
19811
20439
|
* ```
|
|
19812
20440
|
*
|
|
20441
|
+
* @stability stable
|
|
19813
20442
|
* @category transactions
|
|
19814
20443
|
* @since 4.0.0
|
|
19815
20444
|
*/
|
|
@@ -19858,6 +20487,7 @@ export declare class Transaction extends Transaction_base {
|
|
|
19858
20487
|
* output // => ["Transaction sum: 30", "Final ref1: 10", "Final ref2: 20"]
|
|
19859
20488
|
* ```
|
|
19860
20489
|
*
|
|
20490
|
+
* @stability stable
|
|
19861
20491
|
* @category transactions
|
|
19862
20492
|
* @since 4.0.0
|
|
19863
20493
|
*/
|
|
@@ -19895,6 +20525,7 @@ export declare const tx: <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, Excl
|
|
|
19895
20525
|
* await Effect.runPromise(program) // => 1
|
|
19896
20526
|
* ```
|
|
19897
20527
|
*
|
|
20528
|
+
* @stability stable
|
|
19898
20529
|
* @category transactions
|
|
19899
20530
|
* @since 4.0.0
|
|
19900
20531
|
*/
|
|
@@ -19902,6 +20533,7 @@ export declare const txRetry: Effect<never, never, Transaction>;
|
|
|
19902
20533
|
/**
|
|
19903
20534
|
* Type helpers for converting callback-based functions into `Effect` functions.
|
|
19904
20535
|
*
|
|
20536
|
+
* @stability stable
|
|
19905
20537
|
* @category converting
|
|
19906
20538
|
* @since 4.0.0
|
|
19907
20539
|
*/
|
|
@@ -20171,6 +20803,7 @@ type EffectifyArgs<F extends (...args: Array<any>) => any> = Parameters<F> exten
|
|
|
20171
20803
|
* error.message // => "Failed to process hello: unavailable"
|
|
20172
20804
|
* ```
|
|
20173
20805
|
*
|
|
20806
|
+
* @stability stable
|
|
20174
20807
|
* @category converting
|
|
20175
20808
|
* @since 4.0.0
|
|
20176
20809
|
*/
|
|
@@ -20224,6 +20857,7 @@ export declare const effectify: {
|
|
|
20224
20857
|
* error.message // => "Failed to process hello: unavailable"
|
|
20225
20858
|
* ```
|
|
20226
20859
|
*
|
|
20860
|
+
* @stability stable
|
|
20227
20861
|
* @category converting
|
|
20228
20862
|
* @since 4.0.0
|
|
20229
20863
|
*/
|
|
@@ -20277,6 +20911,7 @@ export declare const effectify: {
|
|
|
20277
20911
|
* error.message // => "Failed to process hello: unavailable"
|
|
20278
20912
|
* ```
|
|
20279
20913
|
*
|
|
20914
|
+
* @stability stable
|
|
20280
20915
|
* @category converting
|
|
20281
20916
|
* @since 4.0.0
|
|
20282
20917
|
*/
|
|
@@ -20330,6 +20965,7 @@ export declare const effectify: {
|
|
|
20330
20965
|
* error.message // => "Failed to process hello: unavailable"
|
|
20331
20966
|
* ```
|
|
20332
20967
|
*
|
|
20968
|
+
* @stability stable
|
|
20333
20969
|
* @category converting
|
|
20334
20970
|
* @since 4.0.0
|
|
20335
20971
|
*/
|
|
@@ -20361,6 +20997,7 @@ export declare const effectify: {
|
|
|
20361
20997
|
* // Type 'string' is not assignable to type 'number'
|
|
20362
20998
|
* ```
|
|
20363
20999
|
*
|
|
21000
|
+
* @stability stable
|
|
20364
21001
|
* @category utility types
|
|
20365
21002
|
* @since 4.0.0
|
|
20366
21003
|
*/
|
|
@@ -20393,6 +21030,7 @@ export declare const satisfiesSuccessType: <A>() => <A2 extends A, E, R>(effect:
|
|
|
20393
21030
|
* // Type 'string' is not assignable to type 'ValidationError'
|
|
20394
21031
|
* ```
|
|
20395
21032
|
*
|
|
21033
|
+
* @stability stable
|
|
20396
21034
|
* @category utility types
|
|
20397
21035
|
* @since 4.0.0
|
|
20398
21036
|
*/
|
|
@@ -20422,6 +21060,7 @@ export declare const satisfiesErrorType: <E>() => <A, E2 extends E, R>(effect: E
|
|
|
20422
21060
|
* // const constrainedInvalid = satisfiesStringServices(invalidEffect)
|
|
20423
21061
|
* ```
|
|
20424
21062
|
*
|
|
21063
|
+
* @stability stable
|
|
20425
21064
|
* @category utility types
|
|
20426
21065
|
* @since 4.0.0
|
|
20427
21066
|
*/
|
|
@@ -20455,6 +21094,7 @@ export declare const satisfiesServicesType: <R>() => <A, E, R2 extends R>(effect
|
|
|
20455
21094
|
* await Effect.runPromise(Effect.all([mapped, mappedPending])) // => [10, 10]
|
|
20456
21095
|
* ```
|
|
20457
21096
|
*
|
|
21097
|
+
* @stability stable
|
|
20458
21098
|
* @category mapping
|
|
20459
21099
|
* @since 4.0.0
|
|
20460
21100
|
*/
|
|
@@ -20488,6 +21128,7 @@ export declare const mapEager: {
|
|
|
20488
21128
|
* await Effect.runPromise(Effect.all([mapped, mappedPending])) // => [10, 10]
|
|
20489
21129
|
* ```
|
|
20490
21130
|
*
|
|
21131
|
+
* @stability stable
|
|
20491
21132
|
* @category mapping
|
|
20492
21133
|
* @since 4.0.0
|
|
20493
21134
|
*/
|
|
@@ -20521,6 +21162,7 @@ export declare const mapEager: {
|
|
|
20521
21162
|
* await Effect.runPromise(Effect.all([mapped, mappedPending])) // => [10, 10]
|
|
20522
21163
|
* ```
|
|
20523
21164
|
*
|
|
21165
|
+
* @stability stable
|
|
20524
21166
|
* @category mapping
|
|
20525
21167
|
* @since 4.0.0
|
|
20526
21168
|
*/
|
|
@@ -20565,6 +21207,7 @@ export declare const mapEager: {
|
|
|
20565
21207
|
* output // => [['mapped: original error', 'mapped: error']]
|
|
20566
21208
|
* ```
|
|
20567
21209
|
*
|
|
21210
|
+
* @stability stable
|
|
20568
21211
|
* @category error handling
|
|
20569
21212
|
* @since 4.0.0
|
|
20570
21213
|
*/
|
|
@@ -20608,6 +21251,7 @@ export declare const mapErrorEager: {
|
|
|
20608
21251
|
* output // => [['mapped: original error', 'mapped: error']]
|
|
20609
21252
|
* ```
|
|
20610
21253
|
*
|
|
21254
|
+
* @stability stable
|
|
20611
21255
|
* @category error handling
|
|
20612
21256
|
* @since 4.0.0
|
|
20613
21257
|
*/
|
|
@@ -20651,6 +21295,7 @@ export declare const mapErrorEager: {
|
|
|
20651
21295
|
* output // => [['mapped: original error', 'mapped: error']]
|
|
20652
21296
|
* ```
|
|
20653
21297
|
*
|
|
21298
|
+
* @stability stable
|
|
20654
21299
|
* @category error handling
|
|
20655
21300
|
* @since 4.0.0
|
|
20656
21301
|
*/
|
|
@@ -20694,6 +21339,7 @@ export declare const mapErrorEager: {
|
|
|
20694
21339
|
* output // => [10, "Failed: error"]
|
|
20695
21340
|
* ```
|
|
20696
21341
|
*
|
|
21342
|
+
* @stability stable
|
|
20697
21343
|
* @category mapping
|
|
20698
21344
|
* @since 4.0.0
|
|
20699
21345
|
*/
|
|
@@ -20736,6 +21382,7 @@ export declare const mapBothEager: {
|
|
|
20736
21382
|
* output // => [10, "Failed: error"]
|
|
20737
21383
|
* ```
|
|
20738
21384
|
*
|
|
21385
|
+
* @stability stable
|
|
20739
21386
|
* @category mapping
|
|
20740
21387
|
* @since 4.0.0
|
|
20741
21388
|
*/
|
|
@@ -20781,6 +21428,7 @@ export declare const mapBothEager: {
|
|
|
20781
21428
|
* output // => [10, "Failed: error"]
|
|
20782
21429
|
* ```
|
|
20783
21430
|
*
|
|
21431
|
+
* @stability stable
|
|
20784
21432
|
* @category mapping
|
|
20785
21433
|
* @since 4.0.0
|
|
20786
21434
|
*/
|
|
@@ -20822,6 +21470,7 @@ export declare const mapBothEager: {
|
|
|
20822
21470
|
* await Effect.runPromise(Effect.all([flatMapped, flatMappedPending])) // => [10, 10]
|
|
20823
21471
|
* ```
|
|
20824
21472
|
*
|
|
21473
|
+
* @stability stable
|
|
20825
21474
|
* @category sequencing
|
|
20826
21475
|
* @since 4.0.0
|
|
20827
21476
|
*/
|
|
@@ -20859,6 +21508,7 @@ export declare const flatMapEager: {
|
|
|
20859
21508
|
* await Effect.runPromise(Effect.all([flatMapped, flatMappedPending])) // => [10, 10]
|
|
20860
21509
|
* ```
|
|
20861
21510
|
*
|
|
21511
|
+
* @stability stable
|
|
20862
21512
|
* @category sequencing
|
|
20863
21513
|
* @since 4.0.0
|
|
20864
21514
|
*/
|
|
@@ -20896,6 +21546,7 @@ export declare const flatMapEager: {
|
|
|
20896
21546
|
* await Effect.runPromise(Effect.all([flatMapped, flatMappedPending])) // => [10, 10]
|
|
20897
21547
|
* ```
|
|
20898
21548
|
*
|
|
21549
|
+
* @stability stable
|
|
20899
21550
|
* @category sequencing
|
|
20900
21551
|
* @since 4.0.0
|
|
20901
21552
|
*/
|
|
@@ -20950,6 +21601,7 @@ export declare const flatMapEager: {
|
|
|
20950
21601
|
* output // => [['recovered from: original error', 42, 'recovered from: error']]
|
|
20951
21602
|
* ```
|
|
20952
21603
|
*
|
|
21604
|
+
* @stability stable
|
|
20953
21605
|
* @category error handling
|
|
20954
21606
|
* @since 4.0.0
|
|
20955
21607
|
*/
|
|
@@ -21003,6 +21655,7 @@ export declare const catchEager: {
|
|
|
21003
21655
|
* output // => [['recovered from: original error', 42, 'recovered from: error']]
|
|
21004
21656
|
* ```
|
|
21005
21657
|
*
|
|
21658
|
+
* @stability stable
|
|
21006
21659
|
* @category error handling
|
|
21007
21660
|
* @since 4.0.0
|
|
21008
21661
|
*/
|
|
@@ -21056,6 +21709,7 @@ export declare const catchEager: {
|
|
|
21056
21709
|
* output // => [['recovered from: original error', 42, 'recovered from: error']]
|
|
21057
21710
|
* ```
|
|
21058
21711
|
*
|
|
21712
|
+
* @stability stable
|
|
21059
21713
|
* @category error handling
|
|
21060
21714
|
* @since 4.0.0
|
|
21061
21715
|
*/
|
|
@@ -21084,6 +21738,7 @@ export declare const catchEager: {
|
|
|
21084
21738
|
* Effect.runSync(effect) // => "computed eagerly"
|
|
21085
21739
|
* ```
|
|
21086
21740
|
*
|
|
21741
|
+
* @stability stable
|
|
21087
21742
|
* @category constructors
|
|
21088
21743
|
* @since 4.0.0
|
|
21089
21744
|
*/
|