effect 2.0.0-next.52 → 2.0.0-next.54
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/BigDecimal/dist/effect-BigDecimal.cjs.dev.js +6 -6
- package/BigDecimal/dist/effect-BigDecimal.cjs.prod.js +6 -6
- package/BigDecimal/dist/effect-BigDecimal.esm.js +2 -1
- package/BigInt/dist/effect-BigInt.cjs.dev.js +4 -4
- package/BigInt/dist/effect-BigInt.cjs.prod.js +4 -4
- package/Brand/dist/effect-Brand.cjs.dev.js +5 -5
- package/Brand/dist/effect-Brand.cjs.prod.js +5 -5
- package/Cache/dist/effect-Cache.cjs.dev.js +31 -30
- package/Cache/dist/effect-Cache.cjs.prod.js +31 -30
- package/Cause/dist/effect-Cause.cjs.dev.js +10 -10
- package/Cause/dist/effect-Cause.cjs.prod.js +10 -10
- package/Channel/dist/effect-Channel.cjs.dev.js +49 -48
- package/Channel/dist/effect-Channel.cjs.prod.js +49 -48
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +2 -1
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +2 -1
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +2 -1
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +2 -1
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +2 -1
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +2 -1
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +2 -1
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +2 -1
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +38 -37
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +38 -37
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +2 -1
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +2 -1
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +2 -1
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +2 -1
- package/Chunk/dist/effect-Chunk.cjs.dev.js +6 -6
- package/Chunk/dist/effect-Chunk.cjs.prod.js +6 -6
- package/Chunk/dist/effect-Chunk.esm.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 +13 -13
- package/Config/dist/effect-Config.cjs.prod.js +13 -13
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +6 -6
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +6 -6
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +15 -15
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +15 -15
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +7 -7
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +7 -7
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +6 -6
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +6 -6
- package/Console/dist/effect-Console.cjs.dev.js +35 -34
- package/Console/dist/effect-Console.cjs.prod.js +35 -34
- package/Context/dist/effect-Context.cjs.dev.js +5 -5
- package/Context/dist/effect-Context.cjs.prod.js +5 -5
- 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 +16 -16
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +16 -16
- package/Deferred/dist/effect-Deferred.cjs.dev.js +10 -10
- package/Deferred/dist/effect-Deferred.cjs.prod.js +10 -10
- package/Differ/dist/effect-Differ.cjs.dev.js +7 -7
- package/Differ/dist/effect-Differ.cjs.prod.js +7 -7
- package/Duration/dist/effect-Duration.cjs.dev.js +5 -5
- package/Duration/dist/effect-Duration.cjs.prod.js +5 -5
- package/Duration/dist/effect-Duration.esm.js +2 -2
- package/Effect/dist/effect-Effect.cjs.dev.js +37 -36
- package/Effect/dist/effect-Effect.cjs.prod.js +37 -36
- package/Effectable/dist/effect-Effectable.cjs.dev.js +3 -3
- package/Effectable/dist/effect-Effectable.cjs.prod.js +3 -3
- package/Either/dist/effect-Either.cjs.dev.js +4 -4
- package/Either/dist/effect-Either.cjs.prod.js +4 -4
- package/Encoding/dist/effect-Encoding.cjs.dev.js +6 -6
- package/Encoding/dist/effect-Encoding.cjs.prod.js +6 -6
- package/Equal/dist/effect-Equal.cjs.dev.js +3 -3
- package/Equal/dist/effect-Equal.cjs.prod.js +3 -3
- package/Equal/dist/effect-Equal.esm.js +2 -1
- package/Exit/dist/effect-Exit.cjs.dev.js +10 -10
- package/Exit/dist/effect-Exit.cjs.prod.js +10 -10
- package/Fiber/dist/effect-Fiber.cjs.dev.js +32 -31
- package/Fiber/dist/effect-Fiber.cjs.prod.js +32 -31
- package/FiberId/dist/effect-FiberId.cjs.dev.js +7 -7
- package/FiberId/dist/effect-FiberId.cjs.prod.js +7 -7
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +32 -31
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +32 -31
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +11 -11
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +11 -11
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +12 -12
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +12 -12
- package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +3 -3
- package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +3 -3
- package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +3 -18
- package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +3 -18
- package/GlobalValue/dist/effect-GlobalValue.esm.js +3 -1
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +50 -49
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +50 -49
- package/Hash/dist/effect-Hash.cjs.dev.js +3 -3
- package/Hash/dist/effect-Hash.cjs.prod.js +3 -3
- package/Hash/dist/effect-Hash.esm.js +2 -1
- package/HashMap/dist/effect-HashMap.cjs.dev.js +6 -6
- package/HashMap/dist/effect-HashMap.cjs.prod.js +6 -6
- package/HashSet/dist/effect-HashSet.cjs.dev.js +6 -6
- package/HashSet/dist/effect-HashSet.cjs.prod.js +6 -6
- package/Inspectable/dist/effect-Inspectable.cjs.dev.js +4 -1
- package/Inspectable/dist/effect-Inspectable.cjs.prod.js +4 -1
- package/Inspectable/dist/effect-Inspectable.esm.js +3 -1
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +31 -30
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +31 -30
- package/LICENSE +21 -0
- package/Layer/dist/effect-Layer.cjs.dev.js +38 -37
- package/Layer/dist/effect-Layer.cjs.prod.js +38 -37
- package/List/dist/effect-List.cjs.dev.js +8 -7
- package/List/dist/effect-List.cjs.prod.js +8 -7
- package/List/dist/effect-List.esm.js +5 -4
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +10 -10
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +10 -10
- package/Logger/dist/effect-Logger.cjs.dev.js +35 -34
- package/Logger/dist/effect-Logger.cjs.prod.js +35 -34
- package/Match/dist/effect-Match.cjs.dev.js +4 -4
- package/Match/dist/effect-Match.cjs.prod.js +4 -4
- package/Metric/dist/effect-Metric.cjs.dev.js +29 -28
- package/Metric/dist/effect-Metric.cjs.prod.js +29 -28
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +6 -6
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +6 -6
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +8 -8
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +8 -8
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +9 -9
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +9 -9
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +6 -6
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +6 -6
- package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +3 -3
- package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +3 -3
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +32 -31
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +32 -31
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +10 -10
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +10 -10
- package/MetricState/dist/effect-MetricState.cjs.dev.js +3 -3
- package/MetricState/dist/effect-MetricState.cjs.prod.js +3 -3
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +6 -6
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +6 -6
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +6 -6
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +6 -6
- package/MutableList/dist/effect-MutableList.cjs.dev.js +1 -0
- package/MutableList/dist/effect-MutableList.cjs.prod.js +1 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +5 -5
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +5 -5
- package/MutableRef/dist/effect-MutableRef.cjs.dev.js +2 -2
- package/MutableRef/dist/effect-MutableRef.cjs.prod.js +2 -2
- package/Number/dist/effect-Number.cjs.dev.js +3 -3
- package/Number/dist/effect-Number.cjs.prod.js +3 -3
- package/Option/dist/effect-Option.cjs.dev.js +5 -5
- package/Option/dist/effect-Option.cjs.prod.js +5 -5
- package/Pool/dist/effect-Pool.cjs.dev.js +32 -31
- package/Pool/dist/effect-Pool.cjs.prod.js +32 -31
- package/Predicate/dist/effect-Predicate.cjs.dev.js +15 -3
- package/Predicate/dist/effect-Predicate.cjs.mjs +1 -0
- package/Predicate/dist/effect-Predicate.cjs.prod.js +15 -3
- package/Predicate/dist/effect-Predicate.esm.js +15 -4
- package/PubSub/dist/effect-PubSub.cjs.dev.js +31 -30
- package/PubSub/dist/effect-PubSub.cjs.prod.js +31 -30
- package/Queue/dist/effect-Queue.cjs.dev.js +31 -30
- package/Queue/dist/effect-Queue.cjs.prod.js +31 -30
- 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 +5 -5
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +5 -5
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +5 -5
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +5 -5
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +5 -5
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +5 -5
- package/Ref/dist/effect-Ref.cjs.dev.js +11 -11
- package/Ref/dist/effect-Ref.cjs.prod.js +11 -11
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +36 -35
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +36 -35
- package/Request/dist/effect-Request.cjs.dev.js +31 -30
- package/Request/dist/effect-Request.cjs.prod.js +31 -30
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +38 -37
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +38 -37
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +52 -39
- package/RequestResolver/dist/effect-RequestResolver.cjs.mjs +2 -1
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +52 -39
- package/RequestResolver/dist/effect-RequestResolver.esm.js +14 -3
- package/Resource/dist/effect-Resource.cjs.dev.js +34 -33
- package/Resource/dist/effect-Resource.cjs.prod.js +34 -33
- package/Runtime/dist/effect-Runtime.cjs.dev.js +33 -32
- package/Runtime/dist/effect-Runtime.cjs.prod.js +33 -32
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +36 -35
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +36 -35
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +8 -8
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +8 -8
- package/STM/dist/effect-STM.cjs.dev.js +52 -51
- package/STM/dist/effect-STM.cjs.prod.js +52 -51
- package/Schedule/dist/effect-Schedule.cjs.dev.js +22 -22
- package/Schedule/dist/effect-Schedule.cjs.prod.js +22 -22
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +5 -5
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +5 -5
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +5 -5
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +5 -5
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +5 -5
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +5 -5
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +10 -10
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +10 -10
- package/Scope/dist/effect-Scope.cjs.dev.js +30 -29
- package/Scope/dist/effect-Scope.cjs.prod.js +30 -29
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +37 -37
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +37 -37
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +34 -33
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +34 -33
- package/Sink/dist/effect-Sink.cjs.dev.js +47 -46
- package/Sink/dist/effect-Sink.cjs.prod.js +47 -46
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +5 -5
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +5 -5
- package/SortedMap/dist/effect-SortedMap.esm.js +2 -2
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +5 -5
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +5 -5
- package/SortedSet/dist/effect-SortedSet.esm.js +2 -2
- package/Stream/dist/effect-Stream.cjs.dev.js +69 -49
- package/Stream/dist/effect-Stream.cjs.mjs +2 -0
- package/Stream/dist/effect-Stream.cjs.prod.js +69 -49
- package/Stream/dist/effect-Stream.esm.js +19 -2
- package/Streamable/dist/effect-Streamable.cjs.dev.js +50 -49
- package/Streamable/dist/effect-Streamable.cjs.prod.js +50 -49
- package/String/dist/effect-String.cjs.dev.js +4 -4
- package/String/dist/effect-String.cjs.prod.js +4 -4
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +49 -48
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +49 -48
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +36 -35
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +36 -35
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +33 -32
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +33 -32
- package/TArray/dist/effect-TArray.cjs.dev.js +54 -53
- package/TArray/dist/effect-TArray.cjs.prod.js +54 -53
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +53 -52
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +53 -52
- package/TMap/dist/effect-TMap.cjs.dev.js +55 -54
- package/TMap/dist/effect-TMap.cjs.prod.js +55 -54
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +52 -51
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +52 -51
- package/TPubSub/dist/effect-TPubSub.cjs.dev.js +54 -53
- package/TPubSub/dist/effect-TPubSub.cjs.prod.js +54 -53
- package/TQueue/dist/effect-TQueue.cjs.dev.js +54 -53
- package/TQueue/dist/effect-TQueue.cjs.prod.js +54 -53
- package/TRandom/dist/effect-TRandom.cjs.dev.js +53 -52
- package/TRandom/dist/effect-TRandom.cjs.prod.js +53 -52
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +52 -51
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +52 -51
- package/TRef/dist/effect-TRef.cjs.dev.js +52 -51
- package/TRef/dist/effect-TRef.cjs.prod.js +52 -51
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +53 -52
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +53 -52
- package/TSet/dist/effect-TSet.cjs.dev.js +55 -54
- package/TSet/dist/effect-TSet.cjs.prod.js +55 -54
- package/Take/dist/effect-Take.cjs.dev.js +38 -37
- package/Take/dist/effect-Take.cjs.prod.js +38 -37
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +8 -10
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +8 -10
- package/TestAnnotation/dist/effect-TestAnnotation.esm.js +2 -3
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +2 -3
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +2 -3
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.esm.js +2 -3
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +23 -25
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +23 -25
- package/TestAnnotations/dist/effect-TestAnnotations.esm.js +2 -3
- package/TestClock/dist/effect-TestClock.cjs.dev.js +35 -34
- package/TestClock/dist/effect-TestClock.cjs.prod.js +35 -34
- package/TestConfig/dist/effect-TestConfig.cjs.dev.js +5 -5
- package/TestConfig/dist/effect-TestConfig.cjs.prod.js +5 -5
- package/TestContext/dist/effect-TestContext.cjs.dev.js +37 -36
- package/TestContext/dist/effect-TestContext.cjs.prod.js +37 -36
- package/TestLive/dist/effect-TestLive.cjs.dev.js +16 -16
- package/TestLive/dist/effect-TestLive.cjs.prod.js +16 -16
- package/TestServices/dist/effect-TestServices.cjs.dev.js +37 -36
- package/TestServices/dist/effect-TestServices.cjs.prod.js +37 -36
- package/TestSized/dist/effect-TestSized.cjs.dev.js +10 -10
- package/TestSized/dist/effect-TestSized.cjs.prod.js +10 -10
- package/Tracer/dist/effect-Tracer.cjs.dev.js +16 -16
- package/Tracer/dist/effect-Tracer.cjs.prod.js +16 -16
- package/dist/{Context-607e9b4c.cjs.dev.js → Context-568081ab.cjs.dev.js} +6 -5
- package/dist/{Context-c91d8ca0.cjs.prod.js → Context-cc56bb38.cjs.prod.js} +6 -5
- package/dist/{Effectable-71c10ab9.cjs.dev.js → Effectable-1faa0ad2.cjs.dev.js} +3 -1
- package/dist/{Effectable-6a8a05f1.cjs.prod.js → Effectable-394683c3.cjs.prod.js} +3 -1
- package/dist/{Either-e7500e90.cjs.dev.js → Either-0d8d15ef.cjs.dev.js} +4 -3
- package/dist/{Either-a3f96c60.cjs.prod.js → Either-7f205ffe.cjs.prod.js} +4 -3
- package/dist/{FiberId-f329d0e3.cjs.dev.js → FiberId-61fb9ee6.cjs.dev.js} +3 -4
- package/dist/{FiberId-88cc0067.cjs.prod.js → FiberId-9173587f.cjs.prod.js} +3 -4
- package/dist/GlobalValue-4f926c14.cjs.prod.js +25 -0
- package/dist/GlobalValue-b84ef375.cjs.dev.js +25 -0
- package/dist/{HashSet-09ade044.cjs.prod.js → HashSet-07330f33.cjs.prod.js} +4 -4
- package/dist/{HashSet-e9659fd4.cjs.dev.js → HashSet-bcbb8665.cjs.dev.js} +4 -4
- package/dist/{Option-01caa9d4.cjs.dev.js → Option-75a43a19.cjs.dev.js} +3 -2
- package/dist/{Option-dd52e82a.cjs.prod.js → Option-951c7cc5.cjs.prod.js} +3 -2
- package/dist/{Ref-d3a3826b.cjs.dev.js → Ref-5a1a224e.cjs.dev.js} +1 -1
- package/dist/{Ref-50f14c13.cjs.prod.js → Ref-888ba63e.cjs.prod.js} +1 -1
- package/dist/{boundaries-0e5ddf7b.cjs.prod.js → boundaries-8c80cccd.cjs.prod.js} +2 -3
- package/dist/{boundaries-ce70e4e4.cjs.dev.js → boundaries-9756b0a9.cjs.dev.js} +2 -3
- package/dist/{cache-2a5d8381.cjs.dev.js → cache-a4a7d75b.cjs.dev.js} +7 -6
- package/dist/{cache-8f0c08cb.cjs.prod.js → cache-bef95384.cjs.prod.js} +7 -6
- package/dist/{childExecutorDecision-b5842db5.cjs.prod.js → childExecutorDecision-3293bb05.cjs.prod.js} +2 -1
- package/dist/{childExecutorDecision-2eed6e25.cjs.dev.js → childExecutorDecision-54722bbb.cjs.dev.js} +2 -1
- package/dist/{circular-acb40239.cjs.prod.js → circular-1c51c1bb.cjs.prod.js} +8 -8
- package/dist/{circular-2effda94.cjs.dev.js → circular-883c3cf4.cjs.dev.js} +4 -4
- package/dist/{circular-39e86dc8.cjs.dev.js → circular-b9b516fc.cjs.dev.js} +8 -8
- package/dist/{circular-4f03acf3.cjs.prod.js → circular-cb5f760d.cjs.prod.js} +4 -4
- package/dist/{config-beaa306c.cjs.dev.js → config-127bdaf9.cjs.dev.js} +5 -4
- package/dist/{config-00e6170c.cjs.prod.js → config-fcc9bf9f.cjs.prod.js} +5 -4
- package/dist/{configError-72f57cd6.cjs.prod.js → configError-008f62eb.cjs.prod.js} +2 -1
- package/dist/{configError-834bedc1.cjs.dev.js → configError-c5d3b8f8.cjs.dev.js} +2 -1
- package/dist/{configProvider-aef50f41.cjs.dev.js → configProvider-dc4119da.cjs.dev.js} +4 -4
- package/dist/{configProvider-290d13e7.cjs.prod.js → configProvider-e88528f7.cjs.prod.js} +4 -4
- package/dist/{configSecret-abf643d8.cjs.dev.js → configSecret-2e84cf81.cjs.dev.js} +2 -3
- package/dist/{configSecret-80d3e36b.cjs.prod.js → configSecret-c0d67dac.cjs.prod.js} +2 -3
- package/dist/{core-a0828fef.cjs.dev.js → core-194bcd03.cjs.dev.js} +24 -39
- package/dist/{core-7445bfd4.cjs.dev.js → core-6d808ba3.cjs.dev.js} +8 -11
- package/dist/{core-279496f0.cjs.prod.js → core-b72346cc.cjs.prod.js} +8 -11
- package/dist/{core-35439f06.cjs.prod.js → core-da4fc7ee.cjs.prod.js} +24 -39
- package/dist/{core-effect-460f968a.cjs.prod.js → core-effect-5d1f84a4.cjs.prod.js} +9 -9
- package/dist/{core-effect-02a7f1d7.cjs.dev.js → core-effect-6a5b67f4.cjs.dev.js} +9 -9
- package/dist/{dataSource-94fb44f9.cjs.prod.js → dataSource-2d46ba36.cjs.prod.js} +31 -5
- package/dist/{dataSource-da4a602c.cjs.dev.js → dataSource-5b5bdfea.cjs.dev.js} +31 -5
- package/dist/declarations/src/BigDecimal.d.ts.map +1 -1
- package/dist/declarations/src/Chunk.d.ts.map +1 -1
- package/dist/declarations/src/Duration.d.ts.map +1 -1
- package/dist/declarations/src/Effect.d.ts +1 -0
- package/dist/declarations/src/Effect.d.ts.map +1 -1
- package/dist/declarations/src/Equal.d.ts.map +1 -1
- package/dist/declarations/src/GlobalValue.d.ts.map +1 -1
- package/dist/declarations/src/Hash.d.ts.map +1 -1
- package/dist/declarations/src/Inspectable.d.ts.map +1 -1
- package/dist/declarations/src/List.d.ts +2 -2
- package/dist/declarations/src/List.d.ts.map +1 -1
- package/dist/declarations/src/Predicate.d.ts +17 -0
- package/dist/declarations/src/Predicate.d.ts.map +1 -1
- package/dist/declarations/src/RequestResolver.d.ts +18 -2
- package/dist/declarations/src/RequestResolver.d.ts.map +1 -1
- package/dist/declarations/src/SortedMap.d.ts.map +1 -1
- package/dist/declarations/src/SortedSet.d.ts.map +1 -1
- package/dist/declarations/src/Stream.d.ts +15 -0
- package/dist/declarations/src/Stream.d.ts.map +1 -1
- package/dist/declarations/src/TestAnnotation.d.ts.map +1 -1
- package/dist/declarations/src/TestAnnotationMap.d.ts.map +1 -1
- package/dist/declarations/src/TestAnnotations.d.ts.map +1 -1
- package/dist/{defaultServices-f3f93337.cjs.dev.js → defaultServices-6e8f7b7e.cjs.dev.js} +4 -4
- package/dist/{defaultServices-61911fd4.cjs.prod.js → defaultServices-a72ce6cc.cjs.prod.js} +4 -4
- package/dist/{fiber-cac583ce.cjs.dev.js → fiber-5a93dcfd.cjs.dev.js} +6 -5
- package/dist/{fiber-f67dca7d.cjs.prod.js → fiber-f83607a7.cjs.prod.js} +6 -5
- package/dist/{fiberRefs-6bd9745e.cjs.dev.js → fiberRefs-585ae0b6.cjs.dev.js} +1 -1
- package/dist/{fiberRefs-59b59378.cjs.prod.js → fiberRefs-ad2e57b9.cjs.prod.js} +1 -1
- package/dist/{fiberRuntime-976a3e6f.cjs.dev.js → fiberRuntime-54700f33.cjs.dev.js} +28 -29
- package/dist/{fiberRuntime-26f406c3.cjs.prod.js → fiberRuntime-c7079f7c.cjs.prod.js} +28 -29
- package/dist/{groupBy-7fc93bc9.cjs.dev.js → groupBy-4164780f.cjs.dev.js} +6 -5
- package/dist/{groupBy-8977b420.cjs.prod.js → groupBy-cce9596a.cjs.prod.js} +6 -5
- package/dist/{hook-13f4db1e.cjs.dev.js → hook-0519161c.cjs.dev.js} +1 -1
- package/dist/{hook-8a020c3f.cjs.prod.js → hook-97c99321.cjs.prod.js} +1 -1
- package/dist/{key-4b5f6a7d.cjs.dev.js → key-90c2b4ac.cjs.dev.js} +4 -3
- package/dist/{key-2cf383a2.cjs.prod.js → key-fa0b9fdc.cjs.prod.js} +4 -3
- package/dist/{keyType-36962f62.cjs.dev.js → keyType-e8cf6ff6.cjs.dev.js} +7 -18
- package/dist/{keyType-2ae6a00e.cjs.prod.js → keyType-feafea67.cjs.prod.js} +7 -18
- package/dist/{label-b0cebeae.cjs.dev.js → label-35a9680c.cjs.dev.js} +2 -3
- package/dist/{label-a588e6cd.cjs.prod.js → label-95de3034.cjs.prod.js} +2 -3
- package/dist/{layer-c197624f.cjs.dev.js → layer-9197ec58.cjs.dev.js} +11 -12
- package/dist/{layer-abbc91aa.cjs.prod.js → layer-b8b04a76.cjs.prod.js} +11 -12
- package/dist/{mergeDecision-be41e797.cjs.dev.js → mergeDecision-09945b33.cjs.dev.js} +2 -1
- package/dist/{mergeDecision-07c6b5c9.cjs.prod.js → mergeDecision-f0313041.cjs.prod.js} +2 -1
- package/dist/{mergeState-8153ce39.cjs.dev.js → mergeState-1e12f9c8.cjs.dev.js} +2 -3
- package/dist/{mergeState-75990fa2.cjs.prod.js → mergeState-be337f1d.cjs.prod.js} +2 -3
- package/dist/{mergeStrategy-81ea5b80.cjs.dev.js → mergeStrategy-773913bc.cjs.dev.js} +2 -1
- package/dist/{mergeStrategy-3dd6e55f.cjs.prod.js → mergeStrategy-b3ff69de.cjs.prod.js} +2 -1
- package/dist/{patch-b7689042.cjs.prod.js → patch-4449ba78.cjs.prod.js} +1 -1
- package/dist/{patch-2d425849.cjs.dev.js → patch-59660608.cjs.dev.js} +1 -1
- package/dist/{pathPatch-b6020485.cjs.prod.js → pathPatch-70cd06ac.cjs.prod.js} +1 -1
- package/dist/{pathPatch-18fa425e.cjs.dev.js → pathPatch-830b65af.cjs.dev.js} +1 -1
- package/dist/{pool-810c2214.cjs.dev.js → pool-892eba48.cjs.dev.js} +7 -6
- package/dist/{pool-868dfa39.cjs.prod.js → pool-8cb7df2c.cjs.prod.js} +7 -6
- package/dist/{query-927b504e.cjs.prod.js → query-2e2c336b.cjs.prod.js} +4 -4
- package/dist/{query-c6684e39.cjs.dev.js → query-5621fca9.cjs.dev.js} +4 -4
- package/dist/{queue-062806c7.cjs.prod.js → queue-0a693b71.cjs.prod.js} +5 -4
- package/dist/{queue-a0fc274d.cjs.dev.js → queue-bf2b095e.cjs.dev.js} +5 -4
- package/dist/{registry-e5ad2d74.cjs.dev.js → registry-e2404bf3.cjs.dev.js} +2 -2
- package/dist/{registry-9268ec7c.cjs.prod.js → registry-fcf9eed8.cjs.prod.js} +2 -2
- package/dist/{runtime-ce0ad0ed.cjs.prod.js → runtime-9b51e62d.cjs.prod.js} +8 -8
- package/dist/{runtime-340bd70b.cjs.dev.js → runtime-fa7766be.cjs.dev.js} +8 -8
- package/dist/{schedule-74c6207a.cjs.dev.js → schedule-09d61de9.cjs.dev.js} +3 -3
- package/dist/{schedule-04b40c50.cjs.prod.js → schedule-840bf9d2.cjs.prod.js} +3 -3
- package/dist/{scopedRef-d429ec83.cjs.prod.js → scopedRef-56d2a9ef.cjs.prod.js} +6 -6
- package/dist/{scopedRef-4f0dd122.cjs.dev.js → scopedRef-7b7d85ee.cjs.dev.js} +6 -6
- package/dist/{singleProducerAsyncInput-06a9076a.cjs.prod.js → singleProducerAsyncInput-e6be493d.cjs.prod.js} +1 -1
- package/dist/{singleProducerAsyncInput-72c05452.cjs.dev.js → singleProducerAsyncInput-ec547400.cjs.dev.js} +1 -1
- package/dist/{sink-301d2bb4.cjs.dev.js → sink-7f4853d1.cjs.dev.js} +13 -12
- package/dist/{sink-46df55d3.cjs.prod.js → sink-dd85e0da.cjs.prod.js} +13 -12
- package/dist/{state-40d5dc71.cjs.prod.js → state-bf4095d9.cjs.prod.js} +7 -18
- package/dist/{state-620f7a22.cjs.dev.js → state-cd204060.cjs.dev.js} +7 -18
- package/dist/{stm-0b50e3c1.cjs.dev.js → stm-052ee374.cjs.dev.js} +3 -3
- package/dist/{stm-c0489b43.cjs.prod.js → stm-3b4140db.cjs.prod.js} +3 -3
- package/dist/{stream-0c3160ef.cjs.prod.js → stream-3fcc169c.cjs.prod.js} +26 -7
- package/dist/{stream-44cdd7cb.cjs.dev.js → stream-c343a8b6.cjs.dev.js} +26 -7
- package/dist/{synchronizedRef-78797507.cjs.dev.js → synchronizedRef-78d10e75.cjs.dev.js} +1 -1
- package/dist/{synchronizedRef-2f71b820.cjs.prod.js → synchronizedRef-be8b19ab.cjs.prod.js} +1 -1
- package/dist/{tArray-556355cd.cjs.dev.js → tArray-d946856c.cjs.dev.js} +3 -3
- package/dist/{tArray-006f45b0.cjs.prod.js → tArray-fc895c3a.cjs.prod.js} +3 -3
- package/dist/{tMap-52d00ffb.cjs.dev.js → tMap-211d3e8a.cjs.dev.js} +4 -4
- package/dist/{tMap-9680b82b.cjs.prod.js → tMap-def92655.cjs.prod.js} +4 -4
- package/dist/{tQueue-51cf109e.cjs.prod.js → tQueue-6cd6c79b.cjs.prod.js} +6 -9
- package/dist/{tQueue-ca56a2a8.cjs.dev.js → tQueue-f376aa4c.cjs.dev.js} +6 -9
- package/dist/{tRef-b98e2e2a.cjs.dev.js → tRef-ae996027.cjs.dev.js} +1 -1
- package/dist/{tRef-4a2a9689.cjs.prod.js → tRef-f740eee4.cjs.prod.js} +1 -1
- package/dist/{upstreamPullRequest-c89f818d.cjs.prod.js → upstreamPullRequest-4eb9ab38.cjs.prod.js} +2 -1
- package/dist/{upstreamPullRequest-7a694281.cjs.dev.js → upstreamPullRequest-fc0d09a3.cjs.dev.js} +2 -1
- package/dist/{upstreamPullStrategy-f9f1ab57.cjs.dev.js → upstreamPullStrategy-69f33916.cjs.dev.js} +2 -1
- package/dist/{upstreamPullStrategy-63cc8967.cjs.prod.js → upstreamPullStrategy-bf9f0ad1.cjs.prod.js} +2 -1
- package/internal/Context.esm.js +3 -2
- package/internal/Effectable.esm.js +3 -1
- package/internal/Either.esm.js +2 -1
- package/internal/Encoding/Common.esm.js +3 -1
- package/internal/HashMap/node.esm.js +2 -1
- package/internal/HashMap.esm.js +2 -2
- package/internal/HashSet.esm.js +2 -2
- package/internal/Option.esm.js +2 -1
- package/internal/RedBlackTree.esm.js +2 -2
- package/internal/blockedRequests.esm.js +2 -3
- package/internal/cache.esm.js +2 -1
- package/internal/cause.esm.js +9 -16
- package/internal/channel/childExecutorDecision.esm.js +2 -1
- package/internal/channel/mergeDecision.esm.js +2 -1
- package/internal/channel/mergeState.esm.js +2 -3
- package/internal/channel/mergeStrategy.esm.js +2 -1
- package/internal/channel/upstreamPullRequest.esm.js +2 -1
- package/internal/channel/upstreamPullStrategy.esm.js +2 -1
- package/internal/channel.esm.js +2 -1
- package/internal/clock.esm.js +1 -1
- package/internal/config.esm.js +2 -1
- package/internal/configError.esm.js +2 -1
- package/internal/configSecret.esm.js +2 -3
- package/internal/core-effect.esm.js +3 -3
- package/internal/core-stream.esm.js +2 -1
- package/internal/core.esm.js +9 -13
- package/internal/dataSource.esm.js +30 -5
- package/internal/effect/circular.esm.js +2 -2
- package/internal/fiber.esm.js +2 -1
- package/internal/fiberId.esm.js +2 -3
- package/internal/fiberRuntime.esm.js +12 -10
- package/internal/fiberStatus.esm.js +2 -1
- package/internal/groupBy.esm.js +2 -1
- package/internal/layer.esm.js +3 -4
- package/internal/metric/boundaries.esm.js +2 -3
- package/internal/metric/key.esm.js +2 -1
- package/internal/metric/keyType.esm.js +7 -18
- package/internal/metric/label.esm.js +2 -3
- package/internal/metric/state.esm.js +7 -18
- package/internal/pool.esm.js +2 -1
- package/internal/queue.esm.js +3 -2
- package/internal/request.esm.js +2 -1
- package/internal/runtime.esm.js +4 -4
- package/internal/sink.esm.js +2 -1
- package/internal/stm/core.esm.js +4 -2
- package/internal/stm/stm/stmState.esm.js +2 -3
- package/internal/stm/stm/tExit.esm.js +2 -3
- package/internal/stm/tQueue.esm.js +3 -6
- package/internal/stream.esm.js +21 -4
- package/internal/supervisor.esm.js +2 -3
- package/internal/version.esm.js +3 -0
- package/package.json +11 -9
- package/src/BigDecimal.ts +2 -1
- package/src/Chunk.ts +5 -3
- package/src/Duration.ts +2 -2
- package/src/Effect.ts +1 -0
- package/src/Equal.ts +2 -1
- package/src/GlobalValue.ts +3 -1
- package/src/Hash.ts +2 -1
- package/src/Inspectable.ts +3 -1
- package/src/List.ts +8 -7
- package/src/Predicate.ts +21 -4
- package/src/RequestResolver.ts +25 -3
- package/src/SortedMap.ts +2 -2
- package/src/SortedSet.ts +2 -2
- package/src/Stream.ts +17 -0
- package/src/TestAnnotation.ts +2 -3
- package/src/TestAnnotationMap.ts +2 -3
- package/src/TestAnnotations.ts +2 -3
- package/src/internal/Context.ts +3 -2
- package/src/internal/Effectable.ts +3 -1
- package/src/internal/Either.ts +2 -2
- package/src/internal/Encoding/Common.ts +2 -2
- package/src/internal/HashMap/node.ts +2 -1
- package/src/internal/HashMap.ts +2 -2
- package/src/internal/HashSet.ts +2 -2
- package/src/internal/Option.ts +2 -2
- package/src/internal/RedBlackTree.ts +2 -2
- package/src/internal/blockedRequests.ts +2 -3
- package/src/internal/cache.ts +2 -1
- package/src/internal/cause.ts +15 -23
- package/src/internal/channel/channelState.ts +2 -2
- package/src/internal/channel/childExecutorDecision.ts +2 -1
- package/src/internal/channel/mergeDecision.ts +2 -2
- package/src/internal/channel/mergeState.ts +3 -3
- package/src/internal/channel/mergeStrategy.ts +2 -2
- package/src/internal/channel/upstreamPullRequest.ts +2 -1
- package/src/internal/channel/upstreamPullStrategy.ts +2 -1
- package/src/internal/channel.ts +2 -2
- package/src/internal/clock.ts +1 -1
- package/src/internal/config.ts +2 -3
- package/src/internal/configError.ts +2 -2
- package/src/internal/configSecret.ts +2 -3
- package/src/internal/core-effect.ts +3 -3
- package/src/internal/core-stream.ts +2 -1
- package/src/internal/core.ts +8 -16
- package/src/internal/dataSource.ts +47 -3
- package/src/internal/effect/circular.ts +1 -1
- package/src/internal/fiber.ts +2 -2
- package/src/internal/fiberId.ts +2 -3
- package/src/internal/fiberRuntime.ts +15 -8
- package/src/internal/fiberStatus.ts +2 -2
- package/src/internal/groupBy.ts +2 -2
- package/src/internal/layer.ts +2 -3
- package/src/internal/metric/boundaries.ts +3 -3
- package/src/internal/metric/key.ts +2 -1
- package/src/internal/metric/keyType.ts +13 -18
- package/src/internal/metric/label.ts +2 -3
- package/src/internal/metric/state.ts +12 -18
- package/src/internal/pool.ts +2 -2
- package/src/internal/queue.ts +3 -4
- package/src/internal/request.ts +2 -2
- package/src/internal/runtime.ts +2 -3
- package/src/internal/sink.ts +2 -2
- package/src/internal/stm/core.ts +4 -3
- package/src/internal/stm/stm/stmState.ts +2 -3
- package/src/internal/stm/stm/tExit.ts +2 -3
- package/src/internal/stm/tQueue.ts +3 -7
- package/src/internal/stream.ts +26 -6
- package/src/internal/supervisor.ts +3 -3
- package/src/internal/version.ts +1 -0
- /package/dist/{RuntimeFlagsPatch-063c5864.cjs.dev.js → RuntimeFlagsPatch-786579ee.cjs.dev.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-233ac7d7.cjs.prod.js → RuntimeFlagsPatch-947589de.cjs.prod.js} +0 -0
- /package/dist/{take-689a29d5.cjs.dev.js → take-b2ffaa38.cjs.dev.js} +0 -0
- /package/dist/{take-07165139.cjs.prod.js → take-b7490c29.cjs.prod.js} +0 -0
package/src/internal/Context.ts
CHANGED
|
@@ -6,6 +6,7 @@ import * as Hash from "../Hash"
|
|
|
6
6
|
import { NodeInspectSymbol, toJSON, toString } from "../Inspectable"
|
|
7
7
|
import type * as O from "../Option"
|
|
8
8
|
import { pipeArguments } from "../Pipeable"
|
|
9
|
+
import { hasProperty } from "../Predicate"
|
|
9
10
|
import type * as STM from "../STM"
|
|
10
11
|
import { EffectPrototype, effectVariance } from "./Effectable"
|
|
11
12
|
import * as option from "./Option"
|
|
@@ -147,10 +148,10 @@ const serviceNotFoundError = (tag: C.Tag<any, any>) => {
|
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
/** @internal */
|
|
150
|
-
export const isContext = (u: unknown): u is C.Context<never> =>
|
|
151
|
+
export const isContext = (u: unknown): u is C.Context<never> => hasProperty(u, TypeId)
|
|
151
152
|
|
|
152
153
|
/** @internal */
|
|
153
|
-
export const isTag = (u: unknown): u is C.Tag<any, any> =>
|
|
154
|
+
export const isTag = (u: unknown): u is C.Tag<any, any> => hasProperty(u, TagTypeId)
|
|
154
155
|
|
|
155
156
|
const _empty = makeContext(new Map())
|
|
156
157
|
|
|
@@ -8,6 +8,7 @@ import type * as Sink from "../Sink"
|
|
|
8
8
|
import type * as Stream from "../Stream"
|
|
9
9
|
import * as Data from "./Data"
|
|
10
10
|
import * as OpCodes from "./opCodes/effect"
|
|
11
|
+
import { moduleVersion } from "./version"
|
|
11
12
|
|
|
12
13
|
/** @internal */
|
|
13
14
|
export const EffectTypeId: Effect.EffectTypeId = Symbol.for("effect/Effect") as Effect.EffectTypeId
|
|
@@ -25,7 +26,8 @@ export const ChannelTypeId: Channel.ChannelTypeId = Symbol.for("effect/Channel")
|
|
|
25
26
|
export const effectVariance = {
|
|
26
27
|
_R: (_: never) => _,
|
|
27
28
|
_E: (_: never) => _,
|
|
28
|
-
_A: (_: never) => _
|
|
29
|
+
_A: (_: never) => _,
|
|
30
|
+
_V: moduleVersion
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
/** @internal */
|
package/src/internal/Either.ts
CHANGED
|
@@ -9,6 +9,7 @@ import * as Hash from "../Hash"
|
|
|
9
9
|
import { NodeInspectSymbol, toJSON, toString } from "../Inspectable"
|
|
10
10
|
import * as option from "../internal/Option"
|
|
11
11
|
import type { Option } from "../Option"
|
|
12
|
+
import { hasProperty } from "../Predicate"
|
|
12
13
|
import { EffectPrototype } from "./Effectable"
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -66,8 +67,7 @@ const LeftProto = Object.assign(Object.create(CommonProto), {
|
|
|
66
67
|
})
|
|
67
68
|
|
|
68
69
|
/** @internal */
|
|
69
|
-
export const isEither = (input: unknown): input is Either.Either<unknown, unknown> =>
|
|
70
|
-
typeof input === "object" && input != null && TypeId in input
|
|
70
|
+
export const isEither = (input: unknown): input is Either.Either<unknown, unknown> => hasProperty(input, TypeId)
|
|
71
71
|
|
|
72
72
|
/** @internal */
|
|
73
73
|
export const isLeft = <E, A>(ma: Either.Either<E, A>): ma is Either.Left<E, A> => ma._tag === "Left"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type * as Encoding from "../../Encoding"
|
|
2
|
+
import { hasProperty } from "../../Predicate"
|
|
2
3
|
|
|
3
4
|
/** @internal */
|
|
4
5
|
export const DecodeExceptionTypeId: Encoding.DecodeExceptionTypeId = Symbol.for(
|
|
@@ -14,8 +15,7 @@ export const DecodeException = (input: string, message?: string): Encoding.Decod
|
|
|
14
15
|
})
|
|
15
16
|
|
|
16
17
|
/** @internal */
|
|
17
|
-
export const isDecodeException = (u: unknown): u is Encoding.DecodeException =>
|
|
18
|
-
typeof u === "object" && u != null && DecodeExceptionTypeId in u
|
|
18
|
+
export const isDecodeException = (u: unknown): u is Encoding.DecodeException => hasProperty(u, DecodeExceptionTypeId)
|
|
19
19
|
|
|
20
20
|
/** @interal */
|
|
21
21
|
export const encoder = new TextEncoder()
|
|
@@ -5,6 +5,7 @@ import { fromBitmap, hashFragment, toBitmap } from "../../internal/HashMap/bitwi
|
|
|
5
5
|
import { MAX_INDEX_NODE, MIN_ARRAY_NODE, SIZE } from "../../internal/HashMap/config"
|
|
6
6
|
import { Stack } from "../../internal/Stack"
|
|
7
7
|
import * as O from "../../Option"
|
|
8
|
+
import { isTagged } from "../../Predicate"
|
|
8
9
|
|
|
9
10
|
/** @internal */
|
|
10
11
|
export type Node<K, V> =
|
|
@@ -40,7 +41,7 @@ export class EmptyNode<K, V> {
|
|
|
40
41
|
|
|
41
42
|
/** @internal */
|
|
42
43
|
export function isEmptyNode(a: unknown): a is EmptyNode<unknown, unknown> {
|
|
43
|
-
return
|
|
44
|
+
return isTagged(a, "EmptyNode")
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
/** @internal */
|
package/src/internal/HashMap.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { SIZE } from "../internal/HashMap/config"
|
|
|
9
9
|
import * as Node from "../internal/HashMap/node"
|
|
10
10
|
import * as Option from "../Option"
|
|
11
11
|
import { pipeArguments } from "../Pipeable"
|
|
12
|
-
import {
|
|
12
|
+
import { hasProperty } from "../Predicate"
|
|
13
13
|
|
|
14
14
|
/** @internal */
|
|
15
15
|
export const HashMapTypeId: HM.TypeId = Symbol.for("effect/HashMap") as HM.TypeId
|
|
@@ -199,7 +199,7 @@ export const fromIterable = <K, V>(entries: Iterable<readonly [K, V]>): HM.HashM
|
|
|
199
199
|
export const isHashMap: {
|
|
200
200
|
<K, V>(u: Iterable<readonly [K, V]>): u is HM.HashMap<K, V>
|
|
201
201
|
(u: unknown): u is HM.HashMap<unknown, unknown>
|
|
202
|
-
} = (u: unknown): u is HM.HashMap<unknown, unknown> =>
|
|
202
|
+
} = (u: unknown): u is HM.HashMap<unknown, unknown> => hasProperty(u, HashMapTypeId)
|
|
203
203
|
|
|
204
204
|
/** @internal */
|
|
205
205
|
export const isEmpty = <K, V>(self: HM.HashMap<K, V>): boolean =>
|
package/src/internal/HashSet.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { NodeInspectSymbol, toJSON, toString } from "../Inspectable"
|
|
|
7
7
|
import * as HM from "../internal/HashMap"
|
|
8
8
|
import { pipeArguments } from "../Pipeable"
|
|
9
9
|
import type { Predicate, Refinement } from "../Predicate"
|
|
10
|
-
import {
|
|
10
|
+
import { hasProperty } from "../Predicate"
|
|
11
11
|
|
|
12
12
|
/** @internal */
|
|
13
13
|
export const HashSetTypeId: HS.TypeId = Symbol.for("effect/HashSet") as HS.TypeId
|
|
@@ -62,7 +62,7 @@ export const makeImpl = <A>(keyMap: HashMap<A, unknown>): HashSetImpl<A> => {
|
|
|
62
62
|
export const isHashSet: {
|
|
63
63
|
<A>(u: Iterable<A>): u is HS.HashSet<A>
|
|
64
64
|
(u: unknown): u is HS.HashSet<unknown>
|
|
65
|
-
} = (u: unknown): u is HS.HashSet<unknown> =>
|
|
65
|
+
} = (u: unknown): u is HS.HashSet<unknown> => hasProperty(u, HashSetTypeId)
|
|
66
66
|
|
|
67
67
|
const _empty = makeImpl<never>(HM.empty())
|
|
68
68
|
|
package/src/internal/Option.ts
CHANGED
|
@@ -6,6 +6,7 @@ import * as Equal from "../Equal"
|
|
|
6
6
|
import * as Hash from "../Hash"
|
|
7
7
|
import { NodeInspectSymbol, toJSON, toString } from "../Inspectable"
|
|
8
8
|
import type * as Option from "../Option"
|
|
9
|
+
import { hasProperty } from "../Predicate"
|
|
9
10
|
import { EffectPrototype } from "./Effectable"
|
|
10
11
|
|
|
11
12
|
const TypeId: Option.TypeId = Symbol.for("effect/Option") as Option.TypeId
|
|
@@ -59,8 +60,7 @@ const NoneProto = Object.assign(Object.create(CommonProto), {
|
|
|
59
60
|
})
|
|
60
61
|
|
|
61
62
|
/** @internal */
|
|
62
|
-
export const isOption = (input: unknown): input is Option.Option<unknown> =>
|
|
63
|
-
typeof input === "object" && input != null && TypeId in input
|
|
63
|
+
export const isOption = (input: unknown): input is Option.Option<unknown> => hasProperty(input, TypeId)
|
|
64
64
|
|
|
65
65
|
/** @internal */
|
|
66
66
|
export const isNone = <A>(fa: Option.Option<A>): fa is Option.None<A> => fa._tag === "None"
|
|
@@ -10,7 +10,7 @@ import * as Option from "../Option"
|
|
|
10
10
|
import type * as Order from "../Order"
|
|
11
11
|
import type * as Ordering from "../Ordering"
|
|
12
12
|
import { pipeArguments } from "../Pipeable"
|
|
13
|
-
import {
|
|
13
|
+
import { hasProperty } from "../Predicate"
|
|
14
14
|
import type * as RBT from "../RedBlackTree"
|
|
15
15
|
|
|
16
16
|
const RedBlackTreeSymbolKey = "effect/RedBlackTree"
|
|
@@ -75,7 +75,7 @@ const makeImpl = <K, V>(ord: Order.Order<K>, root: Node.Node<K, V> | undefined):
|
|
|
75
75
|
export const isRedBlackTree: {
|
|
76
76
|
<K, V>(u: Iterable<readonly [K, V]>): u is RBT.RedBlackTree<K, V>
|
|
77
77
|
(u: unknown): u is RBT.RedBlackTree<unknown, unknown>
|
|
78
|
-
} = (u: unknown): u is RBT.RedBlackTree<unknown, unknown> =>
|
|
78
|
+
} = (u: unknown): u is RBT.RedBlackTree<unknown, unknown> => hasProperty(u, RedBlackTreeTypeId)
|
|
79
79
|
|
|
80
80
|
/** @internal */
|
|
81
81
|
export const empty = <K, V = never>(ord: Order.Order<K>): RBT.RedBlackTree<K, V> => makeImpl<K, V>(ord, undefined)
|
|
@@ -5,6 +5,7 @@ import type { FiberId } from "../FiberId"
|
|
|
5
5
|
import * as HashMap from "../HashMap"
|
|
6
6
|
import * as List from "../List"
|
|
7
7
|
import * as Option from "../Option"
|
|
8
|
+
import { hasProperty } from "../Predicate"
|
|
8
9
|
import type * as Request from "../Request"
|
|
9
10
|
import type * as RequestBlock from "../RequestBlock"
|
|
10
11
|
import type * as RequestResolver from "../RequestResolver"
|
|
@@ -329,9 +330,7 @@ const blockedRequestVariance = {
|
|
|
329
330
|
}
|
|
330
331
|
|
|
331
332
|
/** @internal */
|
|
332
|
-
export const isEntry = (u: unknown): u is Request.Entry<unknown> =>
|
|
333
|
-
return typeof u === "object" && u != null && EntryTypeId in u
|
|
334
|
-
}
|
|
333
|
+
export const isEntry = (u: unknown): u is Request.Entry<unknown> => hasProperty(u, EntryTypeId)
|
|
335
334
|
|
|
336
335
|
/** @internal */
|
|
337
336
|
export const makeEntry = <A extends Request.Request<any, any>>(
|
package/src/internal/cache.ts
CHANGED
|
@@ -14,6 +14,7 @@ import * as MutableHashMap from "../MutableHashMap"
|
|
|
14
14
|
import * as MutableQueue from "../MutableQueue"
|
|
15
15
|
import * as MutableRef from "../MutableRef"
|
|
16
16
|
import * as Option from "../Option"
|
|
17
|
+
import { hasProperty } from "../Predicate"
|
|
17
18
|
import * as core from "./core"
|
|
18
19
|
import * as effect from "./core-effect"
|
|
19
20
|
import * as Data from "./Data"
|
|
@@ -140,7 +141,7 @@ class MapKeyImpl<K> implements MapKey<K> {
|
|
|
140
141
|
export const makeMapKey = <K>(current: K): MapKey<K> => new MapKeyImpl(current)
|
|
141
142
|
|
|
142
143
|
/** @internal */
|
|
143
|
-
export const isMapKey = (u: unknown): u is MapKey<unknown> =>
|
|
144
|
+
export const isMapKey = (u: unknown): u is MapKey<unknown> => hasProperty(u, MapKeyTypeId)
|
|
144
145
|
|
|
145
146
|
/**
|
|
146
147
|
* A `KeySet` is a sorted set of keys in the cache ordered by last access.
|
package/src/internal/cause.ts
CHANGED
|
@@ -9,7 +9,7 @@ import * as HashSet from "../HashSet"
|
|
|
9
9
|
import { NodeInspectSymbol, toJSON } from "../Inspectable"
|
|
10
10
|
import * as Option from "../Option"
|
|
11
11
|
import { pipeArguments } from "../Pipeable"
|
|
12
|
-
import type
|
|
12
|
+
import { hasProperty, isFunction, type Predicate } from "../Predicate"
|
|
13
13
|
import * as ReadonlyArray from "../ReadonlyArray"
|
|
14
14
|
import * as OpCodes from "./opCodes/cause"
|
|
15
15
|
|
|
@@ -128,7 +128,7 @@ export const sequential = <E, E2>(left: Cause.Cause<E>, right: Cause.Cause<E2>):
|
|
|
128
128
|
// -----------------------------------------------------------------------------
|
|
129
129
|
|
|
130
130
|
/** @internal */
|
|
131
|
-
export const isCause = (u: unknown): u is Cause.Cause<never> =>
|
|
131
|
+
export const isCause = (u: unknown): u is Cause.Cause<never> => hasProperty(u, CauseTypeId)
|
|
132
132
|
|
|
133
133
|
/** @internal */
|
|
134
134
|
export const isEmptyType = <E>(self: Cause.Cause<E>): self is Cause.Empty => self._tag === OpCodes.OP_EMPTY
|
|
@@ -1015,9 +1015,7 @@ export const RuntimeException = makeException<Cause.RuntimeException>({
|
|
|
1015
1015
|
}, "RuntimeException")
|
|
1016
1016
|
|
|
1017
1017
|
/** @internal */
|
|
1018
|
-
export const isRuntimeException = (u: unknown): u is Cause.RuntimeException =>
|
|
1019
|
-
return typeof u === "object" && u != null && RuntimeExceptionTypeId in u
|
|
1020
|
-
}
|
|
1018
|
+
export const isRuntimeException = (u: unknown): u is Cause.RuntimeException => hasProperty(u, RuntimeExceptionTypeId)
|
|
1021
1019
|
|
|
1022
1020
|
/** @internal */
|
|
1023
1021
|
export const InterruptedExceptionTypeId: Cause.InterruptedExceptionTypeId = Symbol.for(
|
|
@@ -1030,9 +1028,8 @@ export const InterruptedException = makeException<Cause.InterruptedException>({
|
|
|
1030
1028
|
}, "InterruptedException")
|
|
1031
1029
|
|
|
1032
1030
|
/** @internal */
|
|
1033
|
-
export const isInterruptedException = (u: unknown): u is Cause.InterruptedException =>
|
|
1034
|
-
|
|
1035
|
-
}
|
|
1031
|
+
export const isInterruptedException = (u: unknown): u is Cause.InterruptedException =>
|
|
1032
|
+
hasProperty(u, InterruptedExceptionTypeId)
|
|
1036
1033
|
|
|
1037
1034
|
/** @internal */
|
|
1038
1035
|
export const IllegalArgumentExceptionTypeId: Cause.IllegalArgumentExceptionTypeId = Symbol.for(
|
|
@@ -1045,9 +1042,8 @@ export const IllegalArgumentException = makeException<Cause.IllegalArgumentExcep
|
|
|
1045
1042
|
}, "IllegalArgumentException")
|
|
1046
1043
|
|
|
1047
1044
|
/** @internal */
|
|
1048
|
-
export const isIllegalArgumentException = (u: unknown): u is Cause.IllegalArgumentException =>
|
|
1049
|
-
|
|
1050
|
-
}
|
|
1045
|
+
export const isIllegalArgumentException = (u: unknown): u is Cause.IllegalArgumentException =>
|
|
1046
|
+
hasProperty(u, IllegalArgumentExceptionTypeId)
|
|
1051
1047
|
|
|
1052
1048
|
/** @internal */
|
|
1053
1049
|
export const NoSuchElementExceptionTypeId: Cause.NoSuchElementExceptionTypeId = Symbol.for(
|
|
@@ -1060,9 +1056,8 @@ export const NoSuchElementException = makeException<Cause.NoSuchElementException
|
|
|
1060
1056
|
}, "NoSuchElementException")
|
|
1061
1057
|
|
|
1062
1058
|
/** @internal */
|
|
1063
|
-
export const isNoSuchElementException = (u: unknown): u is Cause.NoSuchElementException =>
|
|
1064
|
-
|
|
1065
|
-
}
|
|
1059
|
+
export const isNoSuchElementException = (u: unknown): u is Cause.NoSuchElementException =>
|
|
1060
|
+
hasProperty(u, NoSuchElementExceptionTypeId)
|
|
1066
1061
|
|
|
1067
1062
|
/** @internal */
|
|
1068
1063
|
export const InvalidPubSubCapacityExceptionTypeId: Cause.InvalidPubSubCapacityExceptionTypeId = Symbol.for(
|
|
@@ -1075,9 +1070,8 @@ export const InvalidPubSubCapacityException = makeException<Cause.InvalidPubSubC
|
|
|
1075
1070
|
}, "InvalidPubSubCapacityException")
|
|
1076
1071
|
|
|
1077
1072
|
/** @internal */
|
|
1078
|
-
export const isInvalidCapacityError = (u: unknown): u is Cause.InvalidPubSubCapacityException =>
|
|
1079
|
-
|
|
1080
|
-
}
|
|
1073
|
+
export const isInvalidCapacityError = (u: unknown): u is Cause.InvalidPubSubCapacityException =>
|
|
1074
|
+
hasProperty(u, InvalidPubSubCapacityExceptionTypeId)
|
|
1081
1075
|
|
|
1082
1076
|
// -----------------------------------------------------------------------------
|
|
1083
1077
|
// Pretty Printing
|
|
@@ -1163,10 +1157,8 @@ export const prettyErrorMessage = (u: unknown): string => {
|
|
|
1163
1157
|
}
|
|
1164
1158
|
// 2)
|
|
1165
1159
|
if (
|
|
1166
|
-
|
|
1167
|
-
u
|
|
1168
|
-
"toString" in u &&
|
|
1169
|
-
typeof u["toString"] === "function" &&
|
|
1160
|
+
hasProperty(u, "toString") &&
|
|
1161
|
+
isFunction(u["toString"]) &&
|
|
1170
1162
|
u["toString"] !== Object.prototype.toString
|
|
1171
1163
|
) {
|
|
1172
1164
|
return u["toString"]()
|
|
@@ -1178,8 +1170,8 @@ export const prettyErrorMessage = (u: unknown): string => {
|
|
|
1178
1170
|
const spanSymbol = Symbol.for("effect/SpanAnnotation")
|
|
1179
1171
|
|
|
1180
1172
|
const defaultRenderError = (error: unknown): PrettyError => {
|
|
1181
|
-
const span =
|
|
1182
|
-
if (
|
|
1173
|
+
const span: any = hasProperty(error, spanSymbol) && error[spanSymbol]
|
|
1174
|
+
if (error instanceof Error) {
|
|
1183
1175
|
return new PrettyError(
|
|
1184
1176
|
prettyErrorMessage(error),
|
|
1185
1177
|
error.stack?.split("\n").filter((_) => _.match(/at (.*)/)).join("\n"),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as Effect from "../../Effect"
|
|
2
2
|
import type * as Exit from "../../Exit"
|
|
3
|
+
import { hasProperty } from "../../Predicate"
|
|
3
4
|
import * as OpCodes from "../opCodes/channelState"
|
|
4
5
|
import type { ErasedExecutor } from "./channelExecutor"
|
|
5
6
|
|
|
@@ -107,8 +108,7 @@ export const Read = <R>(
|
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
/** @internal */
|
|
110
|
-
export const isChannelState = (u: unknown): u is ChannelState<unknown, unknown> =>
|
|
111
|
-
typeof u === "object" && u != null && ChannelStateTypeId in u
|
|
111
|
+
export const isChannelState = (u: unknown): u is ChannelState<unknown, unknown> => hasProperty(u, ChannelStateTypeId)
|
|
112
112
|
|
|
113
113
|
/** @internal */
|
|
114
114
|
export const isDone = <R, E>(self: ChannelState<R, E>): self is Done => (self as Primitive)._tag === OpCodes.OP_DONE
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as ChildExecutorDecision from "../../ChannelChildExecutorDecision"
|
|
2
2
|
import { dual } from "../../Function"
|
|
3
|
+
import { hasProperty } from "../../Predicate"
|
|
3
4
|
import * as OpCodes from "../opCodes/channelChildExecutorDecision"
|
|
4
5
|
|
|
5
6
|
/** @internal */
|
|
@@ -39,7 +40,7 @@ export const Yield = (_: void): ChildExecutorDecision.ChildExecutorDecision => {
|
|
|
39
40
|
|
|
40
41
|
/** @internal */
|
|
41
42
|
export const isChildExecutorDecision = (u: unknown): u is ChildExecutorDecision.ChildExecutorDecision =>
|
|
42
|
-
|
|
43
|
+
hasProperty(u, ChildExecutorDecisionTypeId)
|
|
43
44
|
|
|
44
45
|
/** @internal */
|
|
45
46
|
export const isContinue = (
|
|
@@ -2,6 +2,7 @@ import type * as MergeDecision from "../../ChannelMergeDecision"
|
|
|
2
2
|
import type * as Effect from "../../Effect"
|
|
3
3
|
import type * as Exit from "../../Exit"
|
|
4
4
|
import { dual } from "../../Function"
|
|
5
|
+
import { hasProperty } from "../../Predicate"
|
|
5
6
|
import * as OpCodes from "../opCodes/channelMergeDecision"
|
|
6
7
|
|
|
7
8
|
/** @internal */
|
|
@@ -78,8 +79,7 @@ export const AwaitConst = <R, E, Z>(
|
|
|
78
79
|
/** @internal */
|
|
79
80
|
export const isMergeDecision = (
|
|
80
81
|
u: unknown
|
|
81
|
-
): u is MergeDecision.MergeDecision<unknown, unknown, unknown, unknown, unknown> =>
|
|
82
|
-
typeof u === "object" && u != null && MergeDecisionTypeId in u
|
|
82
|
+
): u is MergeDecision.MergeDecision<unknown, unknown, unknown, unknown, unknown> => hasProperty(u, MergeDecisionTypeId)
|
|
83
83
|
|
|
84
84
|
/** @internal */
|
|
85
85
|
export const match = dual<
|
|
@@ -4,6 +4,7 @@ import type * as Either from "../../Either"
|
|
|
4
4
|
import type * as Exit from "../../Exit"
|
|
5
5
|
import type * as Fiber from "../../Fiber"
|
|
6
6
|
import { dual } from "../../Function"
|
|
7
|
+
import { hasProperty } from "../../Predicate"
|
|
7
8
|
import * as OpCodes from "../opCodes/channelMergeState"
|
|
8
9
|
|
|
9
10
|
/** @internal */
|
|
@@ -54,9 +55,8 @@ export const RightDone = <Env, Err, Err1, Err2, Elem, Done, Done1, Done2>(
|
|
|
54
55
|
/** @internal */
|
|
55
56
|
export const isMergeState = (
|
|
56
57
|
u: unknown
|
|
57
|
-
): u is MergeState.MergeState<unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown> =>
|
|
58
|
-
|
|
59
|
-
}
|
|
58
|
+
): u is MergeState.MergeState<unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown> =>
|
|
59
|
+
hasProperty(u, MergeStateTypeId)
|
|
60
60
|
|
|
61
61
|
/** @internal */
|
|
62
62
|
export const isBothRunning = <Env, Err, Err1, Err2, Elem, Done, Done1, Done2>(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as MergeStrategy from "../../ChannelMergeStrategy"
|
|
2
2
|
import { dual } from "../../Function"
|
|
3
|
+
import { hasProperty } from "../../Predicate"
|
|
3
4
|
import * as OpCodes from "../opCodes/channelMergeStrategy"
|
|
4
5
|
|
|
5
6
|
/** @internal */
|
|
@@ -30,8 +31,7 @@ export const BufferSliding = (_: void): MergeStrategy.MergeStrategy => {
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
/** @internal */
|
|
33
|
-
export const isMergeStrategy = (u: unknown): u is MergeStrategy.MergeStrategy =>
|
|
34
|
-
typeof u === "object" && u != null && MergeStrategyTypeId in u
|
|
34
|
+
export const isMergeStrategy = (u: unknown): u is MergeStrategy.MergeStrategy => hasProperty(u, MergeStrategyTypeId)
|
|
35
35
|
|
|
36
36
|
/** @internal */
|
|
37
37
|
export const isBackPressure = (self: MergeStrategy.MergeStrategy): self is MergeStrategy.BackPressure =>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as UpstreamPullRequest from "../../ChannelUpstreamPullRequest"
|
|
2
2
|
import { dual } from "../../Function"
|
|
3
|
+
import { hasProperty } from "../../Predicate"
|
|
3
4
|
import * as OpCodes from "../opCodes/channelUpstreamPullRequest"
|
|
4
5
|
|
|
5
6
|
/** @internal */
|
|
@@ -38,7 +39,7 @@ export const NoUpstream = (activeDownstreamCount: number): UpstreamPullRequest.U
|
|
|
38
39
|
|
|
39
40
|
/** @internal */
|
|
40
41
|
export const isUpstreamPullRequest = (u: unknown): u is UpstreamPullRequest.UpstreamPullRequest<unknown> =>
|
|
41
|
-
|
|
42
|
+
hasProperty(u, UpstreamPullRequestTypeId)
|
|
42
43
|
|
|
43
44
|
/** @internal */
|
|
44
45
|
export const isPulled = <A>(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as UpstreamPullStrategy from "../../ChannelUpstreamPullStrategy"
|
|
2
2
|
import { dual } from "../../Function"
|
|
3
3
|
import type * as Option from "../../Option"
|
|
4
|
+
import { hasProperty } from "../../Predicate"
|
|
4
5
|
import * as OpCodes from "../opCodes/channelUpstreamPullStrategy"
|
|
5
6
|
|
|
6
7
|
/** @internal */
|
|
@@ -41,7 +42,7 @@ export const PullAfterAllEnqueued = <A>(
|
|
|
41
42
|
|
|
42
43
|
/** @internal */
|
|
43
44
|
export const isUpstreamPullStrategy = (u: unknown): u is UpstreamPullStrategy.UpstreamPullStrategy<unknown> =>
|
|
44
|
-
|
|
45
|
+
hasProperty(u, UpstreamPullStrategyTypeId)
|
|
45
46
|
|
|
46
47
|
/** @internal */
|
|
47
48
|
export const isPullAfterNext = <A>(
|
package/src/internal/channel.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { constVoid, dual, identity, pipe } from "../Function"
|
|
|
16
16
|
import type { LazyArg } from "../Function"
|
|
17
17
|
import * as Layer from "../Layer"
|
|
18
18
|
import * as Option from "../Option"
|
|
19
|
-
import type
|
|
19
|
+
import { hasProperty, type Predicate } from "../Predicate"
|
|
20
20
|
import * as PubSub from "../PubSub"
|
|
21
21
|
import * as Queue from "../Queue"
|
|
22
22
|
import * as Ref from "../Ref"
|
|
@@ -2517,4 +2517,4 @@ export const ChannelException = <E>(error: E): Channel.ChannelException<E> => ({
|
|
|
2517
2517
|
|
|
2518
2518
|
/** @internal */
|
|
2519
2519
|
export const isChannelException = (u: unknown): u is Channel.ChannelException<unknown> =>
|
|
2520
|
-
|
|
2520
|
+
hasProperty(u, ChannelExceptionTypeId)
|
package/src/internal/clock.ts
CHANGED
|
@@ -49,7 +49,7 @@ const performanceNowNanos = (function() {
|
|
|
49
49
|
|
|
50
50
|
const origin = "timeOrigin" in performance && typeof performance.timeOrigin === "number" ?
|
|
51
51
|
BigInt(Math.round(performance.timeOrigin * 1_000_000)) :
|
|
52
|
-
BigInt(Date.now()) * bigint1e6
|
|
52
|
+
(BigInt(Date.now()) * bigint1e6) - BigInt(Math.round(performance.now() * 1_000_000))
|
|
53
53
|
|
|
54
54
|
return () => origin + BigInt(Math.round(performance.now() * 1_000_000))
|
|
55
55
|
})()
|
package/src/internal/config.ts
CHANGED
|
@@ -14,7 +14,7 @@ import * as OpCodes from "../internal/opCodes/config"
|
|
|
14
14
|
import type * as LogLevel from "../LogLevel"
|
|
15
15
|
import * as Option from "../Option"
|
|
16
16
|
import { pipeArguments } from "../Pipeable"
|
|
17
|
-
import type
|
|
17
|
+
import { hasProperty, type Predicate, type Refinement } from "../Predicate"
|
|
18
18
|
|
|
19
19
|
/** @internal */
|
|
20
20
|
const ConfigSymbolKey = "effect/Config"
|
|
@@ -483,8 +483,7 @@ export const hashMap = <A>(config: Config.Config<A>, name?: string): Config.Conf
|
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
/** @internal */
|
|
486
|
-
export const isConfig = (u: unknown): u is Config.Config<unknown> =>
|
|
487
|
-
typeof u === "object" && u != null && ConfigTypeId in u
|
|
486
|
+
export const isConfig = (u: unknown): u is Config.Config<unknown> => hasProperty(u, ConfigTypeId)
|
|
488
487
|
|
|
489
488
|
/** @internal */
|
|
490
489
|
const tuple = <T extends ArrayLike<Config.Config<any>>>(tuple: T): Config.Config<
|
|
@@ -3,6 +3,7 @@ import type * as ConfigError from "../ConfigError"
|
|
|
3
3
|
import * as Either from "../Either"
|
|
4
4
|
import { constFalse, constTrue, dual, pipe } from "../Function"
|
|
5
5
|
import * as OpCodes from "../internal/opCodes/configError"
|
|
6
|
+
import { hasProperty } from "../Predicate"
|
|
6
7
|
import * as RA from "../ReadonlyArray"
|
|
7
8
|
|
|
8
9
|
/** @internal */
|
|
@@ -131,8 +132,7 @@ export const Unsupported = (
|
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
/** @internal */
|
|
134
|
-
export const isConfigError = (u: unknown): u is ConfigError.ConfigError =>
|
|
135
|
-
typeof u === "object" && u != null && ConfigErrorTypeId in u
|
|
135
|
+
export const isConfigError = (u: unknown): u is ConfigError.ConfigError => hasProperty(u, ConfigErrorTypeId)
|
|
136
136
|
|
|
137
137
|
/** @internal */
|
|
138
138
|
export const isAnd = (self: ConfigError.ConfigError): self is ConfigError.And => self._tag === OpCodes.OP_AND
|
|
@@ -3,6 +3,7 @@ import type * as ConfigSecret from "../ConfigSecret"
|
|
|
3
3
|
import * as Equal from "../Equal"
|
|
4
4
|
import { pipe } from "../Function"
|
|
5
5
|
import * as Hash from "../Hash"
|
|
6
|
+
import { hasProperty } from "../Predicate"
|
|
6
7
|
|
|
7
8
|
/** @internal */
|
|
8
9
|
const ConfigSecretSymbolKey = "effect/ConfigSecret"
|
|
@@ -28,9 +29,7 @@ export const proto = {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
/** @internal */
|
|
31
|
-
export const isConfigSecret = (u: unknown): u is ConfigSecret.ConfigSecret =>
|
|
32
|
-
return typeof u === "object" && u != null && ConfigSecretTypeId in u
|
|
33
|
-
}
|
|
32
|
+
export const isConfigSecret = (u: unknown): u is ConfigSecret.ConfigSecret => hasProperty(u, ConfigSecretTypeId)
|
|
34
33
|
|
|
35
34
|
/** @internal */
|
|
36
35
|
export const make = (bytes: Array<number>): ConfigSecret.ConfigSecret => {
|
|
@@ -143,7 +143,7 @@ export const _catch = dual<
|
|
|
143
143
|
3,
|
|
144
144
|
(self, tag, options) =>
|
|
145
145
|
core.catchAll(self, (e) => {
|
|
146
|
-
if (
|
|
146
|
+
if (Predicate.hasProperty(e, tag) && e[tag] === options.failure) {
|
|
147
147
|
return options.onFailure(e as any)
|
|
148
148
|
}
|
|
149
149
|
return core.fail(e as any)
|
|
@@ -303,9 +303,9 @@ export const catchTags: {
|
|
|
303
303
|
self,
|
|
304
304
|
(e): e is { readonly _tag: string } => {
|
|
305
305
|
keys ??= Object.keys(cases)
|
|
306
|
-
return Predicate.
|
|
306
|
+
return Predicate.hasProperty(e, "_tag") && Predicate.isString(e["_tag"]) && keys.includes(e["_tag"])
|
|
307
307
|
},
|
|
308
|
-
(e) => cases[e["_tag"]
|
|
308
|
+
(e) => cases[e["_tag"]](e)
|
|
309
309
|
)
|
|
310
310
|
})
|
|
311
311
|
|
|
@@ -13,6 +13,7 @@ import { constVoid, dual, identity } from "../Function"
|
|
|
13
13
|
import type { LazyArg } from "../Function"
|
|
14
14
|
import * as Option from "../Option"
|
|
15
15
|
import { pipeArguments } from "../Pipeable"
|
|
16
|
+
import { hasProperty } from "../Predicate"
|
|
16
17
|
import * as childExecutorDecision from "./channel/childExecutorDecision"
|
|
17
18
|
import type { ErasedContinuationK } from "./channel/continuation"
|
|
18
19
|
import { ContinuationKImpl } from "./channel/continuation"
|
|
@@ -195,7 +196,7 @@ export const isChannel = (u: unknown): u is Channel.Channel<
|
|
|
195
196
|
unknown,
|
|
196
197
|
unknown,
|
|
197
198
|
unknown
|
|
198
|
-
> => (
|
|
199
|
+
> => hasProperty(u, ChannelTypeId) || Effect.isEffect(u)
|
|
199
200
|
|
|
200
201
|
/** @internal */
|
|
201
202
|
export const acquireReleaseOut = dual<
|
package/src/internal/core.ts
CHANGED
|
@@ -35,7 +35,7 @@ import type * as MetricLabel from "../MetricLabel"
|
|
|
35
35
|
import * as MutableRef from "../MutableRef"
|
|
36
36
|
import * as Option from "../Option"
|
|
37
37
|
import { pipeArguments } from "../Pipeable"
|
|
38
|
-
import type
|
|
38
|
+
import { hasProperty, isObject, type Predicate, type Refinement } from "../Predicate"
|
|
39
39
|
import * as ReadonlyArray from "../ReadonlyArray"
|
|
40
40
|
import type * as Request from "../Request"
|
|
41
41
|
import type * as BlockedRequests from "../RequestBlock"
|
|
@@ -44,6 +44,7 @@ import type * as RuntimeFlags from "../RuntimeFlags"
|
|
|
44
44
|
import * as RuntimeFlagsPatch from "../RuntimeFlagsPatch"
|
|
45
45
|
import type * as Scope from "../Scope"
|
|
46
46
|
import type * as Tracer from "../Tracer"
|
|
47
|
+
import { effectVariance } from "./Effectable"
|
|
47
48
|
|
|
48
49
|
// -----------------------------------------------------------------------------
|
|
49
50
|
// Effect
|
|
@@ -66,8 +67,7 @@ export interface EffectError<E> {
|
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
/** @internal */
|
|
69
|
-
export const isEffectError = (u: unknown): u is EffectError<unknown> =>
|
|
70
|
-
typeof u === "object" && u != null && EffectErrorTypeId in u
|
|
70
|
+
export const isEffectError = (u: unknown): u is EffectError<unknown> => hasProperty(u, EffectErrorTypeId)
|
|
71
71
|
|
|
72
72
|
/** @internal */
|
|
73
73
|
export const makeEffectError = <E>(cause: Cause.Cause<E>): EffectError<E> => ({
|
|
@@ -253,13 +253,6 @@ class EffectPrimitiveSuccess {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
/** @internal */
|
|
257
|
-
const effectVariance = {
|
|
258
|
-
_R: (_: never) => _,
|
|
259
|
-
_E: (_: never) => _,
|
|
260
|
-
_A: (_: never) => _
|
|
261
|
-
}
|
|
262
|
-
|
|
263
256
|
/** @internal */
|
|
264
257
|
export type Op<Tag extends string, Body = {}> = Effect.Effect<never, never, never> & Body & {
|
|
265
258
|
readonly _op: Tag
|
|
@@ -379,8 +372,7 @@ export interface WithRuntime extends
|
|
|
379
372
|
export interface Yield extends Op<OpCodes.OP_YIELD> {}
|
|
380
373
|
|
|
381
374
|
/** @internal */
|
|
382
|
-
export const isEffect = (u: unknown): u is Effect.Effect<unknown, unknown, unknown> =>
|
|
383
|
-
typeof u === "object" && u != null && EffectTypeId in u
|
|
375
|
+
export const isEffect = (u: unknown): u is Effect.Effect<unknown, unknown, unknown> => hasProperty(u, EffectTypeId)
|
|
384
376
|
|
|
385
377
|
/* @internal */
|
|
386
378
|
export const withFiberRuntime = <R, E, A>(
|
|
@@ -610,7 +602,7 @@ const originalSymbol = Symbol.for("effect/OriginalAnnotation")
|
|
|
610
602
|
|
|
611
603
|
/* @internal */
|
|
612
604
|
export const originalInstance = <E>(obj: E): E => {
|
|
613
|
-
if (
|
|
605
|
+
if (hasProperty(obj, originalSymbol)) {
|
|
614
606
|
// @ts-expect-error
|
|
615
607
|
return obj[originalSymbol]
|
|
616
608
|
}
|
|
@@ -641,7 +633,7 @@ const capture = <E>(obj: E & object, span: Option.Option<Tracer.Span>): E => {
|
|
|
641
633
|
|
|
642
634
|
/* @internal */
|
|
643
635
|
export const die = (defect: unknown): Effect.Effect<never, never, never> =>
|
|
644
|
-
|
|
636
|
+
isObject(defect) && !(spanSymbol in defect) ?
|
|
645
637
|
withFiberRuntime((fiber) => failCause(internalCause.die(capture(defect, currentSpanFromFiber(fiber)))))
|
|
646
638
|
: failCause(internalCause.die(defect))
|
|
647
639
|
|
|
@@ -668,7 +660,7 @@ export const exit = <R, E, A>(self: Effect.Effect<R, E, A>): Effect.Effect<R, ne
|
|
|
668
660
|
|
|
669
661
|
/* @internal */
|
|
670
662
|
export const fail = <E>(error: E): Effect.Effect<never, E, never> =>
|
|
671
|
-
|
|
663
|
+
isObject(error) && !(spanSymbol in error) ?
|
|
672
664
|
withFiberRuntime((fiber) => failCause(internalCause.fail(capture(error, currentSpanFromFiber(fiber)))))
|
|
673
665
|
: failCause(internalCause.fail(error))
|
|
674
666
|
|
|
@@ -1634,7 +1626,7 @@ export class RequestResolverImpl<R, A> implements RequestResolver.RequestResolve
|
|
|
1634
1626
|
|
|
1635
1627
|
/** @internal */
|
|
1636
1628
|
export const isRequestResolver = (u: unknown): u is RequestResolver.RequestResolver<unknown, unknown> =>
|
|
1637
|
-
|
|
1629
|
+
hasProperty(u, RequestResolverTypeId)
|
|
1638
1630
|
|
|
1639
1631
|
// end
|
|
1640
1632
|
|