effect 2.0.0-next.41 → 2.0.0-next.43

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.
Files changed (684) hide show
  1. package/Bigint/dist/effect-Bigint.cjs.dev.js +365 -28
  2. package/Bigint/dist/effect-Bigint.cjs.prod.js +365 -28
  3. package/Boolean/dist/effect-Boolean.cjs.dev.js +243 -22
  4. package/Boolean/dist/effect-Boolean.cjs.prod.js +243 -22
  5. package/Brand/dist/effect-Brand.cjs.dev.js +221 -26
  6. package/Brand/dist/effect-Brand.cjs.prod.js +221 -26
  7. package/Cache/dist/effect-Cache.cjs.dev.js +182 -77
  8. package/Cache/dist/effect-Cache.cjs.prod.js +182 -77
  9. package/Cause/dist/effect-Cause.cjs.dev.js +754 -93
  10. package/Cause/dist/effect-Cause.cjs.prod.js +754 -93
  11. package/Channel/dist/effect-Channel.cjs.dev.js +1206 -214
  12. package/Channel/dist/effect-Channel.cjs.prod.js +1206 -214
  13. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +118 -12
  14. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +118 -12
  15. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +63 -9
  16. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +63 -9
  17. package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +107 -12
  18. package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +107 -12
  19. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +88 -10
  20. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +88 -10
  21. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +131 -90
  22. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +131 -90
  23. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +88 -10
  24. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +88 -10
  25. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +87 -10
  26. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +87 -10
  27. package/Chunk/dist/effect-Chunk.cjs.dev.js +1170 -101
  28. package/Chunk/dist/effect-Chunk.cjs.prod.js +1170 -101
  29. package/Clock/dist/effect-Clock.cjs.dev.js +121 -50
  30. package/Clock/dist/effect-Clock.cjs.prod.js +121 -50
  31. package/Config/dist/effect-Config.cjs.dev.js +386 -71
  32. package/Config/dist/effect-Config.cjs.prod.js +386 -71
  33. package/ConfigError/dist/effect-ConfigError.cjs.dev.js +219 -40
  34. package/ConfigError/dist/effect-ConfigError.cjs.prod.js +219 -40
  35. package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +250 -58
  36. package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +250 -58
  37. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +92 -28
  38. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +92 -28
  39. package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +85 -28
  40. package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +85 -28
  41. package/Console/dist/effect-Console.cjs.dev.js +316 -106
  42. package/Console/dist/effect-Console.cjs.prod.js +316 -106
  43. package/Context/dist/effect-Context.cjs.dev.js +322 -33
  44. package/Context/dist/effect-Context.cjs.prod.js +322 -33
  45. package/Data/dist/effect-Data.cjs.dev.js +223 -21
  46. package/Data/dist/effect-Data.cjs.prod.js +223 -21
  47. package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +60 -42
  48. package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +60 -42
  49. package/Deferred/dist/effect-Deferred.cjs.dev.js +254 -55
  50. package/Deferred/dist/effect-Deferred.cjs.prod.js +254 -55
  51. package/Differ/dist/effect-Differ.cjs.dev.js +985 -42
  52. package/Differ/dist/effect-Differ.cjs.prod.js +985 -42
  53. package/Duration/dist/effect-Duration.cjs.dev.js +476 -51
  54. package/Duration/dist/effect-Duration.cjs.prod.js +476 -51
  55. package/Effect/dist/effect-Effect.cjs.dev.js +3485 -411
  56. package/Effect/dist/effect-Effect.cjs.prod.js +3485 -411
  57. package/Effectable/dist/effect-Effectable.cjs.dev.js +92 -21
  58. package/Effectable/dist/effect-Effectable.cjs.prod.js +92 -21
  59. package/Either/dist/effect-Either.cjs.dev.js +475 -43
  60. package/Either/dist/effect-Either.cjs.prod.js +475 -43
  61. package/Encoding/dist/effect-Encoding.cjs.dev.js +302 -29
  62. package/Encoding/dist/effect-Encoding.cjs.prod.js +302 -29
  63. package/Equal/dist/effect-Equal.cjs.dev.js +61 -10
  64. package/Equal/dist/effect-Equal.cjs.prod.js +61 -10
  65. package/Equivalence/dist/effect-Equivalence.cjs.dev.js +213 -23
  66. package/Equivalence/dist/effect-Equivalence.cjs.prod.js +213 -23
  67. package/Error/dist/effect-Error.cjs.dev.js +131 -91
  68. package/Error/dist/effect-Error.cjs.mjs +1 -1
  69. package/Error/dist/effect-Error.cjs.prod.js +131 -91
  70. package/Error/dist/effect-Error.esm.js +2 -2
  71. package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.dev.js +2 -2
  72. package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.prod.js +2 -2
  73. package/Exit/dist/effect-Exit.cjs.dev.js +395 -69
  74. package/Exit/dist/effect-Exit.cjs.prod.js +395 -69
  75. package/Fiber/dist/effect-Fiber.cjs.dev.js +538 -124
  76. package/Fiber/dist/effect-Fiber.cjs.prod.js +538 -124
  77. package/FiberId/dist/effect-FiberId.cjs.dev.js +19 -19
  78. package/FiberId/dist/effect-FiberId.cjs.prod.js +19 -19
  79. package/FiberRef/dist/effect-FiberRef.cjs.dev.js +401 -121
  80. package/FiberRef/dist/effect-FiberRef.cjs.prod.js +401 -121
  81. package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +147 -46
  82. package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +147 -46
  83. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +110 -40
  84. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +110 -40
  85. package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +185 -18
  86. package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +185 -18
  87. package/Function/dist/effect-Function.cjs.dev.js +511 -24
  88. package/Function/dist/effect-Function.cjs.prod.js +511 -24
  89. package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +18 -3
  90. package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +18 -3
  91. package/GroupBy/dist/effect-GroupBy.cjs.dev.js +168 -111
  92. package/GroupBy/dist/effect-GroupBy.cjs.prod.js +168 -111
  93. package/Hash/dist/effect-Hash.cjs.dev.js +175 -19
  94. package/Hash/dist/effect-Hash.cjs.prod.js +175 -19
  95. package/HashMap/dist/effect-HashMap.cjs.dev.js +337 -52
  96. package/HashMap/dist/effect-HashMap.cjs.prod.js +337 -52
  97. package/HashSet/dist/effect-HashSet.cjs.dev.js +266 -45
  98. package/HashSet/dist/effect-HashSet.cjs.prod.js +266 -45
  99. package/Hub/dist/effect-Hub.cjs.dev.js +1320 -89
  100. package/Hub/dist/effect-Hub.cjs.prod.js +1320 -89
  101. package/Inspectable/dist/effect-Inspectable.cjs.dev.js +37 -4
  102. package/Inspectable/dist/effect-Inspectable.cjs.prod.js +37 -4
  103. package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +328 -83
  104. package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +328 -83
  105. package/Layer/dist/effect-Layer.cjs.dev.js +697 -147
  106. package/Layer/dist/effect-Layer.cjs.prod.js +697 -147
  107. package/List/dist/effect-List.cjs.dev.js +868 -68
  108. package/List/dist/effect-List.cjs.prod.js +868 -68
  109. package/LogLevel/dist/effect-LogLevel.cjs.dev.js +243 -50
  110. package/LogLevel/dist/effect-LogLevel.cjs.prod.js +243 -50
  111. package/LogSpan/dist/effect-LogSpan.cjs.dev.js +34 -3
  112. package/LogSpan/dist/effect-LogSpan.cjs.prod.js +34 -3
  113. package/Logger/dist/effect-Logger.cjs.dev.js +314 -113
  114. package/Logger/dist/effect-Logger.cjs.prod.js +314 -113
  115. package/Metric/dist/effect-Metric.cjs.dev.js +504 -116
  116. package/Metric/dist/effect-Metric.cjs.prod.js +504 -116
  117. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +72 -26
  118. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +72 -26
  119. package/MetricHook/dist/effect-MetricHook.cjs.dev.js +95 -33
  120. package/MetricHook/dist/effect-MetricHook.cjs.prod.js +95 -33
  121. package/MetricKey/dist/effect-MetricKey.cjs.dev.js +133 -35
  122. package/MetricKey/dist/effect-MetricKey.cjs.prod.js +133 -35
  123. package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +179 -38
  124. package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +179 -38
  125. package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +47 -12
  126. package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +47 -12
  127. package/MetricPair/dist/effect-MetricPair.cjs.dev.js +38 -6
  128. package/MetricPair/dist/effect-MetricPair.cjs.prod.js +38 -6
  129. package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +230 -86
  130. package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +230 -86
  131. package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +55 -33
  132. package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +55 -33
  133. package/MetricState/dist/effect-MetricState.cjs.dev.js +174 -29
  134. package/MetricState/dist/effect-MetricState.cjs.prod.js +174 -29
  135. package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +149 -32
  136. package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +149 -32
  137. package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +111 -30
  138. package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +111 -30
  139. package/MutableList/dist/effect-MutableList.cjs.dev.js +276 -20
  140. package/MutableList/dist/effect-MutableList.cjs.prod.js +276 -20
  141. package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +209 -32
  142. package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +209 -32
  143. package/MutableRef/dist/effect-MutableRef.cjs.dev.js +175 -28
  144. package/MutableRef/dist/effect-MutableRef.cjs.prod.js +175 -28
  145. package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.dev.js +25 -2
  146. package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.prod.js +25 -2
  147. package/Number/dist/effect-Number.cjs.dev.js +389 -29
  148. package/Number/dist/effect-Number.cjs.prod.js +389 -29
  149. package/Option/dist/effect-Option.cjs.dev.js +1137 -79
  150. package/Option/dist/effect-Option.cjs.prod.js +1137 -79
  151. package/Order/dist/effect-Order.cjs.dev.js +288 -31
  152. package/Order/dist/effect-Order.cjs.prod.js +288 -31
  153. package/Ordering/dist/effect-Ordering.cjs.dev.js +89 -7
  154. package/Ordering/dist/effect-Ordering.cjs.prod.js +89 -7
  155. package/Pipeable/dist/effect-Pipeable.cjs.dev.js +41 -2
  156. package/Pipeable/dist/effect-Pipeable.cjs.prod.js +41 -2
  157. package/Pool/dist/effect-Pool.cjs.dev.js +177 -79
  158. package/Pool/dist/effect-Pool.cjs.prod.js +177 -79
  159. package/Predicate/dist/effect-Predicate.cjs.dev.js +672 -44
  160. package/Predicate/dist/effect-Predicate.cjs.prod.js +672 -44
  161. package/Queue/dist/effect-Queue.cjs.dev.js +427 -105
  162. package/Queue/dist/effect-Queue.cjs.prod.js +427 -105
  163. package/Random/dist/effect-Random.cjs.dev.js +127 -51
  164. package/Random/dist/effect-Random.cjs.prod.js +127 -51
  165. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +1589 -157
  166. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +1589 -157
  167. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +552 -42
  168. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +552 -42
  169. package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +1638 -59
  170. package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +1638 -59
  171. package/Ref/dist/effect-Ref.cjs.dev.js +31 -31
  172. package/Ref/dist/effect-Ref.cjs.prod.js +31 -31
  173. package/Reloadable/dist/effect-Reloadable.cjs.dev.js +226 -93
  174. package/Reloadable/dist/effect-Reloadable.cjs.prod.js +226 -93
  175. package/Request/dist/effect-Request.cjs.dev.js +238 -88
  176. package/Request/dist/effect-Request.cjs.prod.js +238 -88
  177. package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +195 -100
  178. package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +195 -100
  179. package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +292 -110
  180. package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +292 -110
  181. package/Resource/dist/effect-Resource.cjs.dev.js +177 -85
  182. package/Resource/dist/effect-Resource.cjs.prod.js +177 -85
  183. package/Runtime/dist/effect-Runtime.cjs.dev.js +245 -94
  184. package/Runtime/dist/effect-Runtime.cjs.prod.js +245 -94
  185. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +419 -121
  186. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +419 -121
  187. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +25 -25
  188. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +25 -25
  189. package/STM/dist/effect-STM.cjs.dev.js +1421 -237
  190. package/STM/dist/effect-STM.cjs.prod.js +1421 -237
  191. package/Schedule/dist/effect-Schedule.cjs.dev.js +1107 -156
  192. package/Schedule/dist/effect-Schedule.cjs.prod.js +1107 -156
  193. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +111 -28
  194. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +111 -28
  195. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +237 -33
  196. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +237 -33
  197. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +264 -36
  198. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +264 -36
  199. package/Scheduler/dist/effect-Scheduler.cjs.dev.js +365 -48
  200. package/Scheduler/dist/effect-Scheduler.cjs.prod.js +365 -48
  201. package/Scope/dist/effect-Scope.cjs.dev.js +192 -82
  202. package/Scope/dist/effect-Scope.cjs.prod.js +192 -82
  203. package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +512 -79
  204. package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +512 -79
  205. package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +147 -82
  206. package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +147 -82
  207. package/Sink/dist/effect-Sink.cjs.dev.js +1199 -208
  208. package/Sink/dist/effect-Sink.cjs.prod.js +1199 -208
  209. package/SortedMap/dist/effect-SortedMap.cjs.dev.js +194 -39
  210. package/SortedMap/dist/effect-SortedMap.cjs.prod.js +194 -39
  211. package/SortedSet/dist/effect-SortedSet.cjs.dev.js +293 -42
  212. package/SortedSet/dist/effect-SortedSet.cjs.prod.js +293 -42
  213. package/Stream/dist/effect-Stream.cjs.dev.js +3273 -401
  214. package/Stream/dist/effect-Stream.cjs.prod.js +3273 -401
  215. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.dev.js +2 -2
  216. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.prod.js +2 -2
  217. package/String/dist/effect-String.cjs.dev.js +652 -64
  218. package/String/dist/effect-String.cjs.prod.js +652 -64
  219. package/Struct/dist/effect-Struct.cjs.dev.js +126 -9
  220. package/Struct/dist/effect-Struct.cjs.prod.js +126 -9
  221. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +337 -131
  222. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +337 -131
  223. package/Supervisor/dist/effect-Supervisor.cjs.dev.js +234 -94
  224. package/Supervisor/dist/effect-Supervisor.cjs.prod.js +234 -94
  225. package/Symbol/dist/effect-Symbol.cjs.dev.js +29 -6
  226. package/Symbol/dist/effect-Symbol.cjs.prod.js +29 -6
  227. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +254 -102
  228. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +254 -102
  229. package/TArray/dist/effect-TArray.cjs.dev.js +517 -156
  230. package/TArray/dist/effect-TArray.cjs.prod.js +517 -156
  231. package/TDeferred/dist/effect-TDeferred.cjs.dev.js +219 -121
  232. package/TDeferred/dist/effect-TDeferred.cjs.prod.js +219 -121
  233. package/THub/dist/effect-THub.cjs.dev.js +651 -131
  234. package/THub/dist/effect-THub.cjs.prod.js +651 -131
  235. package/TMap/dist/effect-TMap.cjs.dev.js +526 -159
  236. package/TMap/dist/effect-TMap.cjs.prod.js +526 -159
  237. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +459 -133
  238. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +459 -133
  239. package/TQueue/dist/effect-TQueue.cjs.dev.js +430 -143
  240. package/TQueue/dist/effect-TQueue.cjs.prod.js +430 -143
  241. package/TRandom/dist/effect-TRandom.cjs.dev.js +290 -124
  242. package/TRandom/dist/effect-TRandom.cjs.prod.js +290 -124
  243. package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +531 -132
  244. package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +531 -132
  245. package/TRef/dist/effect-TRef.cjs.dev.js +238 -128
  246. package/TRef/dist/effect-TRef.cjs.prod.js +238 -128
  247. package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +283 -127
  248. package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +283 -127
  249. package/TSet/dist/effect-TSet.cjs.dev.js +515 -147
  250. package/TSet/dist/effect-TSet.cjs.prod.js +515 -147
  251. package/Take/dist/effect-Take.cjs.dev.js +296 -112
  252. package/Take/dist/effect-Take.cjs.prod.js +296 -112
  253. package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +132 -33
  254. package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +132 -33
  255. package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +106 -11
  256. package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +106 -11
  257. package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +128 -62
  258. package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +128 -62
  259. package/TestClock/dist/effect-TestClock.cjs.dev.js +624 -102
  260. package/TestClock/dist/effect-TestClock.cjs.prod.js +624 -102
  261. package/TestConfig/dist/effect-TestConfig.cjs.dev.js +41 -20
  262. package/TestConfig/dist/effect-TestConfig.cjs.prod.js +41 -20
  263. package/TestContext/dist/effect-TestContext.cjs.dev.js +118 -99
  264. package/TestContext/dist/effect-TestContext.cjs.prod.js +118 -99
  265. package/TestLive/dist/effect-TestLive.cjs.dev.js +86 -46
  266. package/TestLive/dist/effect-TestLive.cjs.prod.js +86 -46
  267. package/TestServices/dist/effect-TestServices.cjs.dev.js +381 -130
  268. package/TestServices/dist/effect-TestServices.cjs.prod.js +381 -130
  269. package/TestSized/dist/effect-TestSized.cjs.dev.js +78 -35
  270. package/TestSized/dist/effect-TestSized.cjs.prod.js +78 -35
  271. package/Tracer/dist/effect-Tracer.cjs.dev.js +108 -47
  272. package/Tracer/dist/effect-Tracer.cjs.prod.js +108 -47
  273. package/Tuple/dist/effect-Tuple.cjs.dev.js +182 -17
  274. package/Tuple/dist/effect-Tuple.cjs.prod.js +182 -17
  275. package/Unify/dist/effect-Unify.cjs.dev.js +37 -3
  276. package/Unify/dist/effect-Unify.cjs.prod.js +37 -3
  277. package/Utils/dist/effect-Utils.cjs.dev.js +354 -9
  278. package/Utils/dist/effect-Utils.cjs.prod.js +354 -9
  279. package/dist/{Context-f958cabc.cjs.prod.js → Context-01a123ac.cjs.prod.js} +8 -8
  280. package/dist/{Context-96739709.cjs.dev.js → Context-593661f6.cjs.dev.js} +8 -8
  281. package/dist/{Effectable-a6403e5f.cjs.dev.js → Effectable-2f022879.cjs.dev.js} +4 -4
  282. package/dist/{Effectable-f867d1cb.cjs.prod.js → Effectable-cd8f3a96.cjs.prod.js} +4 -4
  283. package/dist/{Either-9c349424.cjs.dev.js → Either-12bbe00c.cjs.dev.js} +5 -5
  284. package/dist/{Either-d03d5f05.cjs.prod.js → Either-7a881c7a.cjs.prod.js} +5 -5
  285. package/dist/{ExecutionStrategy-89fbe735.cjs.dev.js → ExecutionStrategy-14d3053a.cjs.prod.js} +1 -13
  286. package/dist/{ExecutionStrategy-dc778180.cjs.prod.js → ExecutionStrategy-70f1a920.cjs.dev.js} +1 -13
  287. package/dist/{FiberId-929dcce4.cjs.dev.js → FiberId-557db880.cjs.dev.js} +8 -30
  288. package/dist/{FiberId-b79e8047.cjs.prod.js → FiberId-e594f6e8.cjs.prod.js} +8 -30
  289. package/dist/{HashSet-ece2cfe8.cjs.dev.js → HashSet-0b4ff1e4.cjs.dev.js} +7 -7
  290. package/dist/{HashSet-6fe62df2.cjs.prod.js → HashSet-6257b66d.cjs.prod.js} +7 -7
  291. package/dist/{Ref-af783b72.cjs.dev.js → Ref-74b592a4.cjs.dev.js} +5 -25
  292. package/dist/{Ref-30e5ee58.cjs.prod.js → Ref-a3a4e50d.cjs.prod.js} +5 -25
  293. package/dist/{RuntimeFlagsPatch-130e990c.cjs.dev.js → RuntimeFlagsPatch-e2769b87.cjs.prod.js} +2 -24
  294. package/dist/{RuntimeFlagsPatch-5570758d.cjs.prod.js → RuntimeFlagsPatch-ea268c50.cjs.dev.js} +2 -24
  295. package/dist/{StreamHaltStrategy-66a53f66.cjs.dev.js → StreamHaltStrategy-9a61b88d.cjs.dev.js} +1 -16
  296. package/dist/{StreamHaltStrategy-07f544a6.cjs.prod.js → StreamHaltStrategy-b495622b.cjs.prod.js} +1 -16
  297. package/dist/{boundaries-03c7494a.cjs.dev.js → boundaries-20cfad9d.cjs.prod.js} +6 -6
  298. package/dist/{boundaries-5d1a46e1.cjs.prod.js → boundaries-3810d885.cjs.dev.js} +6 -6
  299. package/dist/{cache-ab7bbfbd.cjs.prod.js → cache-3a55a13a.cjs.prod.js} +21 -21
  300. package/dist/{cache-6cdc31f7.cjs.dev.js → cache-83d14f6e.cjs.dev.js} +21 -21
  301. package/dist/{childExecutorDecision-2b30946c.cjs.prod.js → childExecutorDecision-2eed6e25.cjs.dev.js} +1 -1
  302. package/dist/{childExecutorDecision-ad3db696.cjs.dev.js → childExecutorDecision-b5842db5.cjs.prod.js} +1 -1
  303. package/dist/{circular-81e1906f.cjs.dev.js → circular-2162b720.cjs.dev.js} +7 -7
  304. package/dist/{circular-4cb0b79d.cjs.dev.js → circular-a4887ee9.cjs.dev.js} +19 -19
  305. package/dist/{circular-6a5291c3.cjs.prod.js → circular-c3ce70f4.cjs.prod.js} +7 -7
  306. package/dist/{circular-5b3558d9.cjs.prod.js → circular-f72fcb1d.cjs.prod.js} +19 -19
  307. package/dist/{config-10f2a1d1.cjs.dev.js → config-80900693.cjs.dev.js} +10 -10
  308. package/dist/{config-78feb1ac.cjs.prod.js → config-d0ddc159.cjs.prod.js} +10 -10
  309. package/dist/{configError-6a3652f8.cjs.prod.js → configError-240e9b61.cjs.dev.js} +3 -3
  310. package/dist/{configError-1686533e.cjs.dev.js → configError-33e55472.cjs.prod.js} +3 -3
  311. package/dist/{configProvider-2b177eac.cjs.prod.js → configProvider-93617d6d.cjs.prod.js} +13 -13
  312. package/dist/{configProvider-e2eb112d.cjs.dev.js → configProvider-ce43fdbf.cjs.dev.js} +13 -13
  313. package/dist/{configSecret-ecb6c5b3.cjs.prod.js → configSecret-d1caca55.cjs.prod.js} +4 -4
  314. package/dist/{configSecret-5812fa69.cjs.dev.js → configSecret-e34c1b14.cjs.dev.js} +4 -4
  315. package/dist/{core-c2eb171a.cjs.prod.js → core-0b0539de.cjs.prod.js} +24 -24
  316. package/dist/{core-bce61cfc.cjs.prod.js → core-8ff5a82c.cjs.prod.js} +14 -14
  317. package/dist/{core-898decb7.cjs.dev.js → core-b2dfee8d.cjs.dev.js} +14 -14
  318. package/dist/{core-ac668be0.cjs.dev.js → core-b4d7b4f5.cjs.dev.js} +24 -24
  319. package/dist/{core-effect-a9b8ee08.cjs.dev.js → core-effect-892f3686.cjs.dev.js} +23 -23
  320. package/dist/{core-effect-bf806dd9.cjs.prod.js → core-effect-c65770cd.cjs.prod.js} +23 -23
  321. package/dist/{dataSource-31698050.cjs.dev.js → dataSource-5227437c.cjs.dev.js} +7 -7
  322. package/dist/{dataSource-77d1e579.cjs.prod.js → dataSource-837686e6.cjs.prod.js} +7 -7
  323. package/dist/declarations/src/Data.d.ts +2 -2
  324. package/dist/declarations/src/Error.d.ts +1 -1
  325. package/dist/declarations/src/Error.d.ts.map +1 -1
  326. package/dist/declarations/src/index.d.ts.map +1 -1
  327. package/dist/{defaultServices-60c753dc.cjs.dev.js → defaultServices-086b8ac9.cjs.prod.js} +13 -13
  328. package/dist/{defaultServices-4112c0c9.cjs.prod.js → defaultServices-5530ff0e.cjs.dev.js} +13 -13
  329. package/dist/effect.cjs.dev.js +466 -344
  330. package/dist/effect.cjs.prod.js +466 -344
  331. package/dist/effect.esm.js +283 -283
  332. package/dist/{fiber-da1a207c.cjs.dev.js → fiber-1bfb4c1d.cjs.dev.js} +14 -14
  333. package/dist/{fiber-90ffaf8c.cjs.prod.js → fiber-2eb0a4c1.cjs.prod.js} +14 -14
  334. package/dist/{fiberRefs-64c35250.cjs.prod.js → fiberRefs-be4fae6a.cjs.dev.js} +7 -7
  335. package/dist/{fiberRefs-a7e00f7e.cjs.dev.js → fiberRefs-be6b6a70.cjs.prod.js} +7 -7
  336. package/dist/{fiberRuntime-1c369a47.cjs.prod.js → fiberRuntime-af2d0ca1.cjs.prod.js} +47 -47
  337. package/dist/{fiberRuntime-e9680313.cjs.dev.js → fiberRuntime-e0db0ab6.cjs.dev.js} +47 -47
  338. package/dist/{groupBy-aa608972.cjs.prod.js → groupBy-7ce46ea3.cjs.prod.js} +14 -14
  339. package/dist/{groupBy-fa001ed8.cjs.dev.js → groupBy-bd943372.cjs.dev.js} +14 -14
  340. package/dist/{hook-822704ea.cjs.dev.js → hook-470b717e.cjs.prod.js} +9 -9
  341. package/dist/{hook-6c7550dc.cjs.prod.js → hook-e72b20fd.cjs.dev.js} +9 -9
  342. package/dist/{key-330b98b1.cjs.prod.js → key-378a6a2c.cjs.prod.js} +8 -8
  343. package/dist/{key-a474fc0d.cjs.dev.js → key-f0a1408a.cjs.dev.js} +8 -8
  344. package/dist/{keyType-1e916ae2.cjs.dev.js → keyType-55f27f07.cjs.dev.js} +5 -5
  345. package/dist/{keyType-8460e792.cjs.prod.js → keyType-cf67c69c.cjs.prod.js} +5 -5
  346. package/dist/{label-3e143765.cjs.prod.js → label-011edbe7.cjs.dev.js} +4 -4
  347. package/dist/{label-246fb11d.cjs.dev.js → label-655343b5.cjs.prod.js} +4 -4
  348. package/dist/{layer-6f71c525.cjs.prod.js → layer-3b1b0e2e.cjs.prod.js} +19 -19
  349. package/dist/{layer-7991a9d1.cjs.dev.js → layer-9cbb61ce.cjs.dev.js} +19 -19
  350. package/dist/{mergeDecision-e483c280.cjs.prod.js → mergeDecision-07c6b5c9.cjs.prod.js} +1 -1
  351. package/dist/{mergeDecision-e457a76b.cjs.dev.js → mergeDecision-be41e797.cjs.dev.js} +1 -1
  352. package/dist/{mergeState-dba66248.cjs.prod.js → mergeState-75990fa2.cjs.prod.js} +1 -1
  353. package/dist/{mergeState-83204f38.cjs.dev.js → mergeState-8153ce39.cjs.dev.js} +1 -1
  354. package/dist/{mergeStrategy-845a1279.cjs.prod.js → mergeStrategy-3dd6e55f.cjs.prod.js} +1 -1
  355. package/dist/{mergeStrategy-b19dc19a.cjs.dev.js → mergeStrategy-81ea5b80.cjs.dev.js} +1 -1
  356. package/dist/{pair-e5443c93.cjs.prod.js → pair-291b78d7.cjs.dev.js} +1 -1
  357. package/dist/{pair-08a8685e.cjs.dev.js → pair-6254cf85.cjs.prod.js} +1 -1
  358. package/dist/{patch-4671ab7f.cjs.dev.js → patch-a1b2802f.cjs.dev.js} +4 -4
  359. package/dist/{patch-f27e9f08.cjs.prod.js → patch-c4d6c61e.cjs.prod.js} +4 -4
  360. package/dist/{pathPatch-e46d4168.cjs.dev.js → pathPatch-15c8d723.cjs.prod.js} +6 -6
  361. package/dist/{pathPatch-ded405f6.cjs.prod.js → pathPatch-d9d41297.cjs.dev.js} +6 -6
  362. package/dist/{pool-3f16af61.cjs.dev.js → pool-29b03fb2.cjs.dev.js} +12 -12
  363. package/dist/{pool-59a31f55.cjs.prod.js → pool-b5c7d254.cjs.prod.js} +12 -12
  364. package/dist/{query-193d0a89.cjs.dev.js → query-67a7c448.cjs.dev.js} +6 -6
  365. package/dist/{query-fe4a82d6.cjs.prod.js → query-d5eefc43.cjs.prod.js} +6 -6
  366. package/dist/{queue-b81aee38.cjs.prod.js → queue-38614769.cjs.prod.js} +9 -9
  367. package/dist/{queue-04ae7ec7.cjs.dev.js → queue-997d6e51.cjs.dev.js} +9 -9
  368. package/dist/{registry-29905dcc.cjs.prod.js → registry-013ecdde.cjs.prod.js} +7 -7
  369. package/dist/{registry-c883cf52.cjs.dev.js → registry-1099de3f.cjs.dev.js} +7 -7
  370. package/dist/{runtime-3ae98f19.cjs.dev.js → runtime-15cc9cc5.cjs.dev.js} +18 -16
  371. package/dist/{runtime-8c3f1bd3.cjs.prod.js → runtime-3a59f5c4.cjs.prod.js} +18 -16
  372. package/dist/{schedule-7e30db2d.cjs.prod.js → schedule-1d92198c.cjs.prod.js} +22 -22
  373. package/dist/{schedule-479d8fcc.cjs.dev.js → schedule-e0f55cab.cjs.dev.js} +22 -22
  374. package/dist/{scopedRef-16d9d192.cjs.dev.js → scopedRef-88ae648a.cjs.dev.js} +9 -9
  375. package/dist/{scopedRef-40b5bb82.cjs.prod.js → scopedRef-a0257d92.cjs.prod.js} +9 -9
  376. package/dist/{singleProducerAsyncInput-24ccc472.cjs.prod.js → singleProducerAsyncInput-1c6cc8fb.cjs.prod.js} +13 -13
  377. package/dist/{singleProducerAsyncInput-18fc5896.cjs.dev.js → singleProducerAsyncInput-998b8fac.cjs.dev.js} +13 -13
  378. package/dist/{sink-3a597454.cjs.dev.js → sink-1ac24bca.cjs.dev.js} +42 -42
  379. package/dist/{sink-1f4c02bb.cjs.prod.js → sink-4d668efb.cjs.prod.js} +42 -42
  380. package/dist/{state-0d29362f.cjs.prod.js → state-8fbec044.cjs.dev.js} +4 -4
  381. package/dist/{state-8a8a647c.cjs.dev.js → state-dd1bd066.cjs.prod.js} +4 -4
  382. package/dist/{stm-789f4457.cjs.dev.js → stm-fbb398a5.cjs.dev.js} +13 -13
  383. package/dist/{stm-8e837f76.cjs.prod.js → stm-fcac86d5.cjs.prod.js} +13 -13
  384. package/dist/{stream-42bee6fa.cjs.dev.js → stream-adef675d.cjs.dev.js} +33 -33
  385. package/dist/{stream-71fa9ae8.cjs.prod.js → stream-e670e8fa.cjs.prod.js} +33 -33
  386. package/dist/{synchronizedRef-58a64ffe.cjs.dev.js → synchronizedRef-37e32854.cjs.dev.js} +3 -3
  387. package/dist/{synchronizedRef-6cfe9354.cjs.prod.js → synchronizedRef-b4cde4de.cjs.prod.js} +3 -3
  388. package/dist/{tArray-b96cf402.cjs.prod.js → tArray-239d37ad.cjs.dev.js} +7 -7
  389. package/dist/{tArray-56df545e.cjs.dev.js → tArray-70de8ec4.cjs.prod.js} +7 -7
  390. package/dist/{tMap-1103e942.cjs.dev.js → tMap-4b27665d.cjs.dev.js} +12 -12
  391. package/dist/{tMap-3ed5a386.cjs.prod.js → tMap-a202396b.cjs.prod.js} +12 -12
  392. package/dist/{tQueue-4d90a114.cjs.dev.js → tQueue-004a478e.cjs.dev.js} +8 -8
  393. package/dist/{tQueue-9c69c6b3.cjs.prod.js → tQueue-82c4db95.cjs.prod.js} +8 -8
  394. package/dist/{tRef-5c469ca5.cjs.dev.js → tRef-bb7cc73a.cjs.dev.js} +3 -3
  395. package/dist/{tRef-68a9114f.cjs.prod.js → tRef-ee2c7f44.cjs.prod.js} +3 -3
  396. package/dist/{take-85954a45.cjs.prod.js → take-4857b6af.cjs.dev.js} +7 -7
  397. package/dist/{take-84a0722c.cjs.dev.js → take-9c555b46.cjs.prod.js} +7 -7
  398. package/dist/{timeout-2a62e4b5.cjs.prod.js → timeout-489f3f86.cjs.prod.js} +2 -2
  399. package/dist/{timeout-0245c158.cjs.dev.js → timeout-d380d3f8.cjs.dev.js} +2 -2
  400. package/dist/{upstreamPullRequest-705e868d.cjs.prod.js → upstreamPullRequest-7a694281.cjs.dev.js} +1 -1
  401. package/dist/{upstreamPullRequest-c08f06a4.cjs.dev.js → upstreamPullRequest-c89f818d.cjs.prod.js} +1 -1
  402. package/dist/{upstreamPullStrategy-34452db1.cjs.prod.js → upstreamPullStrategy-63cc8967.cjs.prod.js} +1 -1
  403. package/dist/{upstreamPullStrategy-0ccf2960.cjs.dev.js → upstreamPullStrategy-f9f1ab57.cjs.dev.js} +1 -1
  404. package/internal/core.esm.js +5 -5
  405. package/internal/defaultServices/console.esm.js +1 -1
  406. package/internal/defaultServices.esm.js +2 -1
  407. package/internal/fiberRuntime.esm.js +7 -7
  408. package/internal/logger.esm.js +3 -3
  409. package/internal/runtime.esm.js +2 -0
  410. package/internal/supervisor.esm.js +2 -1
  411. package/internal/timeout.esm.js +2 -2
  412. package/package.json +3 -2
  413. package/dist/Bigint-0ebd807c.cjs.dev.js +0 -392
  414. package/dist/Bigint-912c77f3.cjs.prod.js +0 -392
  415. package/dist/Boolean-97839b78.cjs.prod.js +0 -264
  416. package/dist/Boolean-f0bc3abf.cjs.dev.js +0 -264
  417. package/dist/Brand-93578f43.cjs.prod.js +0 -224
  418. package/dist/Brand-b238487d.cjs.dev.js +0 -224
  419. package/dist/Cache-1688e584.cjs.dev.js +0 -127
  420. package/dist/Cache-8f2f2b55.cjs.prod.js +0 -127
  421. package/dist/Cause-384e2165.cjs.prod.js +0 -791
  422. package/dist/Cause-96c29074.cjs.dev.js +0 -791
  423. package/dist/Channel-0701d2dd.cjs.dev.js +0 -1217
  424. package/dist/Channel-7aed463e.cjs.prod.js +0 -1217
  425. package/dist/ChannelChildExecutorDecision-168278f6.cjs.prod.js +0 -136
  426. package/dist/ChannelChildExecutorDecision-b0e715de.cjs.dev.js +0 -136
  427. package/dist/ChannelMergeDecision-9c266aeb.cjs.prod.js +0 -78
  428. package/dist/ChannelMergeDecision-eeaf4779.cjs.dev.js +0 -78
  429. package/dist/ChannelMergeState-4366d090.cjs.prod.js +0 -125
  430. package/dist/ChannelMergeState-abce1d88.cjs.dev.js +0 -125
  431. package/dist/ChannelMergeStrategy-6193b8e0.cjs.prod.js +0 -104
  432. package/dist/ChannelMergeStrategy-e7ddbb7a.cjs.dev.js +0 -104
  433. package/dist/ChannelSingleProducerAsyncInput-46c393db.cjs.dev.js +0 -55
  434. package/dist/ChannelSingleProducerAsyncInput-7eb9d2ae.cjs.prod.js +0 -55
  435. package/dist/ChannelUpstreamPullRequest-1ca7d2bd.cjs.dev.js +0 -104
  436. package/dist/ChannelUpstreamPullRequest-208751c3.cjs.prod.js +0 -104
  437. package/dist/ChannelUpstreamPullStrategy-266b5a77.cjs.prod.js +0 -103
  438. package/dist/ChannelUpstreamPullStrategy-ec57dc70.cjs.dev.js +0 -103
  439. package/dist/Chunk-6cf5a8e6.cjs.prod.js +0 -1248
  440. package/dist/Chunk-bd290b8e.cjs.dev.js +0 -1248
  441. package/dist/Clock-09ecce0a.cjs.prod.js +0 -97
  442. package/dist/Clock-bec722c1.cjs.dev.js +0 -97
  443. package/dist/Config-85ae6286.cjs.prod.js +0 -393
  444. package/dist/Config-dc58cf69.cjs.dev.js +0 -393
  445. package/dist/ConfigError-c1f762d2.cjs.dev.js +0 -225
  446. package/dist/ConfigError-cee682fa.cjs.prod.js +0 -225
  447. package/dist/ConfigProvider-8341a5f5.cjs.prod.js +0 -240
  448. package/dist/ConfigProvider-de45b085.cjs.dev.js +0 -240
  449. package/dist/ConfigProviderPathPatch-52422b32.cjs.prod.js +0 -86
  450. package/dist/ConfigProviderPathPatch-d22442e3.cjs.dev.js +0 -86
  451. package/dist/ConfigSecret-c76717e8.cjs.dev.js +0 -83
  452. package/dist/ConfigSecret-ebab2ae7.cjs.prod.js +0 -83
  453. package/dist/Console-63eebbd5.cjs.prod.js +0 -271
  454. package/dist/Console-a1c2c16f.cjs.dev.js +0 -271
  455. package/dist/Context-25a49952.cjs.prod.js +0 -327
  456. package/dist/Context-3c9e986b.cjs.dev.js +0 -327
  457. package/dist/Data-07dc27f1.cjs.prod.js +0 -237
  458. package/dist/Data-85559fb3.cjs.dev.js +0 -237
  459. package/dist/DefaultServices-d5740d37.cjs.dev.js +0 -34
  460. package/dist/DefaultServices-df7495bb.cjs.prod.js +0 -34
  461. package/dist/Deferred-5d5c886c.cjs.dev.js +0 -253
  462. package/dist/Deferred-9d825b3b.cjs.prod.js +0 -253
  463. package/dist/Differ-0122f60e.cjs.dev.js +0 -992
  464. package/dist/Differ-0bd34066.cjs.prod.js +0 -992
  465. package/dist/Duration-0bc08d03.cjs.prod.js +0 -508
  466. package/dist/Duration-604874d1.cjs.dev.js +0 -508
  467. package/dist/Effect-4de56bb2.cjs.prod.js +0 -3740
  468. package/dist/Effect-cf226187.cjs.dev.js +0 -3740
  469. package/dist/Effectable-04f3cd30.cjs.dev.js +0 -99
  470. package/dist/Effectable-8997112d.cjs.prod.js +0 -99
  471. package/dist/Either-3fab3796.cjs.prod.js +0 -502
  472. package/dist/Either-a806809d.cjs.dev.js +0 -502
  473. package/dist/Encoding-0cab52d5.cjs.prod.js +0 -309
  474. package/dist/Encoding-d993b1b0.cjs.dev.js +0 -309
  475. package/dist/Equal-281b6ca8.cjs.dev.js +0 -71
  476. package/dist/Equal-ce9977a8.cjs.prod.js +0 -71
  477. package/dist/Equivalence-0bc84518.cjs.prod.js +0 -238
  478. package/dist/Equivalence-de7a0d51.cjs.dev.js +0 -238
  479. package/dist/Error-05f55a51.cjs.prod.js +0 -57
  480. package/dist/Error-469a9429.cjs.dev.js +0 -57
  481. package/dist/Exit-5691142c.cjs.prod.js +0 -408
  482. package/dist/Exit-a23874e1.cjs.dev.js +0 -408
  483. package/dist/Fiber-6432d5f7.cjs.dev.js +0 -521
  484. package/dist/Fiber-e61b3c65.cjs.prod.js +0 -521
  485. package/dist/FiberRef-1db44a9b.cjs.dev.js +0 -385
  486. package/dist/FiberRef-efb4a3ac.cjs.prod.js +0 -385
  487. package/dist/FiberRefs-43bfd8b9.cjs.dev.js +0 -135
  488. package/dist/FiberRefs-4cb171f7.cjs.prod.js +0 -135
  489. package/dist/FiberRefsPatch-5236f61e.cjs.dev.js +0 -90
  490. package/dist/FiberRefsPatch-cb847553.cjs.prod.js +0 -90
  491. package/dist/FiberStatus-b82dad24.cjs.prod.js +0 -197
  492. package/dist/FiberStatus-bac7d58d.cjs.dev.js +0 -197
  493. package/dist/Function-2e6b0cda.cjs.prod.js +0 -538
  494. package/dist/Function-41ce433d.cjs.dev.js +0 -538
  495. package/dist/GlobalValue-81ab6908.cjs.dev.js +0 -28
  496. package/dist/GlobalValue-cb645c99.cjs.prod.js +0 -28
  497. package/dist/GroupBy-2d7ec675.cjs.dev.js +0 -79
  498. package/dist/GroupBy-cf6e72eb.cjs.prod.js +0 -79
  499. package/dist/HKT-2cc79e63.cjs.dev.js +0 -7
  500. package/dist/HKT-d682535d.cjs.prod.js +0 -7
  501. package/dist/Hash-1bd73210.cjs.prod.js +0 -192
  502. package/dist/Hash-bd154268.cjs.dev.js +0 -192
  503. package/dist/HashMap-12668911.cjs.prod.js +0 -361
  504. package/dist/HashMap-68e290b6.cjs.dev.js +0 -361
  505. package/dist/HashSet-6978c08e.cjs.dev.js +0 -283
  506. package/dist/HashSet-c40a52b1.cjs.prod.js +0 -283
  507. package/dist/Hub-6e64debd.cjs.prod.js +0 -1280
  508. package/dist/Hub-74834668.cjs.dev.js +0 -1280
  509. package/dist/Inspectable-3c4a0f5d.cjs.prod.js +0 -50
  510. package/dist/Inspectable-ac929af4.cjs.dev.js +0 -50
  511. package/dist/KeyedPool-b05481e9.cjs.dev.js +0 -282
  512. package/dist/KeyedPool-cd8abf95.cjs.prod.js +0 -282
  513. package/dist/Layer-b05441ff.cjs.dev.js +0 -688
  514. package/dist/Layer-b1461d01.cjs.prod.js +0 -688
  515. package/dist/List-c6ea7efe.cjs.dev.js +0 -912
  516. package/dist/List-d9775087.cjs.prod.js +0 -912
  517. package/dist/LogLevel-99f64f82.cjs.dev.js +0 -240
  518. package/dist/LogLevel-e9848e15.cjs.prod.js +0 -240
  519. package/dist/LogSpan-c905a192.cjs.prod.js +0 -46
  520. package/dist/LogSpan-e345ba58.cjs.dev.js +0 -46
  521. package/dist/Logger-72da8fab.cjs.dev.js +0 -275
  522. package/dist/Logger-ea8c75a9.cjs.prod.js +0 -275
  523. package/dist/Metric-09d012ff.cjs.dev.js +0 -488
  524. package/dist/Metric-b7563a68.cjs.prod.js +0 -488
  525. package/dist/MetricBoundaries-cf5df220.cjs.prod.js +0 -68
  526. package/dist/MetricBoundaries-f5f5aae1.cjs.dev.js +0 -68
  527. package/dist/MetricHook-3104e93b.cjs.dev.js +0 -90
  528. package/dist/MetricHook-efd05d72.cjs.prod.js +0 -90
  529. package/dist/MetricKey-9cfcaec8.cjs.prod.js +0 -130
  530. package/dist/MetricKey-c3ba437e.cjs.dev.js +0 -130
  531. package/dist/MetricKeyType-6d2d9036.cjs.prod.js +0 -187
  532. package/dist/MetricKeyType-c1d7ebe8.cjs.dev.js +0 -187
  533. package/dist/MetricLabel-6a1886c6.cjs.dev.js +0 -53
  534. package/dist/MetricLabel-7e1d569e.cjs.prod.js +0 -53
  535. package/dist/MetricPair-658ab13d.cjs.dev.js +0 -50
  536. package/dist/MetricPair-aec13967.cjs.prod.js +0 -50
  537. package/dist/MetricPolling-5af0ff67.cjs.dev.js +0 -177
  538. package/dist/MetricPolling-a0a4e798.cjs.prod.js +0 -177
  539. package/dist/MetricRegistry-e4af936b.cjs.dev.js +0 -38
  540. package/dist/MetricRegistry-ff6df283.cjs.prod.js +0 -38
  541. package/dist/MetricState-b65340a4.cjs.dev.js +0 -191
  542. package/dist/MetricState-bd6a5001.cjs.prod.js +0 -191
  543. package/dist/MutableHashMap-74e83e84.cjs.dev.js +0 -154
  544. package/dist/MutableHashMap-95493edb.cjs.prod.js +0 -154
  545. package/dist/MutableHashSet-780dfd63.cjs.prod.js +0 -110
  546. package/dist/MutableHashSet-ec8d7cc4.cjs.dev.js +0 -110
  547. package/dist/MutableList-58124ef2.cjs.dev.js +0 -296
  548. package/dist/MutableList-732af09a.cjs.prod.js +0 -296
  549. package/dist/MutableQueue-0e9f2466.cjs.dev.js +0 -215
  550. package/dist/MutableQueue-f8aba856.cjs.prod.js +0 -215
  551. package/dist/MutableRef-4a2f1f23.cjs.prod.js +0 -194
  552. package/dist/MutableRef-724c4082.cjs.dev.js +0 -194
  553. package/dist/NonEmptyIterable-418cef14.cjs.prod.js +0 -36
  554. package/dist/NonEmptyIterable-bb452f41.cjs.dev.js +0 -36
  555. package/dist/Number-588f6483.cjs.dev.js +0 -417
  556. package/dist/Number-cb2ba2e8.cjs.prod.js +0 -417
  557. package/dist/Option-02025c86.cjs.prod.js +0 -1198
  558. package/dist/Option-03997d77.cjs.dev.js +0 -1198
  559. package/dist/Order-28bdebd2.cjs.dev.js +0 -321
  560. package/dist/Order-8a112bfb.cjs.prod.js +0 -321
  561. package/dist/Ordering-60bf9127.cjs.prod.js +0 -104
  562. package/dist/Ordering-b955b746.cjs.dev.js +0 -104
  563. package/dist/Pipeable-4698db72.cjs.dev.js +0 -52
  564. package/dist/Pipeable-d3ec6711.cjs.prod.js +0 -52
  565. package/dist/Pool-54389592.cjs.prod.js +0 -122
  566. package/dist/Pool-fe1b506a.cjs.dev.js +0 -122
  567. package/dist/Predicate-9e859c9c.cjs.dev.js +0 -718
  568. package/dist/Predicate-daa86e61.cjs.prod.js +0 -718
  569. package/dist/Queue-5f954287.cjs.prod.js +0 -394
  570. package/dist/Queue-8d082fe4.cjs.dev.js +0 -394
  571. package/dist/Random-35304046.cjs.dev.js +0 -104
  572. package/dist/Random-b4709b6a.cjs.prod.js +0 -104
  573. package/dist/ReadonlyArray-48949ee7.cjs.dev.js +0 -1721
  574. package/dist/ReadonlyArray-8157f697.cjs.prod.js +0 -1721
  575. package/dist/ReadonlyRecord-605a625b.cjs.dev.js +0 -568
  576. package/dist/ReadonlyRecord-8db8bada.cjs.prod.js +0 -568
  577. package/dist/RedBlackTree-e6bd147c.cjs.dev.js +0 -1669
  578. package/dist/RedBlackTree-eb41ea8a.cjs.prod.js +0 -1669
  579. package/dist/Reloadable-97b2e406.cjs.dev.js +0 -169
  580. package/dist/Reloadable-d1cd2c7d.cjs.prod.js +0 -169
  581. package/dist/Request-53592fe4.cjs.prod.js +0 -190
  582. package/dist/Request-d3b63af6.cjs.dev.js +0 -190
  583. package/dist/RequestBlock-5062df49.cjs.dev.js +0 -124
  584. package/dist/RequestBlock-8552671f.cjs.prod.js +0 -124
  585. package/dist/RequestResolver-3a24e033.cjs.prod.js +0 -233
  586. package/dist/RequestResolver-7fcb89fb.cjs.dev.js +0 -233
  587. package/dist/Resource-2530fe45.cjs.prod.js +0 -118
  588. package/dist/Resource-e50b4b25.cjs.dev.js +0 -118
  589. package/dist/Runtime-0d643f0c.cjs.prod.js +0 -191
  590. package/dist/Runtime-c4b887ff.cjs.dev.js +0 -191
  591. package/dist/RuntimeFlags-128b287a.cjs.dev.js +0 -381
  592. package/dist/RuntimeFlags-f50d0c72.cjs.prod.js +0 -381
  593. package/dist/STM-243df414.cjs.prod.js +0 -1447
  594. package/dist/STM-2b6ea69d.cjs.dev.js +0 -1447
  595. package/dist/Schedule-0444792d.cjs.prod.js +0 -1159
  596. package/dist/Schedule-b6c7b49a.cjs.dev.js +0 -1159
  597. package/dist/ScheduleDecision-369f2d2b.cjs.prod.js +0 -106
  598. package/dist/ScheduleDecision-ba8d0e87.cjs.dev.js +0 -106
  599. package/dist/ScheduleInterval-51f42533.cjs.dev.js +0 -244
  600. package/dist/ScheduleInterval-78037484.cjs.prod.js +0 -244
  601. package/dist/ScheduleIntervals-b0bfcf3b.cjs.dev.js +0 -265
  602. package/dist/ScheduleIntervals-db13140c.cjs.prod.js +0 -265
  603. package/dist/Scheduler-819ee02a.cjs.prod.js +0 -358
  604. package/dist/Scheduler-d080442d.cjs.dev.js +0 -358
  605. package/dist/Scope-311c7eb9.cjs.prod.js +0 -143
  606. package/dist/Scope-6ba9ec6d.cjs.dev.js +0 -143
  607. package/dist/ScopedCache-3f58b125.cjs.dev.js +0 -467
  608. package/dist/ScopedCache-8f99505c.cjs.prod.js +0 -467
  609. package/dist/ScopedRef-7946d287.cjs.prod.js +0 -87
  610. package/dist/ScopedRef-b92e1633.cjs.dev.js +0 -87
  611. package/dist/Sink-175252a1.cjs.dev.js +0 -1215
  612. package/dist/Sink-85c6820f.cjs.prod.js +0 -1215
  613. package/dist/SortedMap-bb3311c3.cjs.prod.js +0 -210
  614. package/dist/SortedMap-f452cc44.cjs.dev.js +0 -210
  615. package/dist/SortedSet-424670fe.cjs.prod.js +0 -311
  616. package/dist/SortedSet-f90b14a2.cjs.dev.js +0 -311
  617. package/dist/Stream-31c121b4.cjs.prod.js +0 -3469
  618. package/dist/Stream-f833c9da.cjs.dev.js +0 -3469
  619. package/dist/StreamEmit-a10e1de5.cjs.prod.js +0 -7
  620. package/dist/StreamEmit-ec1da471.cjs.dev.js +0 -7
  621. package/dist/String-23b18ca9.cjs.prod.js +0 -694
  622. package/dist/String-830aaa3e.cjs.dev.js +0 -694
  623. package/dist/Struct-14648d76.cjs.dev.js +0 -141
  624. package/dist/Struct-c6b00f29.cjs.prod.js +0 -141
  625. package/dist/SubscriptionRef-10afb90a.cjs.prod.js +0 -269
  626. package/dist/SubscriptionRef-8870f37c.cjs.dev.js +0 -269
  627. package/dist/Supervisor-0b397027.cjs.dev.js +0 -170
  628. package/dist/Supervisor-18f2ef4e.cjs.prod.js +0 -170
  629. package/dist/Symbol-55d0b3d8.cjs.prod.js +0 -40
  630. package/dist/Symbol-5d74a5f2.cjs.dev.js +0 -40
  631. package/dist/SynchronizedRef-3181eb0a.cjs.dev.js +0 -212
  632. package/dist/SynchronizedRef-c6e0884b.cjs.prod.js +0 -212
  633. package/dist/TArray-13d02e45.cjs.prod.js +0 -455
  634. package/dist/TArray-d244048f.cjs.dev.js +0 -455
  635. package/dist/TDeferred-66f69724.cjs.prod.js +0 -129
  636. package/dist/TDeferred-6b7151e4.cjs.dev.js +0 -129
  637. package/dist/THub-4f3308b5.cjs.dev.js +0 -570
  638. package/dist/THub-70471c3e.cjs.prod.js +0 -570
  639. package/dist/TMap-6ec29b88.cjs.prod.js +0 -463
  640. package/dist/TMap-d28007c5.cjs.dev.js +0 -463
  641. package/dist/TPriorityQueue-76d9fb5a.cjs.prod.js +0 -381
  642. package/dist/TPriorityQueue-b2370942.cjs.dev.js +0 -381
  643. package/dist/TQueue-d66ff462.cjs.dev.js +0 -353
  644. package/dist/TQueue-defe6f54.cjs.prod.js +0 -353
  645. package/dist/TRandom-2d293b98.cjs.prod.js +0 -203
  646. package/dist/TRandom-f6a907b8.cjs.dev.js +0 -203
  647. package/dist/TReentrantLock-81ebe2df.cjs.prod.js +0 -456
  648. package/dist/TReentrantLock-eed7de13.cjs.dev.js +0 -456
  649. package/dist/TRef-ad753da1.cjs.dev.js +0 -152
  650. package/dist/TRef-f8453998.cjs.prod.js +0 -152
  651. package/dist/TSemaphore-26326b8a.cjs.dev.js +0 -197
  652. package/dist/TSemaphore-de7a42e6.cjs.prod.js +0 -197
  653. package/dist/TSet-eb8e6abb.cjs.prod.js +0 -444
  654. package/dist/TSet-f5f2a16b.cjs.dev.js +0 -444
  655. package/dist/Take-7eae9eb6.cjs.dev.js +0 -236
  656. package/dist/Take-bf728196.cjs.prod.js +0 -236
  657. package/dist/TestAnnotation-73be7a68.cjs.dev.js +0 -135
  658. package/dist/TestAnnotation-b9b93d03.cjs.prod.js +0 -135
  659. package/dist/TestAnnotationMap-80c87410.cjs.dev.js +0 -125
  660. package/dist/TestAnnotationMap-e946bab5.cjs.prod.js +0 -125
  661. package/dist/TestAnnotations-5db95828.cjs.prod.js +0 -97
  662. package/dist/TestAnnotations-733b39ef.cjs.dev.js +0 -97
  663. package/dist/TestClock-7b24411c.cjs.dev.js +0 -581
  664. package/dist/TestClock-93cdaabb.cjs.prod.js +0 -581
  665. package/dist/TestConfig-1a73e844.cjs.prod.js +0 -37
  666. package/dist/TestConfig-e5ffa946.cjs.dev.js +0 -37
  667. package/dist/TestContext-eeb935e5.cjs.dev.js +0 -41
  668. package/dist/TestContext-fe76c79a.cjs.prod.js +0 -41
  669. package/dist/TestLive-465ad3ef.cjs.dev.js +0 -60
  670. package/dist/TestLive-f3232ac4.cjs.prod.js +0 -60
  671. package/dist/TestServices-217f5abb.cjs.dev.js +0 -341
  672. package/dist/TestServices-3e29bef4.cjs.prod.js +0 -341
  673. package/dist/TestSized-6c1abc21.cjs.dev.js +0 -64
  674. package/dist/TestSized-a9a87d64.cjs.prod.js +0 -64
  675. package/dist/Tracer-d06d0b61.cjs.prod.js +0 -81
  676. package/dist/Tracer-da182c8c.cjs.dev.js +0 -81
  677. package/dist/Tuple-27ecf3a1.cjs.prod.js +0 -199
  678. package/dist/Tuple-75d2a389.cjs.dev.js +0 -199
  679. package/dist/Types-1280d3aa.cjs.dev.js +0 -7
  680. package/dist/Types-3a58df45.cjs.prod.js +0 -7
  681. package/dist/Unify-99be0499.cjs.dev.js +0 -48
  682. package/dist/Unify-e86fd412.cjs.prod.js +0 -48
  683. package/dist/Utils-864e1d48.cjs.prod.js +0 -370
  684. package/dist/Utils-b0c14d1b.cjs.dev.js +0 -370
