effect 2.0.0-next.49 → 2.0.0-next.50
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/BigInt/dist/effect-BigInt.cjs.dev.js +45 -18
- package/BigInt/dist/effect-BigInt.cjs.mjs +1 -0
- package/BigInt/dist/effect-BigInt.cjs.prod.js +45 -18
- package/BigInt/dist/effect-BigInt.esm.js +46 -19
- package/Brand/dist/effect-Brand.cjs.dev.js +0 -1
- package/Brand/dist/effect-Brand.cjs.prod.js +0 -1
- package/Cache/dist/effect-Cache.cjs.dev.js +23 -23
- package/Cache/dist/effect-Cache.cjs.prod.js +23 -23
- package/Cause/dist/effect-Cause.cjs.dev.js +4 -5
- package/Cause/dist/effect-Cause.cjs.prod.js +4 -5
- package/Channel/dist/effect-Channel.cjs.dev.js +35 -35
- package/Channel/dist/effect-Channel.cjs.prod.js +35 -35
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +30 -30
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +30 -30
- package/Chunk/dist/effect-Chunk.cjs.dev.js +0 -1
- package/Chunk/dist/effect-Chunk.cjs.prod.js +0 -1
- package/Clock/dist/effect-Clock.cjs.dev.js +11 -11
- package/Clock/dist/effect-Clock.cjs.prod.js +11 -11
- package/Config/dist/effect-Config.cjs.dev.js +7 -8
- package/Config/dist/effect-Config.cjs.prod.js +7 -8
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +1 -2
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +1 -2
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +10 -10
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +10 -10
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +2 -3
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +2 -3
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +1 -2
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +1 -2
- package/Console/dist/effect-Console.cjs.dev.js +27 -27
- package/Console/dist/effect-Console.cjs.prod.js +27 -27
- package/Data/dist/effect-Data.cjs.dev.js +36 -36
- package/Data/dist/effect-Data.cjs.prod.js +36 -36
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +11 -11
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +11 -11
- package/Deferred/dist/effect-Deferred.cjs.dev.js +4 -5
- package/Deferred/dist/effect-Deferred.cjs.prod.js +4 -5
- package/Differ/dist/effect-Differ.cjs.dev.js +1 -2
- package/Differ/dist/effect-Differ.cjs.prod.js +1 -2
- package/Duration/dist/effect-Duration.cjs.dev.js +0 -1
- package/Duration/dist/effect-Duration.cjs.prod.js +0 -1
- package/Effect/dist/effect-Effect.cjs.dev.js +37 -57
- package/Effect/dist/effect-Effect.cjs.mjs +0 -2
- package/Effect/dist/effect-Effect.cjs.prod.js +37 -57
- package/Effect/dist/effect-Effect.esm.js +4 -23
- package/Either/dist/effect-Either.cjs.dev.js +1 -1
- package/Either/dist/effect-Either.cjs.prod.js +1 -1
- package/Either/dist/effect-Either.esm.js +1 -1
- package/Exit/dist/effect-Exit.cjs.dev.js +4 -5
- package/Exit/dist/effect-Exit.cjs.prod.js +4 -5
- package/Fiber/dist/effect-Fiber.cjs.dev.js +24 -24
- package/Fiber/dist/effect-Fiber.cjs.prod.js +24 -24
- package/FiberId/dist/effect-FiberId.cjs.dev.js +2 -3
- package/FiberId/dist/effect-FiberId.cjs.prod.js +2 -3
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +24 -31
- package/FiberRef/dist/effect-FiberRef.cjs.mjs +0 -1
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +24 -31
- package/FiberRef/dist/effect-FiberRef.esm.js +2 -8
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +5 -6
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +5 -6
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +6 -7
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +6 -7
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +36 -36
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +36 -36
- package/HashMap/dist/effect-HashMap.cjs.dev.js +1 -2
- package/HashMap/dist/effect-HashMap.cjs.prod.js +1 -2
- package/HashSet/dist/effect-HashSet.cjs.dev.js +1 -2
- package/HashSet/dist/effect-HashSet.cjs.prod.js +1 -2
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +24 -24
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +24 -24
- package/Layer/dist/effect-Layer.cjs.dev.js +35 -35
- package/Layer/dist/effect-Layer.cjs.mjs +2 -2
- package/Layer/dist/effect-Layer.cjs.prod.js +35 -35
- package/Layer/dist/effect-Layer.esm.js +4 -4
- package/List/dist/effect-List.cjs.dev.js +0 -1
- package/List/dist/effect-List.cjs.prod.js +0 -1
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +4 -4
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +4 -4
- package/Logger/dist/effect-Logger.cjs.dev.js +28 -28
- package/Logger/dist/effect-Logger.cjs.prod.js +28 -28
- package/Match/dist/effect-Match.cjs.dev.js +0 -1
- package/Match/dist/effect-Match.cjs.prod.js +0 -1
- package/Metric/dist/effect-Metric.cjs.dev.js +22 -22
- package/Metric/dist/effect-Metric.cjs.prod.js +22 -22
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +1 -2
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +1 -2
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +3 -3
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +3 -3
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +3 -4
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +3 -4
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +1 -2
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +1 -2
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +24 -24
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +24 -24
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +5 -5
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +5 -5
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +1 -2
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +1 -2
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +1 -2
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +1 -2
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +0 -1
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +0 -1
- package/Number/dist/effect-Number.cjs.dev.js +31 -2
- package/Number/dist/effect-Number.cjs.mjs +2 -1
- package/Number/dist/effect-Number.cjs.prod.js +31 -2
- package/Number/dist/effect-Number.esm.js +24 -3
- package/Option/dist/effect-Option.cjs.dev.js +1 -88
- package/Option/dist/effect-Option.cjs.mjs +0 -6
- package/Option/dist/effect-Option.cjs.prod.js +1 -88
- package/Option/dist/effect-Option.esm.js +2 -83
- package/Pool/dist/effect-Pool.cjs.dev.js +24 -24
- package/Pool/dist/effect-Pool.cjs.prod.js +24 -24
- package/PubSub/dist/effect-PubSub.cjs.dev.js +23 -23
- package/PubSub/dist/effect-PubSub.cjs.prod.js +23 -23
- package/Queue/dist/effect-Queue.cjs.dev.js +23 -23
- package/Queue/dist/effect-Queue.cjs.prod.js +23 -23
- package/Random/dist/effect-Random.cjs.dev.js +11 -11
- package/Random/dist/effect-Random.cjs.prod.js +11 -11
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +0 -1
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +0 -1
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +332 -90
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.mjs +15 -2
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +332 -90
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.esm.js +323 -92
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +0 -1
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +0 -1
- package/Ref/dist/effect-Ref.cjs.dev.js +5 -6
- package/Ref/dist/effect-Ref.cjs.prod.js +5 -6
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +28 -28
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +28 -28
- package/Request/dist/effect-Request.cjs.dev.js +23 -23
- package/Request/dist/effect-Request.cjs.prod.js +23 -23
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +30 -30
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +30 -30
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +31 -31
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +31 -31
- package/Resource/dist/effect-Resource.cjs.dev.js +26 -26
- package/Resource/dist/effect-Resource.cjs.prod.js +26 -26
- package/Runtime/dist/effect-Runtime.cjs.dev.js +25 -25
- package/Runtime/dist/effect-Runtime.cjs.prod.js +25 -25
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +35 -35
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +35 -35
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +2 -3
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +2 -3
- package/STM/dist/effect-STM.cjs.dev.js +38 -38
- package/STM/dist/effect-STM.cjs.prod.js +38 -38
- package/Schedule/dist/effect-Schedule.cjs.dev.js +16 -16
- package/Schedule/dist/effect-Schedule.cjs.prod.js +16 -16
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +0 -1
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +0 -1
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +0 -1
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +0 -1
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +0 -1
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +0 -1
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +4 -5
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +4 -5
- package/Scope/dist/effect-Scope.cjs.dev.js +22 -22
- package/Scope/dist/effect-Scope.cjs.prod.js +22 -22
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +29 -29
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +29 -29
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +26 -26
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +26 -26
- package/Sink/dist/effect-Sink.cjs.dev.js +33 -33
- package/Sink/dist/effect-Sink.cjs.prod.js +33 -33
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +0 -1
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +0 -1
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +0 -1
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +0 -1
- package/Stream/dist/effect-Stream.cjs.dev.js +36 -36
- package/Stream/dist/effect-Stream.cjs.prod.js +36 -36
- package/Streamable/dist/effect-Streamable.cjs.dev.js +36 -36
- package/Streamable/dist/effect-Streamable.cjs.prod.js +36 -36
- package/String/dist/effect-String.cjs.dev.js +2 -2
- package/String/dist/effect-String.cjs.prod.js +2 -2
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +41 -41
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +41 -41
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +28 -28
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +28 -28
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +25 -25
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +25 -25
- package/TArray/dist/effect-TArray.cjs.dev.js +40 -40
- package/TArray/dist/effect-TArray.cjs.prod.js +40 -40
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +39 -39
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +39 -39
- package/TMap/dist/effect-TMap.cjs.dev.js +41 -41
- package/TMap/dist/effect-TMap.cjs.prod.js +41 -41
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +38 -38
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +38 -38
- package/TPubSub/dist/effect-TPubSub.cjs.dev.js +47 -47
- package/TPubSub/dist/effect-TPubSub.cjs.prod.js +47 -47
- package/TQueue/dist/effect-TQueue.cjs.dev.js +40 -40
- package/TQueue/dist/effect-TQueue.cjs.prod.js +40 -40
- package/TRandom/dist/effect-TRandom.cjs.dev.js +40 -40
- package/TRandom/dist/effect-TRandom.cjs.prod.js +40 -40
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +46 -46
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +46 -46
- package/TRef/dist/effect-TRef.cjs.dev.js +38 -38
- package/TRef/dist/effect-TRef.cjs.prod.js +38 -38
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +39 -39
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +39 -39
- package/TSet/dist/effect-TSet.cjs.dev.js +41 -41
- package/TSet/dist/effect-TSet.cjs.prod.js +41 -41
- package/Take/dist/effect-Take.cjs.dev.js +30 -30
- package/Take/dist/effect-Take.cjs.prod.js +30 -30
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +2 -3
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +2 -3
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +16 -16
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +16 -16
- package/TestClock/dist/effect-TestClock.cjs.dev.js +27 -27
- package/TestClock/dist/effect-TestClock.cjs.prod.js +27 -27
- package/TestContext/dist/effect-TestContext.cjs.dev.js +29 -29
- package/TestContext/dist/effect-TestContext.cjs.prod.js +29 -29
- package/TestLive/dist/effect-TestLive.cjs.dev.js +11 -11
- package/TestLive/dist/effect-TestLive.cjs.prod.js +11 -11
- package/TestServices/dist/effect-TestServices.cjs.dev.js +29 -29
- package/TestServices/dist/effect-TestServices.cjs.prod.js +29 -29
- package/TestSized/dist/effect-TestSized.cjs.dev.js +4 -5
- package/TestSized/dist/effect-TestSized.cjs.prod.js +4 -5
- package/Tracer/dist/effect-Tracer.cjs.dev.js +28 -21
- package/Tracer/dist/effect-Tracer.cjs.mjs +1 -0
- package/Tracer/dist/effect-Tracer.cjs.prod.js +28 -21
- package/Tracer/dist/effect-Tracer.esm.js +8 -2
- package/dist/{Ref-23b67ad9.cjs.prod.js → Ref-00103de4.cjs.prod.js} +1 -1
- package/dist/{Ref-c75b5362.cjs.dev.js → Ref-f990026b.cjs.dev.js} +1 -1
- package/dist/{cache-7b144c1f.cjs.prod.js → cache-0b148e42.cjs.prod.js} +4 -4
- package/dist/{cache-e3d6cc01.cjs.dev.js → cache-d709d5cb.cjs.dev.js} +4 -4
- package/dist/{circular-105d525c.cjs.prod.js → circular-5b6f6504.cjs.prod.js} +10 -8
- package/dist/{circular-cbfc1699.cjs.dev.js → circular-6d2bb353.cjs.dev.js} +10 -8
- package/dist/{circular-3761aff7.cjs.prod.js → circular-952618e5.cjs.prod.js} +7 -7
- package/dist/{circular-8baf0205.cjs.dev.js → circular-aa705e70.cjs.dev.js} +7 -7
- package/dist/{config-887520b4.cjs.dev.js → config-8a7bf1ae.cjs.dev.js} +3 -3
- package/dist/{config-6a5f97fe.cjs.prod.js → config-f0bd27af.cjs.prod.js} +3 -3
- package/dist/{configProvider-8567470d.cjs.dev.js → configProvider-3d85d4ef.cjs.dev.js} +4 -4
- package/dist/{configProvider-098f7113.cjs.prod.js → configProvider-ae007b10.cjs.prod.js} +4 -4
- package/dist/{core-84667e8d.cjs.prod.js → core-473934ce.cjs.prod.js} +125 -41
- package/dist/{core-6815193e.cjs.dev.js → core-b4bf44d3.cjs.dev.js} +125 -41
- package/dist/{core-8072a539.cjs.prod.js → core-d3f4e713.cjs.prod.js} +2 -2
- package/dist/{core-e6f9fdbe.cjs.dev.js → core-dd1edd7a.cjs.dev.js} +2 -2
- package/dist/{core-effect-520abd3d.cjs.prod.js → core-effect-6666f2dc.cjs.prod.js} +20 -13
- package/dist/{core-effect-5700daea.cjs.dev.js → core-effect-f4b1aad8.cjs.dev.js} +20 -13
- package/dist/{dataSource-0ca8ef42.cjs.dev.js → dataSource-9f78e828.cjs.dev.js} +2 -2
- package/dist/{dataSource-17adc342.cjs.prod.js → dataSource-d5d7f338.cjs.prod.js} +2 -2
- package/dist/declarations/src/BigInt.d.ts +29 -3
- package/dist/declarations/src/BigInt.d.ts.map +1 -1
- package/dist/declarations/src/Channel.d.ts +0 -2
- package/dist/declarations/src/Channel.d.ts.map +1 -1
- package/dist/declarations/src/Effect.d.ts +7 -37
- package/dist/declarations/src/Effect.d.ts.map +1 -1
- package/dist/declarations/src/FiberRef.d.ts +0 -5
- package/dist/declarations/src/FiberRef.d.ts.map +1 -1
- package/dist/declarations/src/HashMap.d.ts +1 -1
- package/dist/declarations/src/Layer.d.ts +7 -10
- package/dist/declarations/src/Layer.d.ts.map +1 -1
- package/dist/declarations/src/Number.d.ts +24 -1
- package/dist/declarations/src/Number.d.ts.map +1 -1
- package/dist/declarations/src/Option.d.ts +0 -62
- package/dist/declarations/src/Option.d.ts.map +1 -1
- package/dist/declarations/src/ReadonlyRecord.d.ts +239 -79
- package/dist/declarations/src/ReadonlyRecord.d.ts.map +1 -1
- package/dist/declarations/src/Stream.d.ts +0 -2
- package/dist/declarations/src/Stream.d.ts.map +1 -1
- package/dist/declarations/src/Tracer.d.ts +6 -1
- package/dist/declarations/src/Tracer.d.ts.map +1 -1
- package/dist/{defaultServices-193b11dc.cjs.dev.js → defaultServices-6a9a2d2b.cjs.dev.js} +8 -79
- package/dist/{defaultServices-4c3bf140.cjs.prod.js → defaultServices-8ea5e664.cjs.prod.js} +8 -79
- package/dist/{fiber-cbdeec72.cjs.dev.js → fiber-3d944398.cjs.dev.js} +3 -3
- package/dist/{fiber-a1a5e429.cjs.prod.js → fiber-cbd0613f.cjs.prod.js} +3 -3
- package/dist/{fiberRefs-f631451c.cjs.prod.js → fiberRefs-99808a27.cjs.prod.js} +1 -1
- package/dist/{fiberRefs-8d2401f9.cjs.dev.js → fiberRefs-ccc37f30.cjs.dev.js} +1 -1
- package/dist/{fiberRuntime-7cb6cd44.cjs.dev.js → fiberRuntime-0c1e7478.cjs.dev.js} +17 -25
- package/dist/{fiberRuntime-4691f31b.cjs.prod.js → fiberRuntime-f1e80ca7.cjs.prod.js} +17 -25
- package/dist/{groupBy-5174c302.cjs.prod.js → groupBy-30f6e9ba.cjs.prod.js} +4 -4
- package/dist/{groupBy-239a6e6e.cjs.dev.js → groupBy-8ae74e3b.cjs.dev.js} +4 -4
- package/dist/{key-9b2f3322.cjs.prod.js → key-9c7368c8.cjs.prod.js} +1 -1
- package/dist/{key-2d4efb00.cjs.dev.js → key-e3189bbd.cjs.dev.js} +1 -1
- package/dist/{layer-d1c204db.cjs.prod.js → layer-bfb9802a.cjs.prod.js} +9 -10
- package/dist/{layer-961b15ae.cjs.dev.js → layer-c284cf0d.cjs.dev.js} +9 -10
- package/dist/{patch-1771b466.cjs.prod.js → patch-256bc574.cjs.prod.js} +1 -1
- package/dist/{patch-32cc7202.cjs.dev.js → patch-cda9b6c8.cjs.dev.js} +1 -1
- package/dist/{pathPatch-45b09159.cjs.dev.js → pathPatch-31ce8101.cjs.dev.js} +1 -1
- package/dist/{pathPatch-312bd492.cjs.prod.js → pathPatch-40b92af6.cjs.prod.js} +1 -1
- package/dist/{pool-f178fcc7.cjs.prod.js → pool-122f0fad.cjs.prod.js} +5 -5
- package/dist/{pool-3890e6ce.cjs.dev.js → pool-f6ca2038.cjs.dev.js} +5 -5
- package/dist/{query-a6b58e39.cjs.prod.js → query-5cc0ddf8.cjs.prod.js} +3 -3
- package/dist/{query-39c40fa6.cjs.dev.js → query-7bffa3c3.cjs.dev.js} +3 -3
- package/dist/{queue-4c4bdc04.cjs.dev.js → queue-4166cfdb.cjs.dev.js} +2 -2
- package/dist/{queue-5342a8d5.cjs.prod.js → queue-e326fd89.cjs.prod.js} +2 -2
- package/dist/{registry-6fbdb4e3.cjs.prod.js → registry-081e18a3.cjs.prod.js} +2 -2
- package/dist/{registry-ec8b84a2.cjs.dev.js → registry-377855a9.cjs.dev.js} +2 -2
- package/dist/{runtime-3295bc3c.cjs.prod.js → runtime-4078f059.cjs.prod.js} +5 -5
- package/dist/{runtime-43b9e2bb.cjs.dev.js → runtime-d4514ab5.cjs.dev.js} +5 -5
- package/dist/{schedule-a4be407d.cjs.dev.js → schedule-31e38871.cjs.dev.js} +3 -3
- package/dist/{schedule-6431754b.cjs.prod.js → schedule-f036b254.cjs.prod.js} +3 -3
- package/dist/{scopedRef-9032002a.cjs.dev.js → scopedRef-5ecf6468.cjs.dev.js} +6 -6
- package/dist/{scopedRef-7c2bf3f3.cjs.prod.js → scopedRef-8ce21228.cjs.prod.js} +6 -6
- package/dist/{singleProducerAsyncInput-879852ad.cjs.prod.js → singleProducerAsyncInput-8879d87c.cjs.prod.js} +1 -1
- package/dist/{singleProducerAsyncInput-82e5c80c.cjs.dev.js → singleProducerAsyncInput-ece7387b.cjs.dev.js} +1 -1
- package/dist/{sink-e4280f95.cjs.dev.js → sink-1794329b.cjs.dev.js} +4 -3
- package/dist/{sink-95371737.cjs.prod.js → sink-9208df8d.cjs.prod.js} +4 -3
- package/dist/{stm-f792171c.cjs.prod.js → stm-6ad7b384.cjs.prod.js} +3 -3
- package/dist/{stm-4bf1a928.cjs.dev.js → stm-b080be31.cjs.dev.js} +3 -3
- package/dist/{stream-c498ce8a.cjs.dev.js → stream-09aeeac3.cjs.dev.js} +5 -5
- package/dist/{stream-254329d0.cjs.prod.js → stream-e19805ca.cjs.prod.js} +5 -5
- package/dist/{synchronizedRef-cfe99d53.cjs.dev.js → synchronizedRef-8fa16866.cjs.dev.js} +1 -1
- package/dist/{synchronizedRef-5420532c.cjs.prod.js → synchronizedRef-cc04ecbd.cjs.prod.js} +1 -1
- package/dist/{tArray-7f227674.cjs.prod.js → tArray-5e42c290.cjs.prod.js} +3 -3
- package/dist/{tArray-996f4aba.cjs.dev.js → tArray-7d470ed7.cjs.dev.js} +3 -3
- package/dist/{tMap-811797bf.cjs.prod.js → tMap-a2cfde88.cjs.prod.js} +4 -4
- package/dist/{tMap-b9665a82.cjs.dev.js → tMap-f0df0ea0.cjs.dev.js} +4 -4
- package/dist/{tQueue-0c15312e.cjs.dev.js → tQueue-085f70b5.cjs.dev.js} +3 -3
- package/dist/{tQueue-8a6a0244.cjs.prod.js → tQueue-b80e940e.cjs.prod.js} +3 -3
- package/dist/{tRef-44d17d07.cjs.dev.js → tRef-2e495254.cjs.dev.js} +1 -1
- package/dist/{tRef-2892ee02.cjs.prod.js → tRef-42a212cb.cjs.prod.js} +1 -1
- package/internal/cache.esm.js +1 -1
- package/internal/channel.esm.js +3 -2
- package/internal/core-effect.esm.js +18 -11
- package/internal/core.esm.js +52 -41
- package/internal/fiberRuntime.esm.js +7 -14
- package/internal/layer/circular.esm.js +9 -6
- package/internal/layer.esm.js +3 -3
- package/internal/sink.esm.js +1 -1
- package/internal/stream.esm.js +6 -6
- package/internal/tracer.esm.js +7 -4
- package/package.json +1 -1
- package/src/BigInt.ts +51 -17
- package/src/Channel.ts +0 -2
- package/src/Effect.ts +9 -44
- package/src/Either.ts +1 -1
- package/src/FiberRef.ts +0 -6
- package/src/HashMap.ts +1 -1
- package/src/Layer.ts +7 -10
- package/src/Number.ts +29 -1
- package/src/Option.ts +1 -94
- package/src/ReadonlyRecord.ts +383 -110
- package/src/Stream.ts +0 -2
- package/src/Tracer.ts +6 -1
- package/src/internal/channel.ts +14 -5
- package/src/internal/core-effect.ts +34 -24
- package/src/internal/core.ts +83 -70
- package/src/internal/fiberRuntime.ts +4 -29
- package/src/internal/layer/circular.ts +10 -13
- package/src/internal/layer.ts +8 -8
- package/src/internal/stream.ts +3 -5
- package/src/internal/tracer.ts +7 -3
- /package/dist/{FiberId-54d8bd67.cjs.prod.js → FiberId-0f0b7779.cjs.prod.js} +0 -0
- /package/dist/{FiberId-6708cdca.cjs.dev.js → FiberId-6595cf4c.cjs.dev.js} +0 -0
- /package/dist/{HashSet-86613304.cjs.prod.js → HashSet-251c8294.cjs.prod.js} +0 -0
- /package/dist/{HashSet-dd020cb0.cjs.dev.js → HashSet-c12c037b.cjs.dev.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-35ed8dee.cjs.prod.js → RuntimeFlagsPatch-3890e860.cjs.prod.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-9cbc441d.cjs.dev.js → RuntimeFlagsPatch-7d62915d.cjs.dev.js} +0 -0
- /package/dist/{boundaries-6eea221f.cjs.dev.js → boundaries-8dfe50cb.cjs.dev.js} +0 -0
- /package/dist/{boundaries-26f0dc82.cjs.prod.js → boundaries-ebe66d32.cjs.prod.js} +0 -0
- /package/dist/{configError-a824b415.cjs.dev.js → configError-0c09b93c.cjs.dev.js} +0 -0
- /package/dist/{configError-856c7153.cjs.prod.js → configError-9021016b.cjs.prod.js} +0 -0
- /package/dist/{configSecret-663cfb59.cjs.prod.js → configSecret-0bdfadd8.cjs.prod.js} +0 -0
- /package/dist/{configSecret-23cf1a3f.cjs.dev.js → configSecret-938818ad.cjs.dev.js} +0 -0
- /package/dist/{hook-8e8bee6a.cjs.dev.js → hook-ad5af092.cjs.dev.js} +0 -0
- /package/dist/{hook-c2815d51.cjs.prod.js → hook-cab99f9e.cjs.prod.js} +0 -0
- /package/dist/{keyType-4ec0b247.cjs.prod.js → keyType-2ae6a00e.cjs.prod.js} +0 -0
- /package/dist/{keyType-f30c9fa4.cjs.dev.js → keyType-36962f62.cjs.dev.js} +0 -0
- /package/dist/{take-981a87eb.cjs.prod.js → take-114476e5.cjs.prod.js} +0 -0
- /package/dist/{take-bfd0a3ed.cjs.dev.js → take-d4fa1beb.cjs.dev.js} +0 -0
package/internal/tracer.esm.js
CHANGED
|
@@ -16,19 +16,22 @@ const make = options => ({
|
|
|
16
16
|
|
|
17
17
|
/** @internal */
|
|
18
18
|
const tracerTag = /*#__PURE__*/Tag( /*#__PURE__*/Symbol.for("effect/Tracer"));
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
const spanTag = /*#__PURE__*/Tag( /*#__PURE__*/Symbol.for("effect/ParentSpan"));
|
|
19
22
|
const ids = /*#__PURE__*/globalValue("effect/Tracer/SpanId.ids", () => make$1(0));
|
|
20
23
|
|
|
21
24
|
/** @internal */
|
|
22
25
|
class NativeSpan {
|
|
23
26
|
_tag = "Span";
|
|
24
27
|
traceId = "native";
|
|
28
|
+
sampled = true;
|
|
25
29
|
events = [];
|
|
26
|
-
constructor(name, parent, context, links,
|
|
30
|
+
constructor(name, parent, context, links, startTime) {
|
|
27
31
|
this.name = name;
|
|
28
32
|
this.parent = parent;
|
|
29
33
|
this.context = context;
|
|
30
34
|
this.links = links;
|
|
31
|
-
this.sampled = sampled;
|
|
32
35
|
this.startTime = startTime;
|
|
33
36
|
this.status = {
|
|
34
37
|
_tag: "Started",
|
|
@@ -55,7 +58,7 @@ class NativeSpan {
|
|
|
55
58
|
|
|
56
59
|
/** @internal */
|
|
57
60
|
const nativeTracer = /*#__PURE__*/make({
|
|
58
|
-
span: (name, parent, context, links,
|
|
61
|
+
span: (name, parent, context, links, startTime) => new NativeSpan(name, parent, context, links, startTime),
|
|
59
62
|
context: f => f()
|
|
60
63
|
});
|
|
61
64
|
|
|
@@ -68,4 +71,4 @@ const externalSpan = options => ({
|
|
|
68
71
|
context: options.context ?? empty()
|
|
69
72
|
});
|
|
70
73
|
|
|
71
|
-
export { NativeSpan, TracerTypeId, externalSpan, make, nativeTracer, tracerTag };
|
|
74
|
+
export { NativeSpan, TracerTypeId, externalSpan, make, nativeTracer, spanTag, tracerTag };
|
package/package.json
CHANGED
package/src/BigInt.ts
CHANGED
|
@@ -13,6 +13,10 @@ import * as order from "./Order"
|
|
|
13
13
|
import type { Ordering } from "./Ordering"
|
|
14
14
|
import * as predicate from "./Predicate"
|
|
15
15
|
|
|
16
|
+
const bigint0 = BigInt(0)
|
|
17
|
+
const bigint1 = BigInt(1)
|
|
18
|
+
const bigint2 = BigInt(2)
|
|
19
|
+
|
|
16
20
|
/**
|
|
17
21
|
* Tests if a value is a `bigint`.
|
|
18
22
|
*
|
|
@@ -92,20 +96,50 @@ export const subtract: {
|
|
|
92
96
|
* If the dividend is not a multiple of the divisor the result will be a `bigint` value
|
|
93
97
|
* which represents the integer division rounded down to the nearest integer.
|
|
94
98
|
*
|
|
99
|
+
* Returns `None` if the divisor is `0n`.
|
|
100
|
+
*
|
|
95
101
|
* @param self - The dividend operand.
|
|
96
102
|
* @param that - The divisor operand.
|
|
97
103
|
*
|
|
98
104
|
* @example
|
|
99
105
|
* import { divide } from 'effect/BigInt'
|
|
106
|
+
* import { some, none } from 'effect/Option'
|
|
100
107
|
*
|
|
101
|
-
* assert.deepStrictEqual(divide(6n, 3n), 2n)
|
|
102
|
-
* assert.deepStrictEqual(divide(6n,
|
|
108
|
+
* assert.deepStrictEqual(divide(6n, 3n), some(2n))
|
|
109
|
+
* assert.deepStrictEqual(divide(6n, 0n), none())
|
|
103
110
|
*
|
|
104
111
|
* @category math
|
|
105
112
|
* @since 2.0.0
|
|
106
|
-
* @since 2.0.0
|
|
107
113
|
*/
|
|
108
114
|
export const divide: {
|
|
115
|
+
(that: bigint): (self: bigint) => Option.Option<bigint>
|
|
116
|
+
(self: bigint, that: bigint): Option.Option<bigint>
|
|
117
|
+
} = dual(
|
|
118
|
+
2,
|
|
119
|
+
(self: bigint, that: bigint): Option.Option<bigint> => that === bigint0 ? Option.none() : Option.some(self / that)
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Provides a division operation on `bigint`s.
|
|
124
|
+
*
|
|
125
|
+
* If the dividend is not a multiple of the divisor the result will be a `bigint` value
|
|
126
|
+
* which represents the integer division rounded down to the nearest integer.
|
|
127
|
+
*
|
|
128
|
+
* Throws a `RangeError` if the divisor is `0n`.
|
|
129
|
+
*
|
|
130
|
+
* @param self - The dividend operand.
|
|
131
|
+
* @param that - The divisor operand.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* import { unsafeDivide } from 'effect/BigInt'
|
|
135
|
+
*
|
|
136
|
+
* assert.deepStrictEqual(unsafeDivide(6n, 3n), 2n)
|
|
137
|
+
* assert.deepStrictEqual(unsafeDivide(6n, 4n), 1n)
|
|
138
|
+
*
|
|
139
|
+
* @category math
|
|
140
|
+
* @since 2.0.0
|
|
141
|
+
*/
|
|
142
|
+
export const unsafeDivide: {
|
|
109
143
|
(that: bigint): (self: bigint) => bigint
|
|
110
144
|
(self: bigint, that: bigint): bigint
|
|
111
145
|
} = dual(2, (self: bigint, that: bigint): bigint => self / that)
|
|
@@ -123,7 +157,7 @@ export const divide: {
|
|
|
123
157
|
* @category math
|
|
124
158
|
* @since 2.0.0
|
|
125
159
|
*/
|
|
126
|
-
export const increment = (n: bigint): bigint => n +
|
|
160
|
+
export const increment = (n: bigint): bigint => n + bigint1
|
|
127
161
|
|
|
128
162
|
/**
|
|
129
163
|
* Decrements a number by `1n`.
|
|
@@ -138,7 +172,7 @@ export const increment = (n: bigint): bigint => n + 1n
|
|
|
138
172
|
* @category math
|
|
139
173
|
* @since 2.0.0
|
|
140
174
|
*/
|
|
141
|
-
export const decrement = (n: bigint): bigint => n -
|
|
175
|
+
export const decrement = (n: bigint): bigint => n - bigint1
|
|
142
176
|
|
|
143
177
|
/**
|
|
144
178
|
* @category instances
|
|
@@ -334,7 +368,7 @@ export const max: {
|
|
|
334
368
|
* @category math
|
|
335
369
|
* @since 2.0.0
|
|
336
370
|
*/
|
|
337
|
-
export const sign = (n: bigint): Ordering => Order(n,
|
|
371
|
+
export const sign = (n: bigint): Ordering => Order(n, bigint0)
|
|
338
372
|
|
|
339
373
|
/**
|
|
340
374
|
* Determines the absolute value of a given `bigint`.
|
|
@@ -351,7 +385,7 @@ export const sign = (n: bigint): Ordering => Order(n, 0n)
|
|
|
351
385
|
* @category math
|
|
352
386
|
* @since 2.0.0
|
|
353
387
|
*/
|
|
354
|
-
export const abs = (n: bigint): bigint => (n <
|
|
388
|
+
export const abs = (n: bigint): bigint => (n < bigint0 ? -n : n)
|
|
355
389
|
|
|
356
390
|
/**
|
|
357
391
|
* Determines the greatest common divisor of two `bigint`s.
|
|
@@ -373,7 +407,7 @@ export const gcd: {
|
|
|
373
407
|
(that: bigint): (self: bigint) => bigint
|
|
374
408
|
(self: bigint, that: bigint): bigint
|
|
375
409
|
} = dual(2, (self: bigint, that: bigint): bigint => {
|
|
376
|
-
while (that !==
|
|
410
|
+
while (that !== bigint0) {
|
|
377
411
|
const t = that
|
|
378
412
|
that = self % that
|
|
379
413
|
self = t
|
|
@@ -418,15 +452,15 @@ export const lcm: {
|
|
|
418
452
|
* @since 2.0.0
|
|
419
453
|
*/
|
|
420
454
|
export const unsafeSqrt = (n: bigint): bigint => {
|
|
421
|
-
if (n <
|
|
455
|
+
if (n < bigint0) {
|
|
422
456
|
throw new RangeError("Cannot take the square root of a negative number")
|
|
423
457
|
}
|
|
424
|
-
if (n <
|
|
458
|
+
if (n < bigint2) {
|
|
425
459
|
return n
|
|
426
460
|
}
|
|
427
|
-
let x = n /
|
|
461
|
+
let x = n / bigint2
|
|
428
462
|
while (x * x > n) {
|
|
429
|
-
x = ((n / x) + x) /
|
|
463
|
+
x = ((n / x) + x) / bigint2
|
|
430
464
|
}
|
|
431
465
|
return x
|
|
432
466
|
}
|
|
@@ -449,7 +483,7 @@ export const unsafeSqrt = (n: bigint): bigint => {
|
|
|
449
483
|
* @since 2.0.0
|
|
450
484
|
*/
|
|
451
485
|
export const sqrt = (n: bigint): Option.Option<bigint> =>
|
|
452
|
-
greaterThanOrEqualTo(n,
|
|
486
|
+
greaterThanOrEqualTo(n, bigint0) ? Option.some(unsafeSqrt(n)) : Option.none<bigint>()
|
|
453
487
|
|
|
454
488
|
/**
|
|
455
489
|
* Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint
|
|
@@ -465,7 +499,7 @@ export const sqrt = (n: bigint): Option.Option<bigint> =>
|
|
|
465
499
|
* @since 2.0.0
|
|
466
500
|
*/
|
|
467
501
|
export const sumAll = (collection: Iterable<bigint>): bigint => {
|
|
468
|
-
let out =
|
|
502
|
+
let out = bigint0
|
|
469
503
|
for (const n of collection) {
|
|
470
504
|
out += n
|
|
471
505
|
}
|
|
@@ -486,10 +520,10 @@ export const sumAll = (collection: Iterable<bigint>): bigint => {
|
|
|
486
520
|
* @since 2.0.0
|
|
487
521
|
*/
|
|
488
522
|
export const multiplyAll = (collection: Iterable<bigint>): bigint => {
|
|
489
|
-
let out =
|
|
523
|
+
let out = bigint1
|
|
490
524
|
for (const n of collection) {
|
|
491
|
-
if (n ===
|
|
492
|
-
return
|
|
525
|
+
if (n === bigint0) {
|
|
526
|
+
return bigint0
|
|
493
527
|
}
|
|
494
528
|
out *= n
|
|
495
529
|
}
|
package/src/Channel.ts
CHANGED
|
@@ -2074,7 +2074,6 @@ export const withSpan: {
|
|
|
2074
2074
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
2075
2075
|
readonly parent?: Tracer.ParentSpan
|
|
2076
2076
|
readonly root?: boolean
|
|
2077
|
-
readonly sampled?: boolean
|
|
2078
2077
|
readonly context?: Context.Context<never>
|
|
2079
2078
|
}
|
|
2080
2079
|
): <Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>(
|
|
@@ -2088,7 +2087,6 @@ export const withSpan: {
|
|
|
2088
2087
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
2089
2088
|
readonly parent?: Tracer.ParentSpan
|
|
2090
2089
|
readonly root?: boolean
|
|
2091
|
-
readonly sampled?: boolean
|
|
2092
2090
|
readonly context?: Context.Context<never>
|
|
2093
2091
|
}
|
|
2094
2092
|
): Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>
|
package/src/Effect.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type * as Clock from "./Clock"
|
|
|
7
7
|
import type { Config } from "./Config"
|
|
8
8
|
import type { ConfigError } from "./ConfigError"
|
|
9
9
|
import type { ConfigProvider } from "./ConfigProvider"
|
|
10
|
-
import * as Context from "./Context"
|
|
10
|
+
import type * as Context from "./Context"
|
|
11
11
|
import type * as Deferred from "./Deferred"
|
|
12
12
|
import type * as Duration from "./Duration"
|
|
13
13
|
import type * as Either from "./Either"
|
|
@@ -3145,8 +3145,8 @@ export const serviceMembers: <I, S>(tag: Context.Tag<I, S>) => {
|
|
|
3145
3145
|
* @since 2.0.0
|
|
3146
3146
|
* @category context
|
|
3147
3147
|
*/
|
|
3148
|
-
export const serviceOption: <I, A>(tag: Context.Tag<I, A>) => Effect<never, never, Option.Option<A>> =
|
|
3149
|
-
|
|
3148
|
+
export const serviceOption: <I, A>(tag: Context.Tag<I, A>) => Effect<never, never, Option.Option<A>> =
|
|
3149
|
+
effect.serviceOption
|
|
3150
3150
|
|
|
3151
3151
|
/**
|
|
3152
3152
|
* Updates the service with the required service entry.
|
|
@@ -4926,7 +4926,6 @@ export const makeSpan: (
|
|
|
4926
4926
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
4927
4927
|
readonly parent?: Tracer.ParentSpan
|
|
4928
4928
|
readonly root?: boolean
|
|
4929
|
-
readonly sampled?: boolean
|
|
4930
4929
|
readonly context?: Context.Context<never>
|
|
4931
4930
|
}
|
|
4932
4931
|
) => Effect<never, never, Tracer.Span> = effect.makeSpan
|
|
@@ -4948,7 +4947,6 @@ export const makeSpanScoped: (
|
|
|
4948
4947
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
4949
4948
|
readonly parent?: Tracer.ParentSpan
|
|
4950
4949
|
readonly root?: boolean
|
|
4951
|
-
readonly sampled?: boolean
|
|
4952
4950
|
readonly context?: Context.Context<never>
|
|
4953
4951
|
}
|
|
4954
4952
|
) => Effect<Scope.Scope, never, Tracer.Span> = fiberRuntime.makeSpanScoped
|
|
@@ -4972,7 +4970,6 @@ export const useSpan: {
|
|
|
4972
4970
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
4973
4971
|
readonly parent?: Tracer.ParentSpan
|
|
4974
4972
|
readonly root?: boolean
|
|
4975
|
-
readonly sampled?: boolean
|
|
4976
4973
|
readonly context?: Context.Context<never>
|
|
4977
4974
|
},
|
|
4978
4975
|
evaluate: (span: Tracer.Span) => Effect<R, E, A>
|
|
@@ -4993,10 +4990,9 @@ export const withSpan: {
|
|
|
4993
4990
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
4994
4991
|
readonly parent?: Tracer.ParentSpan
|
|
4995
4992
|
readonly root?: boolean
|
|
4996
|
-
readonly sampled?: boolean
|
|
4997
4993
|
readonly context?: Context.Context<never>
|
|
4998
4994
|
}
|
|
4999
|
-
): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>
|
|
4995
|
+
): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, Tracer.ParentSpan>, E, A>
|
|
5000
4996
|
<R, E, A>(
|
|
5001
4997
|
self: Effect<R, E, A>,
|
|
5002
4998
|
name: string,
|
|
@@ -5005,10 +5001,9 @@ export const withSpan: {
|
|
|
5005
5001
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
5006
5002
|
readonly parent?: Tracer.ParentSpan
|
|
5007
5003
|
readonly root?: boolean
|
|
5008
|
-
readonly sampled?: boolean
|
|
5009
5004
|
readonly context?: Context.Context<never>
|
|
5010
5005
|
}
|
|
5011
|
-
): Effect<R, E, A>
|
|
5006
|
+
): Effect<Exclude<R, Tracer.ParentSpan>, E, A>
|
|
5012
5007
|
} = effect.withSpan
|
|
5013
5008
|
|
|
5014
5009
|
/**
|
|
@@ -5027,10 +5022,9 @@ export const withSpanScoped: {
|
|
|
5027
5022
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
5028
5023
|
readonly parent?: Tracer.ParentSpan
|
|
5029
5024
|
readonly root?: boolean
|
|
5030
|
-
readonly sampled?: boolean
|
|
5031
5025
|
readonly context?: Context.Context<never>
|
|
5032
5026
|
}
|
|
5033
|
-
): <R, E, A>(self: Effect<R, E, A>) => Effect<R | Scope.Scope, E, A>
|
|
5027
|
+
): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, Tracer.ParentSpan> | Scope.Scope, E, A>
|
|
5034
5028
|
<R, E, A>(
|
|
5035
5029
|
self: Effect<R, E, A>,
|
|
5036
5030
|
name: string,
|
|
@@ -5039,32 +5033,11 @@ export const withSpanScoped: {
|
|
|
5039
5033
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
5040
5034
|
readonly parent?: Tracer.ParentSpan
|
|
5041
5035
|
readonly root?: boolean
|
|
5042
|
-
readonly sampled?: boolean
|
|
5043
5036
|
readonly context?: Context.Context<never>
|
|
5044
5037
|
}
|
|
5045
|
-
): Effect<Scope.Scope | R, E, A>
|
|
5038
|
+
): Effect<Scope.Scope | Exclude<R, Tracer.ParentSpan>, E, A>
|
|
5046
5039
|
} = fiberRuntime.withSpanScoped
|
|
5047
5040
|
|
|
5048
|
-
/**
|
|
5049
|
-
* Create and add a span to the current span stack.
|
|
5050
|
-
*
|
|
5051
|
-
* The span is ended & removed from the stack when the Scope is finalized.
|
|
5052
|
-
*
|
|
5053
|
-
* @since 2.0.0
|
|
5054
|
-
* @category tracing
|
|
5055
|
-
*/
|
|
5056
|
-
export const setSpan: (
|
|
5057
|
-
name: string,
|
|
5058
|
-
options?: {
|
|
5059
|
-
readonly attributes?: Record<string, unknown>
|
|
5060
|
-
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
5061
|
-
readonly parent?: Tracer.ParentSpan
|
|
5062
|
-
readonly root?: boolean
|
|
5063
|
-
readonly sampled?: boolean
|
|
5064
|
-
readonly context?: Context.Context<never>
|
|
5065
|
-
}
|
|
5066
|
-
) => Effect<Scope.Scope, never, void> = fiberRuntime.setSpan
|
|
5067
|
-
|
|
5068
5041
|
/**
|
|
5069
5042
|
* Adds the provided span to the current span stack.
|
|
5070
5043
|
*
|
|
@@ -5072,18 +5045,10 @@ export const setSpan: (
|
|
|
5072
5045
|
* @category tracing
|
|
5073
5046
|
*/
|
|
5074
5047
|
export const withParentSpan: {
|
|
5075
|
-
(span: Tracer.ParentSpan): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>
|
|
5076
|
-
<R, E, A>(self: Effect<R, E, A>, span: Tracer.ParentSpan): Effect<R, E, A>
|
|
5048
|
+
(span: Tracer.ParentSpan): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, Tracer.ParentSpan>, E, A>
|
|
5049
|
+
<R, E, A>(self: Effect<R, E, A>, span: Tracer.ParentSpan): Effect<Exclude<R, Tracer.ParentSpan>, E, A>
|
|
5077
5050
|
} = effect.withParentSpan
|
|
5078
5051
|
|
|
5079
|
-
/**
|
|
5080
|
-
* Adds the provided span to the current span stack.
|
|
5081
|
-
*
|
|
5082
|
-
* @since 2.0.0
|
|
5083
|
-
* @category tracing
|
|
5084
|
-
*/
|
|
5085
|
-
export const setParentSpan: (span: Tracer.ParentSpan) => Effect<Scope.Scope, never, void> = fiberRuntime.setParentSpan
|
|
5086
|
-
|
|
5087
5052
|
// -------------------------------------------------------------------------------------
|
|
5088
5053
|
// optionality
|
|
5089
5054
|
// -------------------------------------------------------------------------------------
|
package/src/Either.ts
CHANGED
|
@@ -606,7 +606,7 @@ export const gen: Gen.Gen<EitherTypeLambda, Gen.Adapter<EitherTypeLambda>> = (f)
|
|
|
606
606
|
const iterator = f(adapter)
|
|
607
607
|
let state: IteratorYieldResult<any> | IteratorReturnResult<any> = iterator.next()
|
|
608
608
|
if (state.done) {
|
|
609
|
-
return right(
|
|
609
|
+
return right(state.value) as any
|
|
610
610
|
} else {
|
|
611
611
|
let current = state.value.value
|
|
612
612
|
if (isLeft(current)) {
|
package/src/FiberRef.ts
CHANGED
|
@@ -366,12 +366,6 @@ export const currentSupervisor: FiberRef<Supervisor.Supervisor<any>> = fiberRunt
|
|
|
366
366
|
*/
|
|
367
367
|
export const currentMetricLabels: FiberRef<HashSet.HashSet<MetricLabel.MetricLabel>> = core.currentMetricLabels
|
|
368
368
|
|
|
369
|
-
/**
|
|
370
|
-
* @since 2.0.0
|
|
371
|
-
* @category fiberRefs
|
|
372
|
-
*/
|
|
373
|
-
export const currentTracerSpan: FiberRef<List.List<Tracer.ParentSpan>> = core.currentTracerSpan
|
|
374
|
-
|
|
375
369
|
/**
|
|
376
370
|
* @since 2.0.0
|
|
377
371
|
* @category fiberRefs
|
package/src/HashMap.ts
CHANGED
|
@@ -354,7 +354,7 @@ export const forEach: {
|
|
|
354
354
|
*/
|
|
355
355
|
export const reduce: {
|
|
356
356
|
<Z, V, K>(zero: Z, f: (accumulator: Z, value: V, key: K) => Z): (self: HashMap<K, V>) => Z
|
|
357
|
-
<
|
|
357
|
+
<K, V, Z>(self: HashMap<K, V>, zero: Z, f: (accumulator: Z, value: V, key: K) => Z): Z
|
|
358
358
|
} = HM.reduce
|
|
359
359
|
|
|
360
360
|
/**
|
package/src/Layer.ts
CHANGED
|
@@ -876,7 +876,7 @@ export const setConfigProvider: (configProvider: ConfigProvider) => Layer<never,
|
|
|
876
876
|
* @since 2.0.0
|
|
877
877
|
* @category tracing
|
|
878
878
|
*/
|
|
879
|
-
export const
|
|
879
|
+
export const parentSpan: (span: Tracer.ParentSpan) => Layer<never, never, Tracer.ParentSpan> = circularLayer.parentSpan
|
|
880
880
|
|
|
881
881
|
/**
|
|
882
882
|
* @since 2.0.0
|
|
@@ -937,18 +937,17 @@ export const setScheduler: (scheduler: Scheduler.Scheduler) => Layer<never, neve
|
|
|
937
937
|
* @since 2.0.0
|
|
938
938
|
* @category tracing
|
|
939
939
|
*/
|
|
940
|
-
export const
|
|
940
|
+
export const span: (
|
|
941
941
|
name: string,
|
|
942
942
|
options?: {
|
|
943
943
|
readonly attributes?: Record<string, unknown>
|
|
944
944
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
945
945
|
readonly parent?: Tracer.ParentSpan
|
|
946
946
|
readonly root?: boolean
|
|
947
|
-
readonly sampled?: boolean
|
|
948
947
|
readonly context?: Context.Context<never>
|
|
949
948
|
readonly onEnd?: (span: Tracer.Span, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<never, never, void>
|
|
950
949
|
}
|
|
951
|
-
) => Layer<never, never,
|
|
950
|
+
) => Layer<never, never, Tracer.ParentSpan> = circularLayer.span
|
|
952
951
|
|
|
953
952
|
/**
|
|
954
953
|
* Create a Layer that sets the current Tracer
|
|
@@ -990,11 +989,10 @@ export const withSpan: {
|
|
|
990
989
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
991
990
|
readonly parent?: Tracer.ParentSpan
|
|
992
991
|
readonly root?: boolean
|
|
993
|
-
readonly sampled?: boolean
|
|
994
992
|
readonly context?: Context.Context<never>
|
|
995
993
|
readonly onEnd?: (span: Tracer.Span, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<never, never, void>
|
|
996
994
|
}
|
|
997
|
-
): <R, E, A>(self: Layer<R, E, A>) => Layer<R, E, A>
|
|
995
|
+
): <R, E, A>(self: Layer<R, E, A>) => Layer<Exclude<R, Tracer.ParentSpan>, E, A>
|
|
998
996
|
<R, E, A>(
|
|
999
997
|
self: Layer<R, E, A>,
|
|
1000
998
|
name: string,
|
|
@@ -1003,11 +1001,10 @@ export const withSpan: {
|
|
|
1003
1001
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
1004
1002
|
readonly parent?: Tracer.ParentSpan
|
|
1005
1003
|
readonly root?: boolean
|
|
1006
|
-
readonly sampled?: boolean
|
|
1007
1004
|
readonly context?: Context.Context<never>
|
|
1008
1005
|
readonly onEnd?: (span: Tracer.Span, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<never, never, void>
|
|
1009
1006
|
}
|
|
1010
|
-
): Layer<R, E, A>
|
|
1007
|
+
): Layer<Exclude<R, Tracer.ParentSpan>, E, A>
|
|
1011
1008
|
} = internal.withSpan
|
|
1012
1009
|
|
|
1013
1010
|
/**
|
|
@@ -1015,6 +1012,6 @@ export const withSpan: {
|
|
|
1015
1012
|
* @category tracing
|
|
1016
1013
|
*/
|
|
1017
1014
|
export const withParentSpan: {
|
|
1018
|
-
(span: Tracer.ParentSpan): <R, E, A>(self: Layer<R, E, A>) => Layer<R, E, A>
|
|
1019
|
-
<R, E, A>(self: Layer<R, E, A>, span: Tracer.ParentSpan): Layer<R, E, A>
|
|
1015
|
+
(span: Tracer.ParentSpan): <R, E, A>(self: Layer<R, E, A>) => Layer<Exclude<R, Tracer.ParentSpan>, E, A>
|
|
1016
|
+
<R, E, A>(self: Layer<R, E, A>, span: Tracer.ParentSpan): Layer<Exclude<R, Tracer.ParentSpan>, E, A>
|
|
1020
1017
|
} = internal.withParentSpan
|
package/src/Number.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as equivalence from "./Equivalence"
|
|
9
9
|
import { dual } from "./Function"
|
|
10
|
+
import * as option from "./internal/Option"
|
|
11
|
+
import type { Option } from "./Option"
|
|
10
12
|
import * as order from "./Order"
|
|
11
13
|
import type { Ordering } from "./Ordering"
|
|
12
14
|
import * as predicate from "./Predicate"
|
|
@@ -92,13 +94,39 @@ export const subtract: {
|
|
|
92
94
|
*
|
|
93
95
|
* @example
|
|
94
96
|
* import { divide } from 'effect/Number'
|
|
97
|
+
* import { some, none } from 'effect/Option'
|
|
95
98
|
*
|
|
96
|
-
* assert.deepStrictEqual(divide(6, 3), 2)
|
|
99
|
+
* assert.deepStrictEqual(divide(6, 3), some(2))
|
|
100
|
+
* assert.deepStrictEqual(divide(6, 0), none())
|
|
97
101
|
*
|
|
98
102
|
* @category math
|
|
99
103
|
* @since 2.0.0
|
|
100
104
|
*/
|
|
101
105
|
export const divide: {
|
|
106
|
+
(that: number): (self: number) => Option<number>
|
|
107
|
+
(self: number, that: number): Option<number>
|
|
108
|
+
} = dual(
|
|
109
|
+
2,
|
|
110
|
+
(self: number, that: number): Option<number> => that === 0 ? option.none : option.some(self / that)
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Provides a division operation on `number`s.
|
|
115
|
+
*
|
|
116
|
+
* Throws a `RangeError` if the divisor is `0`.
|
|
117
|
+
*
|
|
118
|
+
* @param self - The dividend operand.
|
|
119
|
+
* @param that - The divisor operand.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* import { unsafeDivide } from 'effect/Number'
|
|
123
|
+
*
|
|
124
|
+
* assert.deepStrictEqual(unsafeDivide(6, 3), 2)
|
|
125
|
+
*
|
|
126
|
+
* @category math
|
|
127
|
+
* @since 2.0.0
|
|
128
|
+
*/
|
|
129
|
+
export const unsafeDivide: {
|
|
102
130
|
(that: number): (self: number) => number
|
|
103
131
|
(self: number, that: number): number
|
|
104
132
|
} = dual(2, (self: number, that: number): number => self / that)
|
package/src/Option.ts
CHANGED
|
@@ -11,7 +11,6 @@ import type { TypeLambda } from "./HKT"
|
|
|
11
11
|
import type { Inspectable } from "./Inspectable"
|
|
12
12
|
import * as either from "./internal/Either"
|
|
13
13
|
import * as option from "./internal/Option"
|
|
14
|
-
import * as N from "./Number"
|
|
15
14
|
import type { Order } from "./Order"
|
|
16
15
|
import * as order from "./Order"
|
|
17
16
|
import type { Pipeable } from "./Pipeable"
|
|
@@ -1117,98 +1116,6 @@ export const exists: {
|
|
|
1117
1116
|
<A>(self: Option<A>, predicate: Predicate<A>): boolean => isNone(self) ? false : predicate(self.value)
|
|
1118
1117
|
)
|
|
1119
1118
|
|
|
1120
|
-
// -------------------------------------------------------------------------------------
|
|
1121
|
-
// math
|
|
1122
|
-
// -------------------------------------------------------------------------------------
|
|
1123
|
-
|
|
1124
|
-
/**
|
|
1125
|
-
* @category math
|
|
1126
|
-
* @since 2.0.0
|
|
1127
|
-
*/
|
|
1128
|
-
export const sum: {
|
|
1129
|
-
(self: Option<number>, that: Option<number>): Option<number>
|
|
1130
|
-
(that: Option<number>): (self: Option<number>) => Option<number>
|
|
1131
|
-
} = lift2(N.sum)
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* @category math
|
|
1135
|
-
* @since 2.0.0
|
|
1136
|
-
*/
|
|
1137
|
-
export const multiply: {
|
|
1138
|
-
(self: Option<number>, that: Option<number>): Option<number>
|
|
1139
|
-
(that: Option<number>): (self: Option<number>) => Option<number>
|
|
1140
|
-
} = lift2(N.multiply)
|
|
1141
|
-
|
|
1142
|
-
/**
|
|
1143
|
-
* @category math
|
|
1144
|
-
* @since 2.0.0
|
|
1145
|
-
*/
|
|
1146
|
-
export const subtract: {
|
|
1147
|
-
(self: Option<number>, that: Option<number>): Option<number>
|
|
1148
|
-
(that: Option<number>): (self: Option<number>) => Option<number>
|
|
1149
|
-
} = lift2(N.subtract)
|
|
1150
|
-
|
|
1151
|
-
/**
|
|
1152
|
-
* @category math
|
|
1153
|
-
* @since 2.0.0
|
|
1154
|
-
*/
|
|
1155
|
-
export const divide: {
|
|
1156
|
-
(self: Option<number>, that: Option<number>): Option<number>
|
|
1157
|
-
(that: Option<number>): (self: Option<number>) => Option<number>
|
|
1158
|
-
} = lift2(N.divide)
|
|
1159
|
-
|
|
1160
|
-
/**
|
|
1161
|
-
* Sum all numbers in an iterable of `Option<number>` ignoring the `None` values.
|
|
1162
|
-
*
|
|
1163
|
-
* @param self - The iterable of `Option<number>` to be summed.
|
|
1164
|
-
*
|
|
1165
|
-
* @example
|
|
1166
|
-
* import { sumCompact, some, none } from 'effect/Option'
|
|
1167
|
-
*
|
|
1168
|
-
* const iterable = [some(2), none(), some(3), none()]
|
|
1169
|
-
* assert.deepStrictEqual(sumCompact(iterable), 5)
|
|
1170
|
-
*
|
|
1171
|
-
* @category math
|
|
1172
|
-
* @since 2.0.0
|
|
1173
|
-
*/
|
|
1174
|
-
export const sumCompact = (self: Iterable<Option<number>>): number => {
|
|
1175
|
-
let out = 0
|
|
1176
|
-
for (const oa of self) {
|
|
1177
|
-
if (isSome(oa)) {
|
|
1178
|
-
out += oa.value
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
return out
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
/**
|
|
1185
|
-
* Multiply all numbers in an iterable of `Option<number>` ignoring the `None` values.
|
|
1186
|
-
*
|
|
1187
|
-
* @param self - The iterable of `Option<number>` to be multiplied.
|
|
1188
|
-
*
|
|
1189
|
-
* @example
|
|
1190
|
-
* import { multiplyCompact, some, none } from 'effect/Option'
|
|
1191
|
-
*
|
|
1192
|
-
* const iterable = [some(2), none(), some(3), none()]
|
|
1193
|
-
* assert.deepStrictEqual(multiplyCompact(iterable), 6)
|
|
1194
|
-
*
|
|
1195
|
-
* @category math
|
|
1196
|
-
* @since 2.0.0
|
|
1197
|
-
*/
|
|
1198
|
-
export const multiplyCompact = (self: Iterable<Option<number>>): number => {
|
|
1199
|
-
let out = 1
|
|
1200
|
-
for (const oa of self) {
|
|
1201
|
-
if (isSome(oa)) {
|
|
1202
|
-
const a: number = oa.value
|
|
1203
|
-
if (a === 0) {
|
|
1204
|
-
return 0
|
|
1205
|
-
}
|
|
1206
|
-
out *= a
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
return out
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
1119
|
// -------------------------------------------------------------------------------------
|
|
1213
1120
|
// do notation
|
|
1214
1121
|
// -------------------------------------------------------------------------------------
|
|
@@ -1287,7 +1194,7 @@ export const gen: Gen.Gen<OptionTypeLambda, Gen.Adapter<OptionTypeLambda>> = (f)
|
|
|
1287
1194
|
const iterator = f(adapter)
|
|
1288
1195
|
let state: IteratorYieldResult<any> | IteratorReturnResult<any> = iterator.next()
|
|
1289
1196
|
if (state.done) {
|
|
1290
|
-
return some(
|
|
1197
|
+
return some(state.value)
|
|
1291
1198
|
} else {
|
|
1292
1199
|
let current = state.value.value
|
|
1293
1200
|
if (isNone(current)) {
|