effect 2.0.0-next.45 → 2.0.0-next.46
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 +125 -1
- package/Bigint/dist/effect-Bigint.cjs.mjs +6 -1
- package/Bigint/dist/effect-Bigint.cjs.prod.js +125 -1
- package/Bigint/dist/effect-Bigint.esm.js +111 -2
- package/Boolean/dist/effect-Boolean.cjs.dev.js +1 -1
- package/Boolean/dist/effect-Boolean.cjs.prod.js +1 -1
- package/Boolean/dist/effect-Boolean.esm.js +1 -1
- package/Brand/dist/effect-Brand.cjs.dev.js +3 -3
- package/Brand/dist/effect-Brand.cjs.prod.js +3 -3
- package/Cache/dist/effect-Cache.cjs.dev.js +30 -30
- package/Cache/dist/effect-Cache.cjs.prod.js +30 -30
- package/Cause/dist/effect-Cause.cjs.dev.js +8 -8
- package/Cause/dist/effect-Cause.cjs.prod.js +8 -8
- package/Channel/dist/effect-Channel.cjs.dev.js +38 -38
- package/Channel/dist/effect-Channel.cjs.prod.js +38 -38
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +34 -34
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +34 -34
- package/Chunk/dist/effect-Chunk.cjs.dev.js +3 -3
- package/Chunk/dist/effect-Chunk.cjs.prod.js +3 -3
- package/Clock/dist/effect-Clock.cjs.dev.js +16 -16
- package/Clock/dist/effect-Clock.cjs.prod.js +16 -16
- package/Config/dist/effect-Config.cjs.dev.js +11 -11
- package/Config/dist/effect-Config.cjs.prod.js +11 -11
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +4 -4
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +4 -4
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +17 -17
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +17 -17
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +5 -5
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +5 -5
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +4 -4
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +4 -4
- package/Console/dist/effect-Console.cjs.dev.js +33 -33
- package/Console/dist/effect-Console.cjs.prod.js +33 -33
- package/Context/dist/effect-Context.cjs.dev.js +3 -8
- package/Context/dist/effect-Context.cjs.prod.js +3 -8
- package/Data/dist/effect-Data.cjs.dev.js +141 -54
- package/Data/dist/effect-Data.cjs.mjs +2 -0
- package/Data/dist/effect-Data.cjs.prod.js +141 -54
- package/Data/dist/effect-Data.esm.js +51 -3
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +16 -16
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +16 -16
- package/Deferred/dist/effect-Deferred.cjs.dev.js +8 -8
- package/Deferred/dist/effect-Deferred.cjs.prod.js +8 -8
- package/Differ/dist/effect-Differ.cjs.dev.js +11 -11
- package/Differ/dist/effect-Differ.cjs.prod.js +11 -11
- package/Duration/dist/effect-Duration.cjs.dev.js +3 -3
- package/Duration/dist/effect-Duration.cjs.prod.js +3 -3
- package/Effect/dist/effect-Effect.cjs.dev.js +35 -35
- package/Effect/dist/effect-Effect.cjs.prod.js +35 -35
- package/Effectable/dist/effect-Effectable.cjs.dev.js +1 -2
- package/Effectable/dist/effect-Effectable.cjs.prod.js +1 -2
- package/Either/dist/effect-Either.cjs.dev.js +3 -3
- package/Either/dist/effect-Either.cjs.prod.js +3 -3
- package/Encoding/dist/effect-Encoding.cjs.dev.js +3 -3
- package/Encoding/dist/effect-Encoding.cjs.prod.js +3 -3
- package/Exit/dist/effect-Exit.cjs.dev.js +8 -8
- package/Exit/dist/effect-Exit.cjs.prod.js +8 -8
- package/Fiber/dist/effect-Fiber.cjs.dev.js +27 -27
- package/Fiber/dist/effect-Fiber.cjs.prod.js +27 -27
- package/FiberId/dist/effect-FiberId.cjs.dev.js +5 -5
- package/FiberId/dist/effect-FiberId.cjs.prod.js +5 -5
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +27 -27
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +27 -27
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +9 -9
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +9 -9
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +10 -10
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +10 -10
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +39 -39
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +39 -39
- package/HashMap/dist/effect-HashMap.cjs.dev.js +4 -4
- package/HashMap/dist/effect-HashMap.cjs.prod.js +4 -4
- package/HashSet/dist/effect-HashSet.cjs.dev.js +4 -4
- package/HashSet/dist/effect-HashSet.cjs.prod.js +4 -4
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +27 -27
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +27 -27
- package/Layer/dist/effect-Layer.cjs.dev.js +30 -30
- package/Layer/dist/effect-Layer.cjs.prod.js +30 -30
- package/List/dist/effect-List.cjs.dev.js +3 -3
- package/List/dist/effect-List.cjs.prod.js +3 -3
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +8 -8
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +8 -8
- package/Logger/dist/effect-Logger.cjs.dev.js +31 -31
- package/Logger/dist/effect-Logger.cjs.prod.js +31 -31
- package/Metric/dist/effect-Metric.cjs.dev.js +25 -25
- package/Metric/dist/effect-Metric.cjs.prod.js +25 -25
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +4 -4
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +4 -4
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +5 -5
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +5 -5
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +6 -6
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +6 -6
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +4 -4
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +4 -4
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +27 -27
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +27 -27
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +7 -7
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +7 -7
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +4 -4
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +4 -4
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +4 -4
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +4 -4
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +3 -3
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +3 -3
- package/Number/dist/effect-Number.cjs.dev.js +1 -1
- package/Number/dist/effect-Number.cjs.prod.js +1 -1
- package/Number/dist/effect-Number.esm.js +1 -1
- package/Option/dist/effect-Option.cjs.dev.js +9 -9
- package/Option/dist/effect-Option.cjs.prod.js +9 -9
- package/Pool/dist/effect-Pool.cjs.dev.js +29 -29
- package/Pool/dist/effect-Pool.cjs.prod.js +29 -29
- package/PubSub/dist/effect-PubSub.cjs.dev.js +26 -26
- package/PubSub/dist/effect-PubSub.cjs.prod.js +26 -26
- package/Queue/dist/effect-Queue.cjs.dev.js +26 -26
- package/Queue/dist/effect-Queue.cjs.prod.js +26 -26
- package/README.md +5 -5
- package/Random/dist/effect-Random.cjs.dev.js +16 -16
- package/Random/dist/effect-Random.cjs.prod.js +16 -16
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +3 -3
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +3 -3
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +3 -3
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +3 -3
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +4 -4
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +4 -4
- package/Ref/dist/effect-Ref.cjs.dev.js +9 -9
- package/Ref/dist/effect-Ref.cjs.prod.js +9 -9
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +34 -34
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +34 -34
- package/Request/dist/effect-Request.cjs.dev.js +26 -26
- package/Request/dist/effect-Request.cjs.prod.js +26 -26
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +34 -34
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +34 -34
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +36 -36
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +36 -36
- package/Resource/dist/effect-Resource.cjs.dev.js +29 -29
- package/Resource/dist/effect-Resource.cjs.prod.js +29 -29
- package/Runtime/dist/effect-Runtime.cjs.dev.js +32 -32
- package/Runtime/dist/effect-Runtime.cjs.prod.js +32 -32
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +31 -31
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +31 -31
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +6 -6
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +6 -6
- package/STM/dist/effect-STM.cjs.dev.js +45 -45
- package/STM/dist/effect-STM.cjs.prod.js +45 -45
- package/Schedule/dist/effect-Schedule.cjs.dev.js +19 -19
- package/Schedule/dist/effect-Schedule.cjs.prod.js +19 -19
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +3 -3
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +3 -3
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +3 -3
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +3 -3
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +3 -3
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +3 -3
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +8 -8
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +8 -8
- package/Scope/dist/effect-Scope.cjs.dev.js +25 -25
- package/Scope/dist/effect-Scope.cjs.prod.js +25 -25
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +57 -40
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +57 -40
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +32 -32
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +32 -32
- package/Sink/dist/effect-Sink.cjs.dev.js +36 -36
- package/Sink/dist/effect-Sink.cjs.prod.js +36 -36
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +3 -3
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +3 -3
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +3 -3
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +3 -3
- package/Stream/dist/effect-Stream.cjs.dev.js +39 -39
- package/Stream/dist/effect-Stream.cjs.prod.js +39 -39
- package/Streamable/dist/effect-Streamable.cjs.dev.js +39 -39
- package/Streamable/dist/effect-Streamable.cjs.prod.js +39 -39
- package/String/dist/effect-String.cjs.dev.js +4 -4
- package/String/dist/effect-String.cjs.prod.js +4 -4
- package/String/dist/effect-String.esm.js +1 -1
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +39 -39
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +39 -39
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +31 -31
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +31 -31
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +28 -28
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +28 -28
- package/TArray/dist/effect-TArray.cjs.dev.js +43 -43
- package/TArray/dist/effect-TArray.cjs.prod.js +43 -43
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +42 -42
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +42 -42
- package/TMap/dist/effect-TMap.cjs.dev.js +44 -44
- package/TMap/dist/effect-TMap.cjs.prod.js +44 -44
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +41 -41
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +41 -41
- package/TPubSub/dist/effect-TPubSub.cjs.dev.js +45 -45
- package/TPubSub/dist/effect-TPubSub.cjs.prod.js +45 -45
- package/TQueue/dist/effect-TQueue.cjs.dev.js +43 -43
- package/TQueue/dist/effect-TQueue.cjs.prod.js +43 -43
- package/TRandom/dist/effect-TRandom.cjs.dev.js +47 -47
- package/TRandom/dist/effect-TRandom.cjs.prod.js +47 -47
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +43 -43
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +43 -43
- package/TRef/dist/effect-TRef.cjs.dev.js +41 -41
- package/TRef/dist/effect-TRef.cjs.prod.js +41 -41
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +42 -42
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +42 -42
- package/TSet/dist/effect-TSet.cjs.dev.js +44 -44
- package/TSet/dist/effect-TSet.cjs.prod.js +44 -44
- package/Take/dist/effect-Take.cjs.dev.js +34 -34
- package/Take/dist/effect-Take.cjs.prod.js +34 -34
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +8 -8
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +8 -8
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +22 -22
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +22 -22
- package/TestClock/dist/effect-TestClock.cjs.dev.js +30 -30
- package/TestClock/dist/effect-TestClock.cjs.prod.js +30 -30
- package/TestConfig/dist/effect-TestConfig.cjs.dev.js +3 -8
- package/TestConfig/dist/effect-TestConfig.cjs.prod.js +3 -8
- package/TestContext/dist/effect-TestContext.cjs.dev.js +35 -35
- package/TestContext/dist/effect-TestContext.cjs.prod.js +35 -35
- package/TestLive/dist/effect-TestLive.cjs.dev.js +17 -17
- package/TestLive/dist/effect-TestLive.cjs.prod.js +17 -17
- package/TestServices/dist/effect-TestServices.cjs.dev.js +36 -36
- package/TestServices/dist/effect-TestServices.cjs.prod.js +36 -36
- package/TestSized/dist/effect-TestSized.cjs.dev.js +11 -11
- package/TestSized/dist/effect-TestSized.cjs.prod.js +11 -11
- package/Tracer/dist/effect-Tracer.cjs.dev.js +16 -16
- package/Tracer/dist/effect-Tracer.cjs.prod.js +16 -16
- package/dist/{Context-0b0d0e29.cjs.prod.js → Context-9fe5eb16.cjs.prod.js} +4 -4
- package/dist/{Context-1f857844.cjs.dev.js → Context-da73ddfa.cjs.dev.js} +4 -4
- package/dist/{Effectable-07258ce9.cjs.dev.js → Effectable-7314aed8.cjs.dev.js} +53 -2
- package/dist/{Effectable-c2cd2b50.cjs.prod.js → Effectable-c4c14a2b.cjs.prod.js} +53 -2
- package/dist/{Either-a974e241.cjs.prod.js → Either-d43f082c.cjs.prod.js} +5 -78
- package/dist/{Either-d49a9926.cjs.dev.js → Either-fa0ef1d9.cjs.dev.js} +5 -78
- package/dist/Option-463b42e6.cjs.dev.js +81 -0
- package/dist/Option-935e5d7c.cjs.prod.js +81 -0
- package/dist/{Ref-590d873e.cjs.prod.js → Ref-4014b526.cjs.prod.js} +1 -1
- package/dist/{Ref-4009db78.cjs.dev.js → Ref-acdee7ef.cjs.dev.js} +1 -1
- package/dist/{cache-8a5a4a2d.cjs.prod.js → cache-5c7d77e4.cjs.prod.js} +8 -8
- package/dist/{cache-fe0cd2f2.cjs.dev.js → cache-7eed9d33.cjs.dev.js} +8 -8
- package/dist/{circular-ccfbed47.cjs.prod.js → circular-1f481ffb.cjs.prod.js} +7 -7
- package/dist/{circular-2d1d95bc.cjs.prod.js → circular-9e10a5a7.cjs.prod.js} +4 -4
- package/dist/{circular-95bf2834.cjs.dev.js → circular-c2dbce1a.cjs.dev.js} +7 -7
- package/dist/{circular-325c6904.cjs.dev.js → circular-c8b65bdb.cjs.dev.js} +4 -4
- package/dist/{config-e4643c63.cjs.dev.js → config-3b7935a3.cjs.dev.js} +3 -3
- package/dist/{config-a72429ce.cjs.prod.js → config-5ba54da1.cjs.prod.js} +3 -3
- package/dist/{configProvider-16bc7ff6.cjs.prod.js → configProvider-b6b20998.cjs.prod.js} +4 -4
- package/dist/{configProvider-3cdbe5f3.cjs.dev.js → configProvider-f34a82f1.cjs.dev.js} +4 -4
- package/dist/{core-c87f1ac0.cjs.prod.js → core-07202cc0.cjs.prod.js} +4 -19
- package/dist/{core-ce4f24fc.cjs.prod.js → core-7411d1e1.cjs.prod.js} +3 -3
- package/dist/{core-efee9c5a.cjs.dev.js → core-b7401357.cjs.dev.js} +4 -19
- package/dist/{core-44c23eaf.cjs.dev.js → core-c5747f88.cjs.dev.js} +3 -3
- package/dist/{core-effect-f99b558c.cjs.dev.js → core-effect-1c564d42.cjs.dev.js} +8 -8
- package/dist/{core-effect-867f1514.cjs.prod.js → core-effect-9201ea63.cjs.prod.js} +8 -8
- package/dist/{dataSource-642004b6.cjs.dev.js → dataSource-b5eda714.cjs.dev.js} +2 -2
- package/dist/{dataSource-2fe48092.cjs.prod.js → dataSource-b83bc277.cjs.prod.js} +2 -2
- package/dist/declarations/src/Bigint.d.ts +92 -1
- package/dist/declarations/src/Bigint.d.ts.map +1 -1
- package/dist/declarations/src/Boolean.d.ts +1 -1
- package/dist/declarations/src/Data.d.ts +30 -0
- package/dist/declarations/src/Data.d.ts.map +1 -1
- package/dist/declarations/src/Number.d.ts +1 -1
- package/dist/declarations/src/String.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +4 -8
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/{defaultServices-eb04fba1.cjs.dev.js → defaultServices-755d5b46.cjs.dev.js} +2 -2
- package/dist/{defaultServices-7e943cae.cjs.prod.js → defaultServices-9d7ce86f.cjs.prod.js} +2 -2
- package/dist/effect.cjs.dev.js +0 -3
- package/dist/effect.cjs.mjs +0 -1
- package/dist/effect.cjs.prod.js +0 -3
- package/dist/effect.esm.js +0 -2
- package/dist/{fiber-4d2acba3.cjs.dev.js → fiber-5156eff2.cjs.dev.js} +3 -3
- package/dist/{fiber-588d28c2.cjs.prod.js → fiber-9519d109.cjs.prod.js} +3 -3
- package/dist/{fiberRefs-51f2a630.cjs.prod.js → fiberRefs-558c17e6.cjs.prod.js} +1 -1
- package/dist/{fiberRefs-e08092fb.cjs.dev.js → fiberRefs-98b71233.cjs.dev.js} +1 -1
- package/dist/{fiberRuntime-7287c284.cjs.prod.js → fiberRuntime-31ae011f.cjs.prod.js} +17 -18
- package/dist/{fiberRuntime-6e93adff.cjs.dev.js → fiberRuntime-d3872282.cjs.dev.js} +17 -18
- package/dist/{groupBy-6d5815f3.cjs.prod.js → groupBy-724f64ef.cjs.prod.js} +4 -4
- package/dist/{groupBy-1e05ffd4.cjs.dev.js → groupBy-862cc2da.cjs.dev.js} +4 -4
- package/dist/{key-6d9b350e.cjs.dev.js → key-198b6670.cjs.dev.js} +1 -1
- package/dist/{key-66f61406.cjs.prod.js → key-eb8a12b2.cjs.prod.js} +1 -1
- package/dist/{layer-e3745d23.cjs.dev.js → layer-29574350.cjs.dev.js} +10 -10
- package/dist/{layer-f8cd3f83.cjs.prod.js → layer-51ff4846.cjs.prod.js} +10 -10
- package/dist/{patch-b051ae7e.cjs.dev.js → patch-0220a642.cjs.dev.js} +1 -1
- package/dist/{patch-b8d22fb3.cjs.prod.js → patch-7c559bb2.cjs.prod.js} +1 -1
- package/dist/{pathPatch-bdcb0e3f.cjs.prod.js → pathPatch-b56a4da2.cjs.prod.js} +1 -1
- package/dist/{pathPatch-fc0ba157.cjs.dev.js → pathPatch-fab016f1.cjs.dev.js} +1 -1
- package/dist/{pool-a52582b9.cjs.dev.js → pool-3211287f.cjs.dev.js} +5 -5
- package/dist/{pool-6c034854.cjs.prod.js → pool-f77d7705.cjs.prod.js} +5 -5
- package/dist/{query-59d346d8.cjs.prod.js → query-a52b25f0.cjs.prod.js} +3 -3
- package/dist/{query-ab3d963c.cjs.dev.js → query-c36decd5.cjs.dev.js} +3 -3
- package/dist/{queue-fcd6126f.cjs.prod.js → queue-315ea45d.cjs.prod.js} +2 -2
- package/dist/{queue-50c41726.cjs.dev.js → queue-7a223c44.cjs.dev.js} +2 -2
- package/dist/{registry-fc4cef7b.cjs.dev.js → registry-62ff192e.cjs.dev.js} +2 -2
- package/dist/{registry-3809a602.cjs.prod.js → registry-d5258dff.cjs.prod.js} +2 -2
- package/dist/{runtime-aa083fe4.cjs.prod.js → runtime-005f8a9b.cjs.prod.js} +6 -6
- package/dist/{runtime-9047860e.cjs.dev.js → runtime-57c8ddf8.cjs.dev.js} +6 -6
- package/dist/{schedule-4ca6941d.cjs.prod.js → schedule-8cdf6bf1.cjs.prod.js} +3 -3
- package/dist/{schedule-fd323904.cjs.dev.js → schedule-e7a9f93f.cjs.dev.js} +3 -3
- package/dist/{scopedRef-0fc8943d.cjs.prod.js → scopedRef-789d7fef.cjs.prod.js} +6 -6
- package/dist/{scopedRef-dc386056.cjs.dev.js → scopedRef-eb19c7a6.cjs.dev.js} +6 -6
- package/dist/{singleProducerAsyncInput-54b43c1b.cjs.dev.js → singleProducerAsyncInput-9ff8389b.cjs.dev.js} +1 -1
- package/dist/{singleProducerAsyncInput-61ffe143.cjs.prod.js → singleProducerAsyncInput-f9b258b1.cjs.prod.js} +1 -1
- package/dist/{sink-ade4fdbe.cjs.prod.js → sink-572d8981.cjs.prod.js} +2 -2
- package/dist/{sink-0445fb11.cjs.dev.js → sink-8d3427e7.cjs.dev.js} +2 -2
- package/dist/{stm-e9d8effb.cjs.dev.js → stm-8aca0022.cjs.dev.js} +3 -3
- package/dist/{stm-8d082310.cjs.prod.js → stm-f250b596.cjs.prod.js} +3 -3
- package/dist/{stream-e220a3b2.cjs.dev.js → stream-34d80d2c.cjs.dev.js} +4 -4
- package/dist/{stream-97061dd9.cjs.prod.js → stream-ea4f4d44.cjs.prod.js} +4 -4
- package/dist/{synchronizedRef-1f28b27f.cjs.dev.js → synchronizedRef-a12fd967.cjs.dev.js} +1 -1
- package/dist/{synchronizedRef-ff0ddebf.cjs.prod.js → synchronizedRef-ed8aa6ac.cjs.prod.js} +1 -1
- package/dist/{tArray-59a819a0.cjs.dev.js → tArray-17f078f2.cjs.dev.js} +3 -3
- package/dist/{tArray-437f6510.cjs.prod.js → tArray-d184e22f.cjs.prod.js} +3 -3
- package/dist/{tMap-d6376d13.cjs.dev.js → tMap-1a5aa78b.cjs.dev.js} +4 -4
- package/dist/{tMap-ca06b00f.cjs.prod.js → tMap-e219f30e.cjs.prod.js} +4 -4
- package/dist/{tQueue-7b931af8.cjs.dev.js → tQueue-0a4fc773.cjs.dev.js} +3 -3
- package/dist/{tQueue-bf3716af.cjs.prod.js → tQueue-47129ad0.cjs.prod.js} +3 -3
- package/dist/{tRef-bb143111.cjs.prod.js → tRef-ab4c5713.cjs.prod.js} +1 -1
- package/dist/{tRef-5b159626.cjs.dev.js → tRef-b860ef05.cjs.dev.js} +1 -1
- package/internal/Context.esm.js +2 -2
- package/internal/Data.esm.js +4 -1
- package/internal/Differ/ChunkPatch.esm.js +1 -1
- package/internal/Differ/ContextPatch.esm.js +1 -1
- package/internal/Differ/HashMapPatch.esm.js +1 -1
- package/internal/Differ/HashSetPatch.esm.js +1 -1
- package/internal/Differ/OrPatch.esm.js +1 -1
- package/internal/Effectable.esm.js +1 -1
- package/internal/cache.esm.js +1 -1
- package/internal/cause.esm.js +1 -16
- package/internal/core-effect.esm.js +3 -3
- package/internal/fiberRuntime.esm.js +3 -3
- package/internal/layer.esm.js +1 -1
- package/internal/request.esm.js +1 -1
- package/package.json +5 -9
- package/src/Bigint.ts +117 -1
- package/src/Boolean.ts +1 -1
- package/src/Data.ts +74 -2
- package/src/Number.ts +1 -1
- package/src/String.ts +1 -1
- package/src/index.ts +4 -9
- package/src/internal/Context.ts +2 -2
- package/src/internal/Data.ts +4 -0
- package/src/internal/Differ/ChunkPatch.ts +1 -1
- package/src/internal/Differ/ContextPatch.ts +1 -1
- package/src/internal/Differ/HashMapPatch.ts +1 -1
- package/src/internal/Differ/HashSetPatch.ts +1 -1
- package/src/internal/Differ/OrPatch.ts +1 -1
- package/src/internal/Effectable.ts +1 -1
- package/src/internal/cache.ts +1 -1
- package/src/internal/cause.ts +1 -16
- package/src/internal/core-effect.ts +2 -2
- package/src/internal/fiberRuntime.ts +2 -2
- package/src/internal/layer.ts +1 -1
- package/src/internal/request.ts +1 -1
- package/Error/dist/effect-Error.cjs.d.mts +0 -2
- package/Error/dist/effect-Error.cjs.d.mts.map +0 -1
- package/Error/dist/effect-Error.cjs.d.ts +0 -2
- package/Error/dist/effect-Error.cjs.d.ts.map +0 -1
- package/Error/dist/effect-Error.cjs.dev.js +0 -140
- package/Error/dist/effect-Error.cjs.js +0 -7
- package/Error/dist/effect-Error.cjs.mjs +0 -4
- package/Error/dist/effect-Error.cjs.prod.js +0 -140
- package/Error/dist/effect-Error.esm.js +0 -47
- package/Error/package.json +0 -4
- package/dist/declarations/src/Error.d.ts +0 -37
- package/dist/declarations/src/Error.d.ts.map +0 -1
- package/src/Error.ts +0 -69
- /package/dist/{FiberId-fd1b9201.cjs.prod.js → FiberId-1d7ac632.cjs.prod.js} +0 -0
- /package/dist/{FiberId-9c555b91.cjs.dev.js → FiberId-d88ddce6.cjs.dev.js} +0 -0
- /package/dist/{HashSet-606682d1.cjs.dev.js → HashSet-5963ad6b.cjs.dev.js} +0 -0
- /package/dist/{HashSet-0ffa0e48.cjs.prod.js → HashSet-ac02a3e1.cjs.prod.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-197be4f3.cjs.dev.js → RuntimeFlagsPatch-69102b03.cjs.dev.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-7f853fa5.cjs.prod.js → RuntimeFlagsPatch-866fa259.cjs.prod.js} +0 -0
- /package/dist/{boundaries-73dd633f.cjs.prod.js → boundaries-9af538e3.cjs.prod.js} +0 -0
- /package/dist/{boundaries-60c435b8.cjs.dev.js → boundaries-f212e414.cjs.dev.js} +0 -0
- /package/dist/{configError-d2914327.cjs.prod.js → configError-b43723af.cjs.prod.js} +0 -0
- /package/dist/{configError-623ccb8d.cjs.dev.js → configError-d5efe9c0.cjs.dev.js} +0 -0
- /package/dist/{configSecret-baa8839f.cjs.dev.js → configSecret-3e8ae336.cjs.dev.js} +0 -0
- /package/dist/{configSecret-c08c317d.cjs.prod.js → configSecret-e2faa181.cjs.prod.js} +0 -0
- /package/dist/{hook-f9a9b660.cjs.dev.js → hook-8cefc909.cjs.dev.js} +0 -0
- /package/dist/{hook-39ebe8b3.cjs.prod.js → hook-98ce30e4.cjs.prod.js} +0 -0
- /package/dist/{keyType-8ff33fde.cjs.prod.js → keyType-0c5e6178.cjs.prod.js} +0 -0
- /package/dist/{keyType-22634b88.cjs.dev.js → keyType-7c164b82.cjs.dev.js} +0 -0
- /package/dist/{take-c7b73760.cjs.prod.js → take-85daaf79.cjs.prod.js} +0 -0
- /package/dist/{take-05b33c5b.cjs.dev.js → take-f9ef9e2e.cjs.dev.js} +0 -0
|
@@ -18,15 +18,15 @@ var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js'
|
|
|
18
18
|
var Pipeable_dist_effectPipeable = require('../Pipeable/dist/effect-Pipeable.cjs.dev.js');
|
|
19
19
|
var PubSub_dist_effectPubSub = require('../PubSub/dist/effect-PubSub.cjs.dev.js');
|
|
20
20
|
var Queue_dist_effectQueue = require('../Queue/dist/effect-Queue.cjs.dev.js');
|
|
21
|
-
var Ref_dist_effectRef = require('./Ref-
|
|
21
|
+
var Ref_dist_effectRef = require('./Ref-acdee7ef.cjs.dev.js');
|
|
22
22
|
var Runtime_dist_effectRuntime = require('../Runtime/dist/effect-Runtime.cjs.dev.js');
|
|
23
23
|
var Schedule_dist_effectSchedule = require('../Schedule/dist/effect-Schedule.cjs.dev.js');
|
|
24
24
|
var Scope_dist_effectScope = require('../Scope/dist/effect-Scope.cjs.dev.js');
|
|
25
25
|
var StreamHaltStrategy_dist_effectStreamHaltStrategy = require('./StreamHaltStrategy-9a61b88d.cjs.dev.js');
|
|
26
|
-
var sink = require('./sink-
|
|
26
|
+
var sink = require('./sink-8d3427e7.cjs.dev.js');
|
|
27
27
|
var mergeStrategy = require('./mergeStrategy-81ea5b80.cjs.dev.js');
|
|
28
|
-
var singleProducerAsyncInput = require('./singleProducerAsyncInput-
|
|
29
|
-
var take$2 = require('./take-
|
|
28
|
+
var singleProducerAsyncInput = require('./singleProducerAsyncInput-9ff8389b.cjs.dev.js');
|
|
29
|
+
var take$2 = require('./take-f9ef9e2e.cjs.dev.js');
|
|
30
30
|
|
|
31
31
|
/** @internal */
|
|
32
32
|
class RingBuffer {
|
|
@@ -18,15 +18,15 @@ var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js
|
|
|
18
18
|
var Pipeable_dist_effectPipeable = require('../Pipeable/dist/effect-Pipeable.cjs.prod.js');
|
|
19
19
|
var PubSub_dist_effectPubSub = require('../PubSub/dist/effect-PubSub.cjs.prod.js');
|
|
20
20
|
var Queue_dist_effectQueue = require('../Queue/dist/effect-Queue.cjs.prod.js');
|
|
21
|
-
var Ref_dist_effectRef = require('./Ref-
|
|
21
|
+
var Ref_dist_effectRef = require('./Ref-4014b526.cjs.prod.js');
|
|
22
22
|
var Runtime_dist_effectRuntime = require('../Runtime/dist/effect-Runtime.cjs.prod.js');
|
|
23
23
|
var Schedule_dist_effectSchedule = require('../Schedule/dist/effect-Schedule.cjs.prod.js');
|
|
24
24
|
var Scope_dist_effectScope = require('../Scope/dist/effect-Scope.cjs.prod.js');
|
|
25
25
|
var StreamHaltStrategy_dist_effectStreamHaltStrategy = require('./StreamHaltStrategy-b495622b.cjs.prod.js');
|
|
26
|
-
var sink = require('./sink-
|
|
26
|
+
var sink = require('./sink-572d8981.cjs.prod.js');
|
|
27
27
|
var mergeStrategy = require('./mergeStrategy-3dd6e55f.cjs.prod.js');
|
|
28
|
-
var singleProducerAsyncInput = require('./singleProducerAsyncInput-
|
|
29
|
-
var take$2 = require('./take-
|
|
28
|
+
var singleProducerAsyncInput = require('./singleProducerAsyncInput-f9b258b1.cjs.prod.js');
|
|
29
|
+
var take$2 = require('./take-85daaf79.cjs.prod.js');
|
|
30
30
|
|
|
31
31
|
/** @internal */
|
|
32
32
|
class RingBuffer {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
4
|
-
var core = require('./core-
|
|
4
|
+
var core = require('./core-b7401357.cjs.dev.js');
|
|
5
5
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
4
|
-
var core = require('./core-
|
|
4
|
+
var core = require('./core-07202cc0.cjs.prod.js');
|
|
5
5
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.dev.js');
|
|
4
4
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
5
|
-
var core = require('./core-
|
|
6
|
-
var stm = require('./stm-
|
|
7
|
-
var tRef = require('./tRef-
|
|
5
|
+
var core = require('./core-c5747f88.cjs.dev.js');
|
|
6
|
+
var stm = require('./stm-8aca0022.cjs.dev.js');
|
|
7
|
+
var tRef = require('./tRef-b860ef05.cjs.dev.js');
|
|
8
8
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
9
9
|
var Order_dist_effectOrder = require('../Order/dist/effect-Order.cjs.dev.js');
|
|
10
10
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.prod.js');
|
|
4
4
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
5
|
-
var core = require('./core-
|
|
6
|
-
var stm = require('./stm-
|
|
7
|
-
var tRef = require('./tRef-
|
|
5
|
+
var core = require('./core-7411d1e1.cjs.prod.js');
|
|
6
|
+
var stm = require('./stm-f250b596.cjs.prod.js');
|
|
7
|
+
var tRef = require('./tRef-ab4c5713.cjs.prod.js');
|
|
8
8
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
9
9
|
var Order_dist_effectOrder = require('../Order/dist/effect-Order.cjs.prod.js');
|
|
10
10
|
|
|
@@ -5,10 +5,10 @@ var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.dev.js');
|
|
|
5
5
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
6
6
|
var Hash_dist_effectHash = require('../Hash/dist/effect-Hash.cjs.dev.js');
|
|
7
7
|
var HashMap_dist_effectHashMap = require('../HashMap/dist/effect-HashMap.cjs.dev.js');
|
|
8
|
-
var core = require('./core-
|
|
9
|
-
var stm = require('./stm-
|
|
10
|
-
var tArray = require('./tArray-
|
|
11
|
-
var tRef = require('./tRef-
|
|
8
|
+
var core = require('./core-c5747f88.cjs.dev.js');
|
|
9
|
+
var stm = require('./stm-8aca0022.cjs.dev.js');
|
|
10
|
+
var tArray = require('./tArray-17f078f2.cjs.dev.js');
|
|
11
|
+
var tRef = require('./tRef-b860ef05.cjs.dev.js');
|
|
12
12
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
13
13
|
var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js');
|
|
14
14
|
var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.dev.js');
|
|
@@ -5,10 +5,10 @@ var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.prod.js');
|
|
|
5
5
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
6
6
|
var Hash_dist_effectHash = require('../Hash/dist/effect-Hash.cjs.prod.js');
|
|
7
7
|
var HashMap_dist_effectHashMap = require('../HashMap/dist/effect-HashMap.cjs.prod.js');
|
|
8
|
-
var core = require('./core-
|
|
9
|
-
var stm = require('./stm-
|
|
10
|
-
var tArray = require('./tArray-
|
|
11
|
-
var tRef = require('./tRef-
|
|
8
|
+
var core = require('./core-7411d1e1.cjs.prod.js');
|
|
9
|
+
var stm = require('./stm-f250b596.cjs.prod.js');
|
|
10
|
+
var tArray = require('./tArray-d184e22f.cjs.prod.js');
|
|
11
|
+
var tRef = require('./tRef-ab4c5713.cjs.prod.js');
|
|
12
12
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
13
13
|
var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js');
|
|
14
14
|
var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.prod.js');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Chunk_dist_effectChunk = require('../Chunk/dist/effect-Chunk.cjs.dev.js');
|
|
4
4
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
5
|
-
var core = require('./core-
|
|
6
|
-
var stm = require('./stm-
|
|
7
|
-
var tRef = require('./tRef-
|
|
5
|
+
var core = require('./core-c5747f88.cjs.dev.js');
|
|
6
|
+
var stm = require('./stm-8aca0022.cjs.dev.js');
|
|
7
|
+
var tRef = require('./tRef-b860ef05.cjs.dev.js');
|
|
8
8
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
9
9
|
var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js');
|
|
10
10
|
var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.dev.js');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Chunk_dist_effectChunk = require('../Chunk/dist/effect-Chunk.cjs.prod.js');
|
|
4
4
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
5
|
-
var core = require('./core-
|
|
6
|
-
var stm = require('./stm-
|
|
7
|
-
var tRef = require('./tRef-
|
|
5
|
+
var core = require('./core-7411d1e1.cjs.prod.js');
|
|
6
|
+
var stm = require('./stm-f250b596.cjs.prod.js');
|
|
7
|
+
var tRef = require('./tRef-ab4c5713.cjs.prod.js');
|
|
8
8
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
9
9
|
var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js');
|
|
10
10
|
var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.prod.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
4
|
-
var core = require('./core-
|
|
4
|
+
var core = require('./core-7411d1e1.cjs.prod.js');
|
|
5
5
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
4
|
-
var core = require('./core-
|
|
4
|
+
var core = require('./core-c5747f88.cjs.dev.js');
|
|
5
5
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
package/internal/Context.esm.js
CHANGED
|
@@ -3,9 +3,9 @@ import { dual } from '../Function/dist/effect-Function.esm.js';
|
|
|
3
3
|
import { globalValue } from '../GlobalValue/dist/effect-GlobalValue.esm.js';
|
|
4
4
|
import { symbol as symbol$1, number } from '../Hash/dist/effect-Hash.esm.js';
|
|
5
5
|
import { toString, NodeInspectSymbol, toJSON } from '../Inspectable/dist/effect-Inspectable.esm.js';
|
|
6
|
-
import { none, some } from '../Option/dist/effect-Option.esm.js';
|
|
7
6
|
import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
|
|
8
7
|
import { EffectPrototype, effectVariance } from './Effectable.esm.js';
|
|
8
|
+
import { none, some } from './Option.esm.js';
|
|
9
9
|
|
|
10
10
|
/** @internal */
|
|
11
11
|
const TagTypeId = /*#__PURE__*/Symbol.for("effect/Context/Tag");
|
|
@@ -170,7 +170,7 @@ const get = unsafeGet;
|
|
|
170
170
|
/** @internal */
|
|
171
171
|
const getOption = /*#__PURE__*/dual(2, (self, tag) => {
|
|
172
172
|
if (!self.unsafeMap.has(tag)) {
|
|
173
|
-
return none
|
|
173
|
+
return none;
|
|
174
174
|
}
|
|
175
175
|
return some(self.unsafeMap.get(tag));
|
|
176
176
|
});
|
package/internal/Data.esm.js
CHANGED
|
@@ -46,4 +46,7 @@ const Structural = /*#__PURE__*/function () {
|
|
|
46
46
|
return Structural;
|
|
47
47
|
}();
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
/** @internal */
|
|
50
|
+
const struct = as => Object.assign(Object.create(StructProto), as);
|
|
51
|
+
|
|
52
|
+
export { ArrayProto, StructProto, Structural, struct };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unsafeGet, drop, of, isNonEmpty, headNonEmpty, tailNonEmpty, toReadonlyArray, unsafeFromArray, appendAll, prepend } from '../../Chunk/dist/effect-Chunk.esm.js';
|
|
2
|
-
import { Structural } from '
|
|
2
|
+
import { Structural } from '../Data.esm.js';
|
|
3
3
|
import { equals } from '../../Equal/dist/effect-Equal.esm.js';
|
|
4
4
|
import { pipe, dual } from '../../Function/dist/effect-Function.esm.js';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { of, isNonEmpty, headNonEmpty, tailNonEmpty, prepend } from '../../Chunk/dist/effect-Chunk.esm.js';
|
|
2
|
-
import { Structural } from '../../Data/dist/effect-Data.esm.js';
|
|
3
2
|
import { equals } from '../../Equal/dist/effect-Equal.esm.js';
|
|
4
3
|
import { dual } from '../../Function/dist/effect-Function.esm.js';
|
|
5
4
|
import { makeContext } from '../Context.esm.js';
|
|
5
|
+
import { Structural } from '../Data.esm.js';
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
const ContextPatchTypeId = /*#__PURE__*/Symbol.for("effect/DifferContextPatch");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { of, isNonEmpty, headNonEmpty, tailNonEmpty, prepend } from '../../Chunk/dist/effect-Chunk.esm.js';
|
|
2
|
-
import { Structural } from '../../Data/dist/effect-Data.esm.js';
|
|
3
2
|
import { equals } from '../../Equal/dist/effect-Equal.esm.js';
|
|
4
3
|
import { dual } from '../../Function/dist/effect-Function.esm.js';
|
|
5
4
|
import { reduce, get, remove, set } from '../../HashMap/dist/effect-HashMap.esm.js';
|
|
5
|
+
import { Structural } from '../Data.esm.js';
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
const HashMapPatchTypeId = /*#__PURE__*/Symbol.for("effect/DifferHashMapPatch");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { of, isNonEmpty, headNonEmpty, tailNonEmpty, prepend } from '../../Chunk/dist/effect-Chunk.esm.js';
|
|
2
|
-
import { Structural } from '
|
|
2
|
+
import { Structural } from '../Data.esm.js';
|
|
3
3
|
import { dual } from '../../Function/dist/effect-Function.esm.js';
|
|
4
4
|
import { reduce, has, remove, add } from '../../HashSet/dist/effect-HashSet.esm.js';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { of, isNonEmpty, headNonEmpty, tailNonEmpty, prepend } from '../../Chunk/dist/effect-Chunk.esm.js';
|
|
2
|
-
import { Structural } from '../../Data/dist/effect-Data.esm.js';
|
|
3
2
|
import { right, left } from '../../Either/dist/effect-Either.esm.js';
|
|
4
3
|
import { equals } from '../../Equal/dist/effect-Equal.esm.js';
|
|
5
4
|
import { dual } from '../../Function/dist/effect-Function.esm.js';
|
|
5
|
+
import { Structural } from '../Data.esm.js';
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
const OrPatchTypeId = /*#__PURE__*/Symbol.for("effect/DifferOrPatch");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Structural } from '../Data/dist/effect-Data.esm.js';
|
|
2
1
|
import { symbol } from '../Equal/dist/effect-Equal.esm.js';
|
|
3
2
|
import { symbol as symbol$1, random } from '../Hash/dist/effect-Hash.esm.js';
|
|
4
3
|
import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
|
|
4
|
+
import { Structural } from './Data.esm.js';
|
|
5
5
|
import { OP_COMMIT } from './opCodes/effect.esm.js';
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
package/internal/cache.esm.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { empty as empty$1 } from '../Context/dist/effect-Context.esm.js';
|
|
2
|
-
import { struct } from '../Data/dist/effect-Data.esm.js';
|
|
3
2
|
import { unsafeMake, await as _await, interrupt, done } from '../Deferred/dist/effect-Deferred.esm.js';
|
|
4
3
|
import { decode, toMillis } from '../Duration/dist/effect-Duration.esm.js';
|
|
5
4
|
import { merge, right, left } from '../Either/dist/effect-Either.esm.js';
|
|
@@ -13,6 +12,7 @@ import { compareAndSet, set as set$1, make as make$1 } from '../MutableRef/dist/
|
|
|
13
12
|
import { match, none, isSome, some, getOrUndefined } from '../Option/dist/effect-Option.esm.js';
|
|
14
13
|
import { map, context, fiberId, sync, suspend, succeed, flatMap, asUnit, onInterrupt, zipRight, exit, provideContext } from './core.esm.js';
|
|
15
14
|
import { clockWith, when } from './core-effect.esm.js';
|
|
15
|
+
import { struct } from './Data.esm.js';
|
|
16
16
|
import { none as none$1 } from './fiberId.esm.js';
|
|
17
17
|
import { all } from './fiberRuntime.esm.js';
|
|
18
18
|
|
package/internal/cause.esm.js
CHANGED
|
@@ -1024,28 +1024,13 @@ const prettyErrorMessage = u => {
|
|
|
1024
1024
|
return u["toString"]();
|
|
1025
1025
|
}
|
|
1026
1026
|
// 3)
|
|
1027
|
-
if (typeof u === "object" && u !== null) {
|
|
1028
|
-
if ("message" in u && typeof u["message"] === "string") {
|
|
1029
|
-
const raw = JSON.parse(JSON.stringify(u));
|
|
1030
|
-
const keys = new Set(Object.keys(raw));
|
|
1031
|
-
keys.delete("name");
|
|
1032
|
-
keys.delete("message");
|
|
1033
|
-
keys.delete("_tag");
|
|
1034
|
-
if (keys.size === 0) {
|
|
1035
|
-
const name = "name" in u && typeof u.name === "string" ? u.name : "Error";
|
|
1036
|
-
const tag = "_tag" in u && typeof u["_tag"] === "string" ? `(${u._tag})` : ``;
|
|
1037
|
-
return `${name}${tag}: ${u.message}`;
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
// 4)
|
|
1042
1027
|
return `Error: ${JSON.stringify(u)}`;
|
|
1043
1028
|
};
|
|
1044
1029
|
const spanSymbol = /*#__PURE__*/Symbol.for("effect/SpanAnnotation");
|
|
1045
1030
|
const defaultRenderError = error => {
|
|
1046
1031
|
const span = typeof error === "object" && error !== null && spanSymbol in error && error[spanSymbol];
|
|
1047
1032
|
if (typeof error === "object" && error !== null && error instanceof Error) {
|
|
1048
|
-
return new PrettyError(prettyErrorMessage(error), error.stack?.split("\n").filter(_ =>
|
|
1033
|
+
return new PrettyError(prettyErrorMessage(error), error.stack?.split("\n").filter(_ => _.match(/at (.*)/)).join("\n"), span);
|
|
1049
1034
|
}
|
|
1050
1035
|
return new PrettyError(prettyErrorMessage(error), void 0, span);
|
|
1051
1036
|
};
|
|
@@ -9,7 +9,7 @@ import { dual, identity, constVoid, constTrue, constFalse, pipe } from '../Funct
|
|
|
9
9
|
import { set, forEach } from '../HashMap/dist/effect-HashMap.esm.js';
|
|
10
10
|
import { fromIterable as fromIterable$1, union, size } from '../HashSet/dist/effect-HashSet.esm.js';
|
|
11
11
|
import { fail, find, isDieType, empty, failures, failureOrCause, keepDefects, flatten, NoSuchElementException, isNoSuchElementException, interruptors, IllegalArgumentException, isCause } from './cause.esm.js';
|
|
12
|
-
import { fiberRefLocallyWith, currentLogAnnotations, isEffect, map, mapError, asyncEither, unit, sync, makeEffectError, catchAll, fail as fail$1, catchAllCause, unified, failCause, matchCauseEffect, succeed, catchIf, matchCause, zipRight, withFiberRuntime, flatMap, suspend, context, orElse, yieldNow, dieSync, dieMessage, failSync, flip, matchEffect, currentLogSpan, fiberRefGet, failCauseSync, intoDeferred, deferredAwait, as, zip, updateRuntimeFlags, deferredMake, asUnit, whenEffect, async, contextWithEffect, provideContext, currentMetricLabels, mapInputContext, currentTracerSpanAnnotations, currentTracerSpan, currentTracerSpanLinks, acquireUseRelease, currentInterruptedCause, interrupt, runtimeFlags, fiberRefGetWith, currentTracerTimingEnabled, exitSucceed, exitDie
|
|
12
|
+
import { fiberRefLocallyWith, currentLogAnnotations, isEffect, map, mapError, asyncEither, unit, sync, makeEffectError, catchAll, fail as fail$1, catchAllCause, unified, failCause, matchCauseEffect, succeed, catchIf, matchCause, zipRight, withFiberRuntime, flatMap, suspend, context, orElse, yieldNow, dieSync, dieMessage, failSync, flip, matchEffect, currentLogSpan, fiberRefGet, failCauseSync, intoDeferred, deferredAwait, as, zip, updateRuntimeFlags, deferredMake, asUnit, whenEffect, async, contextWithEffect, provideContext, currentMetricLabels, mapInputContext, currentTracerSpanAnnotations, currentTracerSpan, currentTracerSpanLinks, acquireUseRelease, currentInterruptedCause, interrupt, runtimeFlags, fiberRefGetWith, currentTracerTimingEnabled, exitSucceed, exitDie } from './core.esm.js';
|
|
13
13
|
import { randomWith } from './defaultServices.esm.js';
|
|
14
14
|
import { diff, patch } from './fiberRefs/patch.esm.js';
|
|
15
15
|
import { make as make$2 } from './metric/label.esm.js';
|
|
@@ -718,13 +718,13 @@ const tryPromise = arg => {
|
|
|
718
718
|
return suspend(() => {
|
|
719
719
|
const controller = new AbortController();
|
|
720
720
|
return flatMap(try_(() => evaluate(controller.signal)), promise => async(resolve => {
|
|
721
|
-
promise.then(a => resolve(exitSucceed(a))).catch(e => resolve(
|
|
721
|
+
promise.then(a => resolve(exitSucceed(a))).catch(e => resolve(fail$1(catcher ? catcher(e) : e)));
|
|
722
722
|
return sync(() => controller.abort());
|
|
723
723
|
}));
|
|
724
724
|
});
|
|
725
725
|
}
|
|
726
726
|
return flatMap(try_(arg), promise => async(resolve => {
|
|
727
|
-
promise.then(a => resolve(exitSucceed(a))).catch(e => resolve(
|
|
727
|
+
promise.then(a => resolve(exitSucceed(a))).catch(e => resolve(fail$1(catcher ? catcher(e) : e)));
|
|
728
728
|
}));
|
|
729
729
|
};
|
|
730
730
|
|
|
@@ -15,7 +15,7 @@ import { clockTag } from './clock.esm.js';
|
|
|
15
15
|
import { currentRequestMap } from './completedRequestMap.esm.js';
|
|
16
16
|
import { matchSimple, match as match$1 } from './concurrency.esm.js';
|
|
17
17
|
import { configProviderTag } from './configProvider.esm.js';
|
|
18
|
-
import { fiberRefUnsafeMake, currentTracerSpan, fiberRefUnsafeMakeHashSet, uninterruptible, tap, isEffect, withFiberRuntime, fiberRefLocally, currentForkScopeOverride, map as map$1, exit, exitIsSuccess, onError, failCause, partitionMap, either, flatMap as flatMap$1, unit, succeed, fail, dieSync, uninterruptibleMask, interruptible, forEachSequential, zipRight, asUnit, onInterrupt, zipLeft, interruptFiber, deferredMake, exitMatchEffect, flatten, deferredFailCause, deferredSucceed, contextWithEffect, scopeFork, currentMetricLabels, acquireUseRelease, scopeClose, exitZipWith, flip, fiberIdWith, updateRuntimeFlags, runtimeFlags, ScopeTypeId, releaseMapMake, CloseableScopeTypeId, releaseMapAdd, scopeAddFinalizerExit, as, mapInputContext, onExit, fiberRefUnsafeMakePatch, fiberRefGet, fiberRefSet, fiberRefGetWith, sync, fiberRefUpdate, fiberRefDelete, fiberRefUnsafeMakeContext, fiberRefUnsafeMakeRuntimeFlags, forEachSequentialDiscard, exitSucceed, matchCauseEffect, suspend, currentInterruptedCause, deferredUnsafeMake, deferredAwait, async, currentSchedulingPriority, whileLoop, currentUnhandledErrorLogLevel, currentLogLevel, currentLogSpan, currentLogAnnotations, exitFailCause, exitUnit, currentContext,
|
|
18
|
+
import { fiberRefUnsafeMake, currentTracerSpan, fiberRefUnsafeMakeHashSet, uninterruptible, tap, isEffect, withFiberRuntime, fiberRefLocally, currentForkScopeOverride, map as map$1, exit, exitIsSuccess, onError, failCause, partitionMap, either, flatMap as flatMap$1, unit, succeed, fail, dieSync, uninterruptibleMask, interruptible, forEachSequential, zipRight, asUnit, onInterrupt, zipLeft, interruptFiber, deferredMake, exitMatchEffect, flatten, deferredFailCause, deferredSucceed, contextWithEffect, scopeFork, currentMetricLabels, acquireUseRelease, scopeClose, exitZipWith, flip, fiberIdWith, updateRuntimeFlags, runtimeFlags, ScopeTypeId, releaseMapMake, CloseableScopeTypeId, releaseMapAdd, scopeAddFinalizerExit, as, mapInputContext, onExit, fiberRefUnsafeMakePatch, fiberRefGet, fiberRefSet, fiberRefGetWith, sync, fiberRefUpdate, fiberRefDelete, fiberRefUnsafeMakeContext, fiberRefUnsafeMakeRuntimeFlags, forEachSequentialDiscard, exitSucceed, matchCauseEffect, suspend, currentInterruptedCause, deferredUnsafeMake, deferredAwait, async, currentSchedulingPriority, whileLoop, currentUnhandledErrorLogLevel, currentLogLevel, currentLogSpan, currentLogAnnotations, exitFailCause, exitUnit, currentContext, blocked, catchAllCause, runRequestBlock, RevertFlags, yieldNow as yieldNow$1, isEffectError, withRuntimeFlags, matchEffect, if_, zipWith, currentRequestBatching, transplant, step, deferredUnsafeDone, deferredFail, exitCollectAll, exitIsFailure, exitInterrupt, exitAsUnit, interruptAsFiber, flatMapStep } from './core.esm.js';
|
|
19
19
|
import { makeSpan, currentTimeNanosTracing, mapErrorCause } from './core-effect.esm.js';
|
|
20
20
|
import { currentServices } from './defaultServices.esm.js';
|
|
21
21
|
import { consoleTag } from './defaultServices/console.esm.js';
|
|
@@ -878,10 +878,10 @@ class FiberRuntime {
|
|
|
878
878
|
});
|
|
879
879
|
}
|
|
880
880
|
["Left"](op) {
|
|
881
|
-
return
|
|
881
|
+
return fail(op.left);
|
|
882
882
|
}
|
|
883
883
|
["None"](_) {
|
|
884
|
-
return
|
|
884
|
+
return fail(NoSuchElementException());
|
|
885
885
|
}
|
|
886
886
|
["Right"](op) {
|
|
887
887
|
return exitSucceed(op.right);
|
package/internal/layer.esm.js
CHANGED
|
@@ -552,7 +552,7 @@ const unwrapScoped = self => {
|
|
|
552
552
|
// -----------------------------------------------------------------------------
|
|
553
553
|
|
|
554
554
|
/** @internal */
|
|
555
|
-
const withSpan = /*#__PURE__*/dual(
|
|
555
|
+
const withSpan = /*#__PURE__*/dual(args => isLayer(args[0]), (self, name, options) => unwrapScoped(map$1(useSpanScoped(name, options), span => locallyEffect(self, withParentSpan(span)))));
|
|
556
556
|
|
|
557
557
|
// circular with Effect
|
|
558
558
|
|
package/internal/request.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { struct } from '../Data/dist/effect-Data.esm.js';
|
|
2
1
|
import { dual } from '../Function/dist/effect-Function.esm.js';
|
|
3
2
|
import { currentRequestMap } from './completedRequestMap.esm.js';
|
|
4
3
|
import { fiberRefGetWith, sync, deferredUnsafeDone, matchEffect, exitFail, exitSucceed } from './core.esm.js';
|
|
4
|
+
import { struct } from './Data.esm.js';
|
|
5
5
|
|
|
6
6
|
/** @internal */
|
|
7
7
|
const RequestSymbolKey = "effect/Request";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "effect",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.46",
|
|
4
4
|
"packageManager": "pnpm@8.7.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
"Encoding",
|
|
68
68
|
"Equal",
|
|
69
69
|
"Equivalence",
|
|
70
|
-
"Error",
|
|
71
70
|
"ExecutionStrategy",
|
|
72
71
|
"Exit",
|
|
73
72
|
"Fiber",
|
|
@@ -385,12 +384,6 @@
|
|
|
385
384
|
"import": "./Equivalence/dist/effect-Equivalence.cjs.mjs",
|
|
386
385
|
"default": "./Equivalence/dist/effect-Equivalence.cjs.js"
|
|
387
386
|
},
|
|
388
|
-
"./Error": {
|
|
389
|
-
"types": "./dist/declarations/src/Error.d.ts",
|
|
390
|
-
"module": "./Error/dist/effect-Error.esm.js",
|
|
391
|
-
"import": "./Error/dist/effect-Error.cjs.mjs",
|
|
392
|
-
"default": "./Error/dist/effect-Error.cjs.js"
|
|
393
|
-
},
|
|
394
387
|
"./ExecutionStrategy": {
|
|
395
388
|
"types": "./dist/declarations/src/ExecutionStrategy.d.ts",
|
|
396
389
|
"module": "./ExecutionStrategy/dist/effect-ExecutionStrategy.esm.js",
|
|
@@ -1055,6 +1048,7 @@
|
|
|
1055
1048
|
"@babel/preset-typescript": "^7.23.0",
|
|
1056
1049
|
"@changesets/changelog-github": "^0.4.8",
|
|
1057
1050
|
"@changesets/cli": "^2.26.2",
|
|
1051
|
+
"@definitelytyped/dtslint": "^0.0.182",
|
|
1058
1052
|
"@effect/build-utils": "^0.1.5",
|
|
1059
1053
|
"@effect/docgen": "^0.1.8",
|
|
1060
1054
|
"@effect/eslint-plugin": "^0.1.2",
|
|
@@ -1066,6 +1060,7 @@
|
|
|
1066
1060
|
"@typescript-eslint/parser": "^6.7.4",
|
|
1067
1061
|
"@vitejs/plugin-react": "^4.1.0",
|
|
1068
1062
|
"@vitest/coverage-v8": "^0.34.6",
|
|
1063
|
+
"@vitest/expect": "^0.34.6",
|
|
1069
1064
|
"babel-plugin-annotate-pure-calls": "^0.4.0",
|
|
1070
1065
|
"eslint": "^8.50.0",
|
|
1071
1066
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
@@ -1093,6 +1088,7 @@
|
|
|
1093
1088
|
"update-version": "changeset version && pnpm install --no-frozen-lockfile",
|
|
1094
1089
|
"lint": "eslint src test",
|
|
1095
1090
|
"fix": "preconstruct fix",
|
|
1096
|
-
"docgen": "docgen"
|
|
1091
|
+
"docgen": "docgen",
|
|
1092
|
+
"dtslint": "dtslint --expectOnly dtslint"
|
|
1097
1093
|
}
|
|
1098
1094
|
}
|
package/src/Bigint.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This module provides utility functions and type class instances for working with the `bigint` type in TypeScript.
|
|
3
3
|
* It includes functions for basic arithmetic operations, as well as type class instances for
|
|
4
|
-
* `Equivalence
|
|
4
|
+
* `Equivalence` and `Order`.
|
|
5
5
|
*
|
|
6
6
|
* @since 2.0.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as equivalence from "./Equivalence"
|
|
10
10
|
import { dual } from "./Function"
|
|
11
|
+
import * as Option from "./Option"
|
|
11
12
|
import * as order from "./Order"
|
|
12
13
|
import type { Ordering } from "./Ordering"
|
|
13
14
|
import * as predicate from "./Predicate"
|
|
@@ -335,6 +336,121 @@ export const max: {
|
|
|
335
336
|
*/
|
|
336
337
|
export const sign = (n: bigint): Ordering => Order(n, 0n)
|
|
337
338
|
|
|
339
|
+
/**
|
|
340
|
+
* Determines the absolute value of a given `bigint`.
|
|
341
|
+
*
|
|
342
|
+
* @param n - The `bigint` to determine the absolute value of.
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* import { abs } from 'effect/Bigint'
|
|
346
|
+
*
|
|
347
|
+
* assert.deepStrictEqual(abs(-5n), 5n)
|
|
348
|
+
* assert.deepStrictEqual(abs(0n), 0n)
|
|
349
|
+
* assert.deepStrictEqual(abs(5n), 5n)
|
|
350
|
+
*
|
|
351
|
+
* @category math
|
|
352
|
+
* @since 2.0.0
|
|
353
|
+
*/
|
|
354
|
+
export const abs = (n: bigint): bigint => (n < 0n ? -n : n)
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Determines the greatest common divisor of two `bigint`s.
|
|
358
|
+
*
|
|
359
|
+
* @param a - The first `bigint`.
|
|
360
|
+
* @param b - The second `bigint`.
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* import { gcd } from 'effect/Bigint'
|
|
364
|
+
*
|
|
365
|
+
* assert.deepStrictEqual(gcd(2n, 3n), 1n)
|
|
366
|
+
* assert.deepStrictEqual(gcd(2n, 4n), 2n)
|
|
367
|
+
* assert.deepStrictEqual(gcd(16n, 24n), 8n)
|
|
368
|
+
*
|
|
369
|
+
* @category math
|
|
370
|
+
* @since 2.0.0
|
|
371
|
+
*/
|
|
372
|
+
export const gcd: {
|
|
373
|
+
(that: bigint): (self: bigint) => bigint
|
|
374
|
+
(self: bigint, that: bigint): bigint
|
|
375
|
+
} = dual(2, (self: bigint, that: bigint): bigint => {
|
|
376
|
+
while (that !== 0n) {
|
|
377
|
+
const t = that
|
|
378
|
+
that = self % that
|
|
379
|
+
self = t
|
|
380
|
+
}
|
|
381
|
+
return self
|
|
382
|
+
})
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Determines the least common multiple of two `bigint`s.
|
|
386
|
+
*
|
|
387
|
+
* @param a - The first `bigint`.
|
|
388
|
+
* @param b - The second `bigint`.
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* import { lcm } from 'effect/Bigint'
|
|
392
|
+
*
|
|
393
|
+
* assert.deepStrictEqual(lcm(2n, 3n), 6n)
|
|
394
|
+
* assert.deepStrictEqual(lcm(2n, 4n), 4n)
|
|
395
|
+
* assert.deepStrictEqual(lcm(16n, 24n), 48n)
|
|
396
|
+
*
|
|
397
|
+
* @category math
|
|
398
|
+
* @since 2.0.0
|
|
399
|
+
*/
|
|
400
|
+
export const lcm: {
|
|
401
|
+
(that: bigint): (self: bigint) => bigint
|
|
402
|
+
(self: bigint, that: bigint): bigint
|
|
403
|
+
} = dual(2, (self: bigint, that: bigint): bigint => (self * that) / gcd(self, that))
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Determines the square root of a given `bigint` unsafely. Throws if the given `bigint` is negative.
|
|
407
|
+
*
|
|
408
|
+
* @param n - The `bigint` to determine the square root of.
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* import { unsafeSqrt } from 'effect/Bigint'
|
|
412
|
+
*
|
|
413
|
+
* assert.deepStrictEqual(unsafeSqrt(4n), 2n)
|
|
414
|
+
* assert.deepStrictEqual(unsafeSqrt(9n), 3n)
|
|
415
|
+
* assert.deepStrictEqual(unsafeSqrt(16n), 4n)
|
|
416
|
+
*
|
|
417
|
+
* @category math
|
|
418
|
+
* @since 2.0.0
|
|
419
|
+
*/
|
|
420
|
+
export const unsafeSqrt = (n: bigint): bigint => {
|
|
421
|
+
if (n < 0n) {
|
|
422
|
+
throw new RangeError("Cannot take the square root of a negative number")
|
|
423
|
+
}
|
|
424
|
+
if (n < 2n) {
|
|
425
|
+
return n
|
|
426
|
+
}
|
|
427
|
+
let x = n / 2n
|
|
428
|
+
while (x * x > n) {
|
|
429
|
+
x = ((n / x) + x) / 2n
|
|
430
|
+
}
|
|
431
|
+
return x
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Determines the square root of a given `bigint` safely. Returns `none` if the given `bigint` is negative.
|
|
436
|
+
*
|
|
437
|
+
* @param n - The `bigint` to determine the square root of.
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* import { sqrt } from 'effect/Bigint'
|
|
441
|
+
* import * as Option from 'effect/Option'
|
|
442
|
+
*
|
|
443
|
+
* assert.deepStrictEqual(sqrt(4n), Option.some(2n))
|
|
444
|
+
* assert.deepStrictEqual(sqrt(9n), Option.some(3n))
|
|
445
|
+
* assert.deepStrictEqual(sqrt(16n), Option.some(4n))
|
|
446
|
+
* assert.deepStrictEqual(sqrt(-1n), Option.none())
|
|
447
|
+
*
|
|
448
|
+
* @category math
|
|
449
|
+
* @since 2.0.0
|
|
450
|
+
*/
|
|
451
|
+
export const sqrt = (n: bigint): Option.Option<bigint> =>
|
|
452
|
+
greaterThanOrEqualTo(n, 0n) ? Option.some(unsafeSqrt(n)) : Option.none<bigint>()
|
|
453
|
+
|
|
338
454
|
/**
|
|
339
455
|
* Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint
|
|
340
456
|
*
|
package/src/Boolean.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This module provides utility functions and type class instances for working with the `boolean` type in TypeScript.
|
|
3
3
|
* It includes functions for basic boolean operations, as well as type class instances for
|
|
4
|
-
* `Equivalence
|
|
4
|
+
* `Equivalence` and `Order`.
|
|
5
5
|
*
|
|
6
6
|
* @since 2.0.0
|
|
7
7
|
*/
|