@@ -1,1198 +0,0 @@
1
- 'use strict';
2
-
3
- var Equal_dist_effectEqual = require('./Equal-281b6ca8.cjs.dev.js');
4
- var Equivalence_dist_effectEquivalence = require('./Equivalence-de7a0d51.cjs.dev.js');
5
- var Function_dist_effectFunction = require('./Function-41ce433d.cjs.dev.js');
6
- var Either = require('./Either-9c349424.cjs.dev.js');
7
- var Number_dist_effectNumber = require('./Number-588f6483.cjs.dev.js');
8
- var Order_dist_effectOrder = require('./Order-28bdebd2.cjs.dev.js');
9
- var Utils_dist_effectUtils = require('./Utils-b0c14d1b.cjs.dev.js');
10
-
11
- /**
12
- * @since 2.0.0
13
- */
14
-
15
- /**
16
- * @category models
17
- * @since 2.0.0
18
- */
19
-
20
- /**
21
- * @category symbols
22
- * @since 2.0.0
23
- */
24
- const TypeId = /*#__PURE__*/Symbol.for("effect/Option");
25
-
26
- /**
27
- * @category symbols
28
- * @since 2.0.0
29
- */
30
-
31
- /**
32
- * @category models
33
- * @since 2.0.0
34
- */
35
-
36
- /**
37
- * @category models
38
- * @since 2.0.0
39
- */
40
-
41
- /**
42
- * @category models
43
- * @since 2.0.0
44
- */
45
-
46
- /**
47
- * @category models
48
- * @since 2.0.0
49
- */
50
-
51
- /**
52
- * @category type lambdas
53
- * @since 2.0.0
54
- */
55
-
56
- /**
57
- * Creates a new `Option` that represents the absence of a value.
58
- *
59
- * @category constructors
60
- * @since 2.0.0
61
- */
62
- const none = () => Either.none;
63
-
64
- /**
65
- * Creates a new `Option` that wraps the given value.
66
- *
67
- * @param value - The value to wrap.
68
- *
69
- * @category constructors
70
- * @since 2.0.0
71
- */
72
- const some = Either.some;
73
-
74
- /**
75
- * Tests if a value is a `Option`.
76
- *
77
- * @param input - The value to check.
78
- *
79
- * @example
80
- * import { some, none, isOption } from 'effect/Option'
81
- *
82
- * assert.deepStrictEqual(isOption(some(1)), true)
83
- * assert.deepStrictEqual(isOption(none()), true)
84
- * assert.deepStrictEqual(isOption({}), false)
85
- *
86
- * @category guards
87
- * @since 2.0.0
88
- */
89
- const isOption = Either.isOption;
90
-
91
- /**
92
- * Determine if a `Option` is a `None`.
93
- *
94
- * @param self - The `Option` to check.
95
- *
96
- * @example
97
- * import { some, none, isNone } from 'effect/Option'
98
- *
99
- * assert.deepStrictEqual(isNone(some(1)), false)
100
- * assert.deepStrictEqual(isNone(none()), true)
101
- *
102
- * @category guards
103
- * @since 2.0.0
104
- */
105
- const isNone = Either.isNone;
106
-
107
- /**
108
- * Determine if a `Option` is a `Some`.
109
- *
110
- * @param self - The `Option` to check.
111
- *
112
- * @example
113
- * import { some, none, isSome } from 'effect/Option'
114
- *
115
- * assert.deepStrictEqual(isSome(some(1)), true)
116
- * assert.deepStrictEqual(isSome(none()), false)
117
- *
118
- * @category guards
119
- * @since 2.0.0
120
- */
121
- const isSome = Either.isSome;
122
-
123
- /**
124
- * Matches the given `Option` and returns either the provided `onNone` value or the result of the provided `onSome`
125
- * function when passed the `Option`'s value.
126
- *
127
- * @param self - The `Option` to match
128
- * @param onNone - The value to be returned if the `Option` is `None`
129
- * @param onSome - The function to be called if the `Option` is `Some`, it will be passed the `Option`'s value and its result will be returned
130
- *
131
- * @example
132
- * import { some, none, match } from 'effect/Option'
133
- * import { pipe } from "effect/Function"
134
- *
135
- * assert.deepStrictEqual(
136
- * pipe(some(1), match({ onNone: () => 'a none', onSome: (a) => `a some containing ${a}` })),
137
- * 'a some containing 1'
138
- * )
139
- *
140
- * assert.deepStrictEqual(
141
- * pipe(none(), match({ onNone: () => 'a none', onSome: (a) => `a some containing ${a}` })),
142
- * 'a none'
143
- * )
144
- *
145
- * @category pattern matching
146
- * @since 2.0.0
147
- */
148
- const match = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, {
149
- onNone,
150
- onSome
151
- }) => isNone(self) ? onNone() : onSome(self.value));
152
-
153
- /**
154
- * Returns a type guard from a `Option` returning function.
155
- * This function ensures that a type guard definition is type-safe.
156
- *
157
- * @example
158
- * import * as O from "effect/Option"
159
- *
160
- * const parsePositive = (n: number): O.Option<number> =>
161
- * n > 0 ? O.some(n) : O.none()
162
- *
163
- * const isPositive = O.toRefinement(parsePositive)
164
- *
165
- * assert.deepStrictEqual(isPositive(1), true)
166
- * assert.deepStrictEqual(isPositive(-1), false)
167
- *
168
- * @category conversions
169
- * @since 2.0.0
170
- */
171
- const toRefinement = f => a => isSome(f(a));
172
-
173
- /**
174
- * Converts an `Iterable` of values into an `Option`. Returns the first value of the `Iterable` wrapped in a `Some`
175
- * if the `Iterable` is not empty, otherwise returns `None`.
176
- *
177
- * @param collection - The `Iterable` to be converted to an `Option`.
178
- *
179
- * @example
180
- * import { fromIterable, some, none } from 'effect/Option'
181
- *
182
- * assert.deepStrictEqual(fromIterable([1, 2, 3]), some(1))
183
- * assert.deepStrictEqual(fromIterable([]), none())
184
- *
185
- * @category conversions
186
- * @since 2.0.0
187
- */
188
- const fromIterable = collection => {
189
- for (const a of collection) {
190
- return some(a);
191
- }
192
- return none();
193
- };
194
-
195
- /**
196
- * Converts a `Either` to an `Option` discarding the error.
197
- *
198
- * Alias of {@link fromEither}.
199
- *
200
- * @example
201
- * import * as O from "effect/Option"
202
- * import * as E from "effect/Either"
203
- *
204
- * assert.deepStrictEqual(O.getRight(E.right('ok')), O.some('ok'))
205
- * assert.deepStrictEqual(O.getRight(E.left('err')), O.none())
206
- *
207
- * @category conversions
208
- * @since 2.0.0
209
- */
210
- const getRight = Either.getRight;
211
-
212
- /**
213
- * Converts a `Either` to an `Option` discarding the value.
214
- *
215
- * @example
216
- * import * as O from "effect/Option"
217
- * import * as E from "effect/Either"
218
- *
219
- * assert.deepStrictEqual(O.getLeft(E.right("ok")), O.none())
220
- * assert.deepStrictEqual(O.getLeft(E.left("a")), O.some("a"))
221
- *
222
- * @category conversions
223
- * @since 2.0.0
224
- */
225
- const getLeft = Either.getLeft;
226
-
227
- /**
228
- * Returns the value of the `Option` if it is `Some`, otherwise returns `onNone`
229
- *
230
- * @param self - The `Option` to get the value of.
231
- * @param onNone - Function that returns the default value to return if the `Option` is `None`.
232
- *
233
- * @example
234
- * import { some, none, getOrElse } from 'effect/Option'
235
- * import { pipe } from "effect/Function"
236
- *
237
- * assert.deepStrictEqual(pipe(some(1), getOrElse(() => 0)), 1)
238
- * assert.deepStrictEqual(pipe(none(), getOrElse(() => 0)), 0)
239
- *
240
- * @category getters
241
- * @since 2.0.0
242
- */
243
- const getOrElse = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, onNone) => isNone(self) ? onNone() : self.value);
244
-
245
- /**
246
- * Returns the provided `Option` `that` if `self` is `None`, otherwise returns `self`.
247
- *
248
- * @param self - The first `Option` to be checked.
249
- * @param that - The `Option` to return if `self` is `None`.
250
- *
251
- * @example
252
- * import * as O from "effect/Option"
253
- * import { pipe } from "effect/Function"
254
- *
255
- * assert.deepStrictEqual(
256
- * pipe(
257
- * O.none(),
258
- * O.orElse(() => O.none())
259
- * ),
260
- * O.none()
261
- * )
262
- * assert.deepStrictEqual(
263
- * pipe(
264
- * O.some('a'),
265
- * O.orElse(() => O.none())
266
- * ),
267
- * O.some('a')
268
- * )
269
- * assert.deepStrictEqual(
270
- * pipe(
271
- * O.none(),
272
- * O.orElse(() => O.some('b'))
273
- * ),
274
- * O.some('b')
275
- * )
276
- * assert.deepStrictEqual(
277
- * pipe(
278
- * O.some('a'),
279
- * O.orElse(() => O.some('b'))
280
- * ),
281
- * O.some('a')
282
- * )
283
- *
284
- * @category error handling
285
- * @since 2.0.0
286
- */
287
- const orElse = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => isNone(self) ? that() : self);
288
-
289
- /**
290
- * Similar to `orElse`, but instead of returning a simple union, it returns an `Either` object,
291
- * which contains information about which of the two `Option`s has been chosen.
292
- *
293
- * This is useful when it's important to know whether the value was retrieved from the first `Option` or the second option.
294
- *
295
- * @param self - The first `Option` to be checked.
296
- * @param that - The second `Option` to be considered if the first `Option` is `None`.
297
- *
298
- * @category error handling
299
- * @since 2.0.0
300
- */
301
- const orElseEither = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => isNone(self) ? map(that(), Either.right) : map(self, Either.left));
302
-
303
- /**
304
- * Given an `Iterable` collection of `Option`s, returns the first `Some` found in the collection.
305
- *
306
- * @param collection - An iterable collection of `Option` to be searched.
307
- *
308
- * @example
309
- * import * as O from "effect/Option"
310
- *
311
- * assert.deepStrictEqual(O.firstSomeOf([O.none(), O.some(1), O.some(2)]), O.some(1))
312
- *
313
- * @category error handling
314
- * @since 2.0.0
315
- */
316
- const firstSomeOf = collection => {
317
- let out = none();
318
- for (out of collection) {
319
- if (isSome(out)) {
320
- return out;
321
- }
322
- }
323
- return out;
324
- };
325
-
326
- /**
327
- * Constructs a new `Option` from a nullable type. If the value is `null` or `undefined`, returns `None`, otherwise
328
- * returns the value wrapped in a `Some`.
329
- *
330
- * @param nullableValue - The nullable value to be converted to an `Option`.
331
- *
332
- * @example
333
- * import * as O from "effect/Option"
334
- *
335
- * assert.deepStrictEqual(O.fromNullable(undefined), O.none())
336
- * assert.deepStrictEqual(O.fromNullable(null), O.none())
337
- * assert.deepStrictEqual(O.fromNullable(1), O.some(1))
338
- *
339
- * @category conversions
340
- * @since 2.0.0
341
- */
342
- const fromNullable = nullableValue => nullableValue == null ? none() : some(nullableValue);
343
-
344
- /**
345
- * This API is useful for lifting a function that returns `null` or `undefined` into the `Option` context.
346
- *
347
- * @example
348
- * import * as O from "effect/Option"
349
- *
350
- * const parse = (s: string): number | undefined => {
351
- * const n = parseFloat(s)
352
- * return isNaN(n) ? undefined : n
353
- * }
354
- *
355
- * const parseOption = O.liftNullable(parse)
356
- *
357
- * assert.deepStrictEqual(parseOption('1'), O.some(1))
358
- * assert.deepStrictEqual(parseOption('not a number'), O.none())
359
- *
360
- * @category conversions
361
- * @since 2.0.0
362
- */
363
- const liftNullable = f => (...a) => fromNullable(f(...a));
364
-
365
- /**
366
- * Returns the value of the `Option` if it is a `Some`, otherwise returns `null`.
367
- *
368
- * @param self - The `Option` to extract the value from.
369
- *
370
- * @example
371
- * import * as O from "effect/Option"
372
- *
373
- * assert.deepStrictEqual(O.getOrNull(O.some(1)), 1)
374
- * assert.deepStrictEqual(O.getOrNull(O.none()), null)
375
- *
376
- * @category getters
377
- * @since 2.0.0
378
- */
379
- const getOrNull = /*#__PURE__*/getOrElse(Function_dist_effectFunction.constNull);
380
-
381
- /**
382
- * Returns the value of the `Option` if it is a `Some`, otherwise returns `undefined`.
383
- *
384
- * @param self - The `Option` to extract the value from.
385
- *
386
- * @example
387
- * import * as O from "effect/Option"
388
- *
389
- * assert.deepStrictEqual(O.getOrUndefined(O.some(1)), 1)
390
- * assert.deepStrictEqual(O.getOrUndefined(O.none()), undefined)
391
- *
392
- * @category getters
393
- * @since 2.0.0
394
- */
395
- const getOrUndefined = /*#__PURE__*/getOrElse(Function_dist_effectFunction.constUndefined);
396
-
397
- /**
398
- * A utility function that lifts a function that throws exceptions into a function that returns an `Option`.
399
- *
400
- * This function is useful for any function that might throw an exception, allowing the developer to handle
401
- * the exception in a more functional way.
402
- *
403
- * @param f - the function that can throw exceptions.
404
- *
405
- * @example
406
- * import * as O from "effect/Option"
407
- *
408
- * const parse = O.liftThrowable(JSON.parse)
409
- *
410
- * assert.deepStrictEqual(parse("1"), O.some(1))
411
- * assert.deepStrictEqual(parse(""), O.none())
412
- *
413
- * @category conversions
414
- * @since 2.0.0
415
- */
416
- const liftThrowable = f => (...a) => {
417
- try {
418
- return some(f(...a));
419
- } catch (e) {
420
- return none();
421
- }
422
- };
423
-
424
- /**
425
- * Extracts the value of an `Option` or throws if the `Option` is `None`.
426
- *
427
- * If a default error is sufficient for your use case and you don't need to configure the thrown error, see {@link getOrThrow}.
428
- *
429
- * @param self - The `Option` to extract the value from.
430
- * @param onNone - A function that will be called if the `Option` is `None`. It returns the error to be thrown.
431
- *
432
- * @example
433
- * import * as O from "effect/Option"
434
- *
435
- * assert.deepStrictEqual(
436
- * O.getOrThrowWith(O.some(1), () => new Error('Unexpected None')),
437
- * 1
438
- * )
439
- * assert.throws(() => O.getOrThrowWith(O.none(), () => new Error('Unexpected None')))
440
- *
441
- * @category conversions
442
- * @since 2.0.0
443
- */
444
- const getOrThrowWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, onNone) => {
445
- if (isSome(self)) {
446
- return self.value;
447
- }
448
- throw onNone();
449
- });
450
-
451
- /**
452
- * Extracts the value of an `Option` or throws if the `Option` is `None`.
453
- *
454
- * The thrown error is a default error. To configure the error thrown, see {@link getOrThrowWith}.
455
- *
456
- * @param self - The `Option` to extract the value from.
457
- * @throws `Error("getOrThrow called on a None")`
458
- *
459
- * @example
460
- * import * as O from "effect/Option"
461
- *
462
- * assert.deepStrictEqual(O.getOrThrow(O.some(1)), 1)
463
- * assert.throws(() => O.getOrThrow(O.none()))
464
- *
465
- * @category conversions
466
- * @since 2.0.0
467
- */
468
- const getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThrow called on a None"));
469
-
470
- /**
471
- * Maps the `Some` side of an `Option` value to a new `Option` value.
472
- *
473
- * @param self - An `Option` to map
474
- * @param f - The function to map over the value of the `Option`
475
- *
476
- * @category transforming
477
- * @since 2.0.0
478
- */
479
- const map = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => isNone(self) ? none() : some(f(self.value)));
480
-
481
- /**
482
- * Maps the `Some` value of this `Option` to the specified constant value.
483
- *
484
- * @category transforming
485
- * @since 2.0.0
486
- */
487
- const as = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, b) => map(self, () => b));
488
-
489
- /**
490
- * Maps the `Some` value of this `Option` to the `void` constant value.
491
- *
492
- * This is useful when the value of the `Option` is not needed, but the presence or absence of the value is important.
493
- *
494
- * @category transforming
495
- * @since 2.0.0
496
- */
497
- const asUnit = /*#__PURE__*/as(undefined);
498
-
499
- /**
500
- * @since 2.0.0
501
- */
502
- const unit = /*#__PURE__*/some(undefined);
503
-
504
- /**
505
- * Applies a function to the value of an `Option` and flattens the result, if the input is `Some`.
506
- *
507
- * @category transforming
508
- * @since 2.0.0
509
- */
510
- const flatMap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => isNone(self) ? none() : f(self.value));
511
-
512
- /**
513
- * This is `flatMap` + `fromNullable`, useful when working with optional values.
514
- *
515
- * @example
516
- * import { some, none, flatMapNullable } from 'effect/Option'
517
- * import { pipe } from "effect/Function"
518
- *
519
- * interface Employee {
520
- * company?: {
521
- * address?: {
522
- * street?: {
523
- * name?: string
524
- * }
525
- * }
526
- * }
527
- * }
528
- *
529
- * const employee1: Employee = { company: { address: { street: { name: 'high street' } } } }
530
- *
531
- * assert.deepStrictEqual(
532
- * pipe(
533
- * some(employee1),
534
- * flatMapNullable(employee => employee.company?.address?.street?.name),
535
- * ),
536
- * some('high street')
537
- * )
538
- *
539
- * const employee2: Employee = { company: { address: { street: {} } } }
540
- *
541
- * assert.deepStrictEqual(
542
- * pipe(
543
- * some(employee2),
544
- * flatMapNullable(employee => employee.company?.address?.street?.name),
545
- * ),
546
- * none()
547
- * )
548
- *
549
- * @category transforming
550
- * @since 2.0.0
551
- */
552
- const flatMapNullable = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => isNone(self) ? none() : fromNullable(f(self.value)));
553
-
554
- /**
555
- * @category transforming
556
- * @since 2.0.0
557
- */
558
- const flatten = /*#__PURE__*/flatMap(Function_dist_effectFunction.identity);
559
-
560
- /**
561
- * @category transforming
562
- * @since 2.0.0
563
- */
564
- const zipRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => flatMap(self, () => that));
565
-
566
- /**
567
- * @category transforming
568
- * @since 2.0.0
569
- */
570
- const composeK = /*#__PURE__*/Function_dist_effectFunction.dual(2, (afb, bfc) => a => flatMap(afb(a), bfc));
571
-
572
- /**
573
- * Sequences the specified `that` `Option` but ignores its value.
574
- *
575
- * It is useful when we want to chain multiple operations, but only care about the result of `self`.
576
- *
577
- * @param that - The `Option` that will be ignored in the chain and discarded
578
- * @param self - The `Option` we care about
579
- *
580
- * @category transforming
581
- * @since 2.0.0
582
- */
583
- const zipLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => tap(self, () => that));
584
-
585
- /**
586
- * Applies the provided function `f` to the value of the `Option` if it is `Some` and returns the original `Option`
587
- * unless `f` returns `None`, in which case it returns `None`.
588
- *
589
- * This function is useful for performing additional computations on the value of the input `Option` without affecting its value.
590
- *
591
- * @param f - Function to apply to the value of the `Option` if it is `Some`
592
- * @param self - The `Option` to apply the function to
593
- *
594
- * @example
595
- * import * as O from "effect/Option"
596
- *
597
- * const getInteger = (n: number) => Number.isInteger(n) ? O.some(n) : O.none()
598
- *
599
- * assert.deepStrictEqual(O.tap(O.none(), getInteger), O.none())
600
- * assert.deepStrictEqual(O.tap(O.some(1), getInteger), O.some(1))
601
- * assert.deepStrictEqual(O.tap(O.some(1.14), getInteger), O.none())
602
- *
603
- * @category transforming
604
- * @since 2.0.0
605
- */
606
- const tap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => flatMap(self, a => map(f(a), () => a)));
607
-
608
- /**
609
- * @category combining
610
- * @since 2.0.0
611
- */
612
- const product = (self, that) => isSome(self) && isSome(that) ? some([self.value, that.value]) : none();
613
-
614
- /**
615
- * @category combining
616
- * @since 2.0.0
617
- */
618
- const productMany = (self, collection) => {
619
- if (isNone(self)) {
620
- return none();
621
- }
622
- const out = [self.value];
623
- for (const o of collection) {
624
- if (isNone(o)) {
625
- return none();
626
- }
627
- out.push(o.value);
628
- }
629
- return some(out);
630
- };
631
-
632
- /**
633
- * Takes a structure of `Option`s and returns an `Option` of values with the same structure.
634
- *
635
- * - If a tuple is supplied, then the returned `Option` will contain a tuple with the same length.
636
- * - If a struct is supplied, then the returned `Option` will contain a struct with the same keys.
637
- * - If an iterable is supplied, then the returned `Option` will contain an array.
638
- *
639
- * @param fields - the struct of `Option`s to be sequenced.
640
- *
641
- * @example
642
- * import * as O from "effect/Option"
643
- *
644
- * assert.deepStrictEqual(O.all([O.some(1), O.some(2)]), O.some([1, 2]))
645
- * assert.deepStrictEqual(O.all({ a: O.some(1), b: O.some("hello") }), O.some({ a: 1, b: "hello" }))
646
- * assert.deepStrictEqual(O.all({ a: O.some(1), b: O.none() }), O.none())
647
- *
648
- * @category combining
649
- * @since 2.0.0
650
- */
651
- // @ts-expect-error
652
- const all = input => {
653
- if (Symbol.iterator in input) {
654
- const out = [];
655
- for (const o of input) {
656
- if (isNone(o)) {
657
- return none();
658
- }
659
- out.push(o.value);
660
- }
661
- return some(out);
662
- }
663
- const out = {};
664
- for (const key of Object.keys(input)) {
665
- const o = input[key];
666
- if (isNone(o)) {
667
- return none();
668
- }
669
- out[key] = o.value;
670
- }
671
- return some(out);
672
- };
673
-
674
- /**
675
- * Zips two `Option` values together using a provided function, returning a new `Option` of the result.
676
- *
677
- * @param self - The left-hand side of the zip operation
678
- * @param that - The right-hand side of the zip operation
679
- * @param f - The function used to combine the values of the two `Option`s
680
- *
681
- * @example
682
- * import * as O from "effect/Option"
683
- *
684
- * type Complex = [number, number]
685
- *
686
- * const complex = (real: number, imaginary: number): Complex => [real, imaginary]
687
- *
688
- * assert.deepStrictEqual(O.zipWith(O.none(), O.none(), complex), O.none())
689
- * assert.deepStrictEqual(O.zipWith(O.some(1), O.none(), complex), O.none())
690
- * assert.deepStrictEqual(O.zipWith(O.none(), O.some(1), complex), O.none())
691
- * assert.deepStrictEqual(O.zipWith(O.some(1), O.some(2), complex), O.some([1, 2]))
692
- *
693
- * assert.deepStrictEqual(O.zipWith(O.some(1), complex)(O.some(2)), O.some([2, 1]))
694
- *
695
- * @category combining
696
- * @since 2.0.0
697
- */
698
- const zipWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => map(product(self, that), ([a, b]) => f(a, b)));
699
-
700
- /**
701
- * @category combining
702
- * @since 2.0.0
703
- */
704
- const ap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => zipWith(self, that, (f, a) => f(a)));
705
-
706
- /**
707
- * Reduces an `Iterable` of `Option<A>` to a single value of type `B`, elements that are `None` are ignored.
708
- *
709
- * @param self - The Iterable of `Option<A>` to be reduced.
710
- * @param b - The initial value of the accumulator.
711
- * @param f - The reducing function that takes the current accumulator value and the unwrapped value of an `Option<A>`.
712
- *
713
- * @example
714
- * import { some, none, reduceCompact } from 'effect/Option'
715
- * import { pipe } from "effect/Function"
716
- *
717
- * const iterable = [some(1), none(), some(2), none()]
718
- * assert.deepStrictEqual(pipe(iterable, reduceCompact(0, (b, a) => b + a)), 3)
719
- *
720
- * @category folding
721
- * @since 2.0.0
722
- */
723
- const reduceCompact = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, b, f) => {
724
- let out = b;
725
- for (const oa of self) {
726
- if (isSome(oa)) {
727
- out = f(out, oa.value);
728
- }
729
- }
730
- return out;
731
- });
732
-
733
- /**
734
- * Transforms an `Option` into an `Array`.
735
- * If the input is `None`, an empty array is returned.
736
- * If the input is `Some`, the value is wrapped in an array.
737
- *
738
- * @param self - The `Option` to convert to an array.
739
- *
740
- * @example
741
- * import * as O from "effect/Option"
742
- *
743
- * assert.deepStrictEqual(O.toArray(O.some(1)), [1])
744
- * assert.deepStrictEqual(O.toArray(O.none()), [])
745
- *
746
- * @category conversions
747
- * @since 2.0.0
748
- */
749
- const toArray = self => isNone(self) ? [] : [self.value];
750
-
751
- /**
752
- * @category filtering
753
- * @since 2.0.0
754
- */
755
- const partitionMap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
756
- if (isNone(self)) {
757
- return [none(), none()];
758
- }
759
- const e = f(self.value);
760
- return Either.isLeft(e) ? [some(e.left), none()] : [none(), some(e.right)];
761
- });
762
-
763
- /**
764
- * Maps over the value of an `Option` and filters out `None`s.
765
- *
766
- * Useful when in addition to filtering you also want to change the type of the `Option`.
767
- *
768
- * @param self - The `Option` to map over.
769
- * @param f - A function to apply to the value of the `Option`.
770
- *
771
- * @example
772
- * import * as O from "effect/Option"
773
- *
774
- * const evenNumber = (n: number) => n % 2 === 0 ? O.some(n) : O.none()
775
- *
776
- * assert.deepStrictEqual(O.filterMap(O.none(), evenNumber), O.none())
777
- * assert.deepStrictEqual(O.filterMap(O.some(3), evenNumber), O.none())
778
- * assert.deepStrictEqual(O.filterMap(O.some(2), evenNumber), O.some(2))
779
- *
780
- * @category filtering
781
- * @since 2.0.0
782
- */
783
- const filterMap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => isNone(self) ? none() : f(self.value));
784
-
785
- /**
786
- * Filters an `Option` using a predicate. If the predicate is not satisfied or the `Option` is `None` returns `None`.
787
- *
788
- * If you need to change the type of the `Option` in addition to filtering, see `filterMap`.
789
- *
790
- * @param predicate - A predicate function to apply to the `Option` value.
791
- * @param fb - The `Option` to filter.
792
- *
793
- * @example
794
- * import * as O from "effect/Option"
795
- *
796
- * // predicate
797
- * const isEven = (n: number) => n % 2 === 0
798
- *
799
- * assert.deepStrictEqual(O.filter(O.none(), isEven), O.none())
800
- * assert.deepStrictEqual(O.filter(O.some(3), isEven), O.none())
801
- * assert.deepStrictEqual(O.filter(O.some(2), isEven), O.some(2))
802
- *
803
- * // refinement
804
- * const isNumber = (v: unknown): v is number => typeof v === "number"
805
- *
806
- * assert.deepStrictEqual(O.filter(O.none(), isNumber), O.none())
807
- * assert.deepStrictEqual(O.filter(O.some('hello'), isNumber), O.none())
808
- * assert.deepStrictEqual(O.filter(O.some(2), isNumber), O.some(2))
809
- *
810
- * @category filtering
811
- * @since 2.0.0
812
- */
813
- const filter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => filterMap(self, b => predicate(b) ? Either.some(b) : Either.none));
814
-
815
- /**
816
- * @example
817
- * import { none, some, getEquivalence } from 'effect/Option'
818
- * import * as N from 'effect/Number'
819
- *
820
- * const isEquivalent = getEquivalence(N.Equivalence)
821
- * assert.deepStrictEqual(isEquivalent(none(), none()), true)
822
- * assert.deepStrictEqual(isEquivalent(none(), some(1)), false)
823
- * assert.deepStrictEqual(isEquivalent(some(1), none()), false)
824
- * assert.deepStrictEqual(isEquivalent(some(1), some(2)), false)
825
- * assert.deepStrictEqual(isEquivalent(some(1), some(1)), true)
826
- *
827
- * @category equivalence
828
- * @since 2.0.0
829
- */
830
- const getEquivalence = isEquivalent => Equivalence_dist_effectEquivalence.make((x, y) => x === y || (isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value)));
831
-
832
- /**
833
- * The `Order` instance allows `Option` values to be compared with
834
- * `compare`, whenever there is an `Order` instance for
835
- * the type the `Option` contains.
836
- *
837
- * `None` is considered to be less than any `Some` value.
838
- *
839
- * @example
840
- * import { none, some, getOrder } from 'effect/Option'
841
- * import * as N from 'effect/Number'
842
- * import { pipe } from "effect/Function"
843
- *
844
- * const O = getOrder(N.Order)
845
- * assert.deepStrictEqual(O(none(), none()), 0)
846
- * assert.deepStrictEqual(O(none(), some(1)), -1)
847
- * assert.deepStrictEqual(O(some(1), none()), 1)
848
- * assert.deepStrictEqual(O(some(1), some(2)), -1)
849
- * assert.deepStrictEqual(O(some(1), some(1)), 0)
850
- *
851
- * @category sorting
852
- * @since 2.0.0
853
- */
854
- const getOrder = O => Order_dist_effectOrder.make((self, that) => isSome(self) ? isSome(that) ? O(self.value, that.value) : 1 : -1);
855
-
856
- /**
857
- * Lifts a binary function into `Option`.
858
- *
859
- * @param f - The function to lift.
860
- *
861
- * @category lifting
862
- * @since 2.0.0
863
- */
864
- const lift2 = f => Function_dist_effectFunction.dual(2, (self, that) => zipWith(self, that, f));
865
-
866
- /**
867
- * Transforms a `Predicate` function into a `Some` of the input value if the predicate returns `true` or `None`
868
- * if the predicate returns `false`.
869
- *
870
- * @param predicate - A `Predicate` function that takes in a value of type `A` and returns a boolean.
871
- *
872
- * @example
873
- * import * as O from "effect/Option"
874
- *
875
- * const getOption = O.liftPredicate((n: number) => n >= 0)
876
- *
877
- * assert.deepStrictEqual(getOption(-1), O.none())
878
- * assert.deepStrictEqual(getOption(1), O.some(1))
879
- *
880
- * @category lifting
881
- * @since 2.0.0
882
- */
883
- const liftPredicate = predicate => b => predicate(b) ? some(b) : none();
884
-
885
- /**
886
- * Returns a function that checks if a `Option` contains a given value using a provided `isEquivalent` function.
887
- *
888
- * @param equivalent - An `Equivalence` instance to compare values of the `Option`.
889
- * @param self - The `Option` to apply the comparison to.
890
- * @param a - The value to compare against the `Option`.
891
- *
892
- * @example
893
- * import { some, none, containsWith } from 'effect/Option'
894
- * import { Equivalence } from 'effect/Number'
895
- * import { pipe } from "effect/Function"
896
- *
897
- * assert.deepStrictEqual(pipe(some(2), containsWith(Equivalence)(2)), true)
898
- * assert.deepStrictEqual(pipe(some(1), containsWith(Equivalence)(2)), false)
899
- * assert.deepStrictEqual(pipe(none(), containsWith(Equivalence)(2)), false)
900
- *
901
- * @category elements
902
- * @since 2.0.0
903
- */
904
- const containsWith = isEquivalent => Function_dist_effectFunction.dual(2, (self, a) => isNone(self) ? false : isEquivalent(self.value, a));
905
- const _equivalence = /*#__PURE__*/Equal_dist_effectEqual.equivalence();
906
-
907
- /**
908
- * Returns a function that checks if an `Option` contains a given value using the default `Equivalence`.
909
- *
910
- * @category elements
911
- * @since 2.0.0
912
- */
913
- const contains = /*#__PURE__*/containsWith(_equivalence);
914
-
915
- /**
916
- * Check if a value in an `Option` type meets a certain predicate.
917
- *
918
- * @param self - The `Option` to check.
919
- * @param predicate - The condition to check.
920
- *
921
- * @example
922
- * import { some, none, exists } from 'effect/Option'
923
- * import { pipe } from "effect/Function"
924
- *
925
- * const isEven = (n: number) => n % 2 === 0
926
- *
927
- * assert.deepStrictEqual(pipe(some(2), exists(isEven)), true)
928
- * assert.deepStrictEqual(pipe(some(1), exists(isEven)), false)
929
- * assert.deepStrictEqual(pipe(none(), exists(isEven)), false)
930
- *
931
- * @since 2.0.0
932
- */
933
- const exists = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => isNone(self) ? false : predicate(self.value));
934
-
935
- // -------------------------------------------------------------------------------------
936
- // math
937
- // -------------------------------------------------------------------------------------
938
-
939
- /**
940
- * @category math
941
- * @since 2.0.0
942
- */
943
- const sum = /*#__PURE__*/lift2(Number_dist_effectNumber.sum);
944
-
945
- /**
946
- * @category math
947
- * @since 2.0.0
948
- */
949
- const multiply = /*#__PURE__*/lift2(Number_dist_effectNumber.multiply);
950
-
951
- /**
952
- * @category math
953
- * @since 2.0.0
954
- */
955
- const subtract = /*#__PURE__*/lift2(Number_dist_effectNumber.subtract);
956
-
957
- /**
958
- * @category math
959
- * @since 2.0.0
960
- */
961
- const divide = /*#__PURE__*/lift2(Number_dist_effectNumber.divide);
962
-
963
- /**
964
- * Sum all numbers in an iterable of `Option<number>` ignoring the `None` values.
965
- *
966
- * @param self - The iterable of `Option<number>` to be summed.
967
- *
968
- * @example
969
- * import { sumCompact, some, none } from 'effect/Option'
970
- *
971
- * const iterable = [some(2), none(), some(3), none()]
972
- * assert.deepStrictEqual(sumCompact(iterable), 5)
973
- *
974
- * @category math
975
- * @since 2.0.0
976
- */
977
- const sumCompact = self => {
978
- let out = 0;
979
- for (const oa of self) {
980
- if (isSome(oa)) {
981
- out += oa.value;
982
- }
983
- }
984
- return out;
985
- };
986
-
987
- /**
988
- * Multiply all numbers in an iterable of `Option<number>` ignoring the `None` values.
989
- *
990
- * @param self - The iterable of `Option<number>` to be multiplied.
991
- *
992
- * @example
993
- * import { multiplyCompact, some, none } from 'effect/Option'
994
- *
995
- * const iterable = [some(2), none(), some(3), none()]
996
- * assert.deepStrictEqual(multiplyCompact(iterable), 6)
997
- *
998
- * @category math
999
- * @since 2.0.0
1000
- */
1001
- const multiplyCompact = self => {
1002
- let out = 1;
1003
- for (const oa of self) {
1004
- if (isSome(oa)) {
1005
- const a = oa.value;
1006
- if (a === 0) {
1007
- return 0;
1008
- }
1009
- out *= a;
1010
- }
1011
- }
1012
- return out;
1013
- };
1014
-
1015
- // -------------------------------------------------------------------------------------
1016
- // do notation
1017
- // -------------------------------------------------------------------------------------
1018
-
1019
- /**
1020
- * @category do notation
1021
- * @since 2.0.0
1022
- */
1023
- const bindTo = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, name) => map(self, a => ({
1024
- [name]: a
1025
- })));
1026
- const let_ = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, name, f) => map(self, a => Object.assign({}, a, {
1027
- [name]: f(a)
1028
- })));
1029
-
1030
- /**
1031
- * @category do notation
1032
- * @since 2.0.0
1033
- */
1034
- const bind = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, name, f) => flatMap(self, a => map(f(a), b => Object.assign({}, a, {
1035
- [name]: b
1036
- }))));
1037
-
1038
- /**
1039
- * @category do notation
1040
- * @since 2.0.0
1041
- */
1042
- const Do = /*#__PURE__*/some({});
1043
- const adapter = /*#__PURE__*/Utils_dist_effectUtils.adapter();
1044
-
1045
- /**
1046
- * @category generators
1047
- * @since 2.0.0
1048
- */
1049
- const gen = f => {
1050
- const iterator = f(adapter);
1051
- let state = iterator.next();
1052
- if (state.done) {
1053
- return some(void 0);
1054
- } else {
1055
- let current = state.value.value;
1056
- if (isNone(current)) {
1057
- return current;
1058
- }
1059
- while (!state.done) {
1060
- state = iterator.next(current.value);
1061
- if (!state.done) {
1062
- current = state.value.value;
1063
- if (isNone(current)) {
1064
- return current;
1065
- }
1066
- }
1067
- }
1068
- return some(state.value);
1069
- }
1070
- };
1071
-
1072
- var Option = /*#__PURE__*/Object.freeze({
1073
- __proto__: null,
1074
- TypeId: TypeId,
1075
- none: none,
1076
- some: some,
1077
- isOption: isOption,
1078
- isNone: isNone,
1079
- isSome: isSome,
1080
- match: match,
1081
- toRefinement: toRefinement,
1082
- fromIterable: fromIterable,
1083
- getRight: getRight,
1084
- getLeft: getLeft,
1085
- getOrElse: getOrElse,
1086
- orElse: orElse,
1087
- orElseEither: orElseEither,
1088
- firstSomeOf: firstSomeOf,
1089
- fromNullable: fromNullable,
1090
- liftNullable: liftNullable,
1091
- getOrNull: getOrNull,
1092
- getOrUndefined: getOrUndefined,
1093
- liftThrowable: liftThrowable,
1094
- getOrThrowWith: getOrThrowWith,
1095
- getOrThrow: getOrThrow,
1096
- map: map,
1097
- as: as,
1098
- asUnit: asUnit,
1099
- unit: unit,
1100
- flatMap: flatMap,
1101
- flatMapNullable: flatMapNullable,
1102
- flatten: flatten,
1103
- zipRight: zipRight,
1104
- composeK: composeK,
1105
- zipLeft: zipLeft,
1106
- tap: tap,
1107
- product: product,
1108
- productMany: productMany,
1109
- all: all,
1110
- zipWith: zipWith,
1111
- ap: ap,
1112
- reduceCompact: reduceCompact,
1113
- toArray: toArray,
1114
- partitionMap: partitionMap,
1115
- filterMap: filterMap,
1116
- filter: filter,
1117
- getEquivalence: getEquivalence,
1118
- getOrder: getOrder,
1119
- lift2: lift2,
1120
- liftPredicate: liftPredicate,
1121
- containsWith: containsWith,
1122
- contains: contains,
1123
- exists: exists,
1124
- sum: sum,
1125
- multiply: multiply,
1126
- subtract: subtract,
1127
- divide: divide,
1128
- sumCompact: sumCompact,
1129
- multiplyCompact: multiplyCompact,
1130
- bindTo: bindTo,
1131
- 'let': let_,
1132
- bind: bind,
1133
- Do: Do,
1134
- gen: gen
1135
- });
1136
-
1137
- exports.Do = Do;
1138
- exports.Option = Option;
1139
- exports.TypeId = TypeId;
1140
- exports.all = all;
1141
- exports.ap = ap;
1142
- exports.as = as;
1143
- exports.asUnit = asUnit;
1144
- exports.bind = bind;
1145
- exports.bindTo = bindTo;
1146
- exports.composeK = composeK;
1147
- exports.contains = contains;
1148
- exports.containsWith = containsWith;
1149
- exports.divide = divide;
1150
- exports.exists = exists;
1151
- exports.filter = filter;
1152
- exports.filterMap = filterMap;
1153
- exports.firstSomeOf = firstSomeOf;
1154
- exports.flatMap = flatMap;
1155
- exports.flatMapNullable = flatMapNullable;
1156
- exports.flatten = flatten;
1157
- exports.fromIterable = fromIterable;
1158
- exports.fromNullable = fromNullable;
1159
- exports.gen = gen;
1160
- exports.getEquivalence = getEquivalence;
1161
- exports.getLeft = getLeft;
1162
- exports.getOrElse = getOrElse;
1163
- exports.getOrNull = getOrNull;
1164
- exports.getOrThrow = getOrThrow;
1165
- exports.getOrThrowWith = getOrThrowWith;
1166
- exports.getOrUndefined = getOrUndefined;
1167
- exports.getOrder = getOrder;
1168
- exports.getRight = getRight;
1169
- exports.isNone = isNone;
1170
- exports.isOption = isOption;
1171
- exports.isSome = isSome;
1172
- exports.let_ = let_;
1173
- exports.lift2 = lift2;
1174
- exports.liftNullable = liftNullable;
1175
- exports.liftPredicate = liftPredicate;
1176
- exports.liftThrowable = liftThrowable;
1177
- exports.map = map;
1178
- exports.match = match;
1179
- exports.multiply = multiply;
1180
- exports.multiplyCompact = multiplyCompact;
1181
- exports.none = none;
1182
- exports.orElse = orElse;
1183
- exports.orElseEither = orElseEither;
1184
- exports.partitionMap = partitionMap;
1185
- exports.product = product;
1186
- exports.productMany = productMany;
1187
- exports.reduceCompact = reduceCompact;
1188
- exports.some = some;
1189
- exports.subtract = subtract;
1190
- exports.sum = sum;
1191
- exports.sumCompact = sumCompact;
1192
- exports.tap = tap;
1193
- exports.toArray = toArray;
1194
- exports.toRefinement = toRefinement;
1195
- exports.unit = unit;
1196
- exports.zipLeft = zipLeft;
1197
- exports.zipRight = zipRight;
1198
- exports.zipWith = zipWith;