effect 3.10.18 → 3.11.0

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 (448) hide show
  1. package/dist/cjs/Array.js +206 -0
  2. package/dist/cjs/Array.js.map +1 -1
  3. package/dist/cjs/BigDecimal.js +181 -24
  4. package/dist/cjs/BigDecimal.js.map +1 -1
  5. package/dist/cjs/BigInt.js +54 -0
  6. package/dist/cjs/BigInt.js.map +1 -1
  7. package/dist/cjs/Boolean.js +24 -0
  8. package/dist/cjs/Boolean.js.map +1 -1
  9. package/dist/cjs/Brand.js +4 -0
  10. package/dist/cjs/Brand.js.map +1 -1
  11. package/dist/cjs/Channel.js +44 -4
  12. package/dist/cjs/Channel.js.map +1 -1
  13. package/dist/cjs/Chunk.js +8 -0
  14. package/dist/cjs/Chunk.js.map +1 -1
  15. package/dist/cjs/Config.js +10 -1
  16. package/dist/cjs/Config.js.map +1 -1
  17. package/dist/cjs/Context.js +50 -1
  18. package/dist/cjs/Context.js.map +1 -1
  19. package/dist/cjs/Cron.js +81 -67
  20. package/dist/cjs/Cron.js.map +1 -1
  21. package/dist/cjs/Data.js +14 -0
  22. package/dist/cjs/Data.js.map +1 -1
  23. package/dist/cjs/DateTime.js +178 -664
  24. package/dist/cjs/DateTime.js.map +1 -1
  25. package/dist/cjs/Duration.js +2 -0
  26. package/dist/cjs/Duration.js.map +1 -1
  27. package/dist/cjs/Effect.js +296 -4
  28. package/dist/cjs/Effect.js.map +1 -1
  29. package/dist/cjs/Either.js +38 -2
  30. package/dist/cjs/Either.js.map +1 -1
  31. package/dist/cjs/FiberHandle.js +6 -0
  32. package/dist/cjs/FiberHandle.js.map +1 -1
  33. package/dist/cjs/FiberMap.js +6 -0
  34. package/dist/cjs/FiberMap.js.map +1 -1
  35. package/dist/cjs/FiberSet.js +6 -0
  36. package/dist/cjs/FiberSet.js.map +1 -1
  37. package/dist/cjs/Function.js +34 -0
  38. package/dist/cjs/Function.js.map +1 -1
  39. package/dist/cjs/GlobalValue.js +2 -0
  40. package/dist/cjs/GlobalValue.js.map +1 -1
  41. package/dist/cjs/HashMap.js.map +1 -1
  42. package/dist/cjs/Inspectable.js +8 -4
  43. package/dist/cjs/Inspectable.js.map +1 -1
  44. package/dist/cjs/Iterable.js +18 -0
  45. package/dist/cjs/Iterable.js.map +1 -1
  46. package/dist/cjs/JSONSchema.js.map +1 -1
  47. package/dist/cjs/List.js +4 -0
  48. package/dist/cjs/List.js.map +1 -1
  49. package/dist/cjs/Logger.js +26 -0
  50. package/dist/cjs/Logger.js.map +1 -1
  51. package/dist/cjs/Mailbox.js +2 -0
  52. package/dist/cjs/Mailbox.js.map +1 -1
  53. package/dist/cjs/ManagedRuntime.js +2 -0
  54. package/dist/cjs/ManagedRuntime.js.map +1 -1
  55. package/dist/cjs/Metric.js +10 -0
  56. package/dist/cjs/Metric.js.map +1 -1
  57. package/dist/cjs/Micro.js +1104 -1069
  58. package/dist/cjs/Micro.js.map +1 -1
  59. package/dist/cjs/Number.js +44 -0
  60. package/dist/cjs/Number.js.map +1 -1
  61. package/dist/cjs/Option.js +70 -0
  62. package/dist/cjs/Option.js.map +1 -1
  63. package/dist/cjs/Order.js +2 -0
  64. package/dist/cjs/Order.js.map +1 -1
  65. package/dist/cjs/Ordering.js +4 -0
  66. package/dist/cjs/Ordering.js.map +1 -1
  67. package/dist/cjs/Predicate.js +68 -0
  68. package/dist/cjs/Predicate.js.map +1 -1
  69. package/dist/cjs/Random.js +4 -0
  70. package/dist/cjs/Random.js.map +1 -1
  71. package/dist/cjs/RateLimiter.js +4 -0
  72. package/dist/cjs/RateLimiter.js.map +1 -1
  73. package/dist/cjs/RcMap.js +2 -0
  74. package/dist/cjs/RcMap.js.map +1 -1
  75. package/dist/cjs/RcRef.js +2 -0
  76. package/dist/cjs/RcRef.js.map +1 -1
  77. package/dist/cjs/Record.js +56 -0
  78. package/dist/cjs/Record.js.map +1 -1
  79. package/dist/cjs/Redacted.js +8 -0
  80. package/dist/cjs/Redacted.js.map +1 -1
  81. package/dist/cjs/RegExp.js +4 -0
  82. package/dist/cjs/RegExp.js.map +1 -1
  83. package/dist/cjs/Request.js +4 -0
  84. package/dist/cjs/Request.js.map +1 -1
  85. package/dist/cjs/RequestResolver.js +2 -0
  86. package/dist/cjs/RequestResolver.js.map +1 -1
  87. package/dist/cjs/Runtime.js +6 -0
  88. package/dist/cjs/Runtime.js.map +1 -1
  89. package/dist/cjs/STM.js.map +1 -1
  90. package/dist/cjs/Schema.js +91 -8
  91. package/dist/cjs/Schema.js.map +1 -1
  92. package/dist/cjs/Sink.js +9 -1
  93. package/dist/cjs/Sink.js.map +1 -1
  94. package/dist/cjs/Stream.js +179 -7
  95. package/dist/cjs/Stream.js.map +1 -1
  96. package/dist/cjs/String.js +62 -0
  97. package/dist/cjs/String.js.map +1 -1
  98. package/dist/cjs/Struct.js +12 -0
  99. package/dist/cjs/Struct.js.map +1 -1
  100. package/dist/cjs/Symbol.js +2 -0
  101. package/dist/cjs/Symbol.js.map +1 -1
  102. package/dist/cjs/Trie.js +56 -0
  103. package/dist/cjs/Trie.js.map +1 -1
  104. package/dist/cjs/Tuple.js +18 -0
  105. package/dist/cjs/Tuple.js.map +1 -1
  106. package/dist/cjs/Utils.js +7 -1
  107. package/dist/cjs/Utils.js.map +1 -1
  108. package/dist/cjs/internal/channel/channelExecutor.js +5 -9
  109. package/dist/cjs/internal/channel/channelExecutor.js.map +1 -1
  110. package/dist/cjs/internal/channel.js +156 -130
  111. package/dist/cjs/internal/channel.js.map +1 -1
  112. package/dist/cjs/internal/config.js +13 -4
  113. package/dist/cjs/internal/config.js.map +1 -1
  114. package/dist/cjs/internal/context.js +46 -3
  115. package/dist/cjs/internal/context.js.map +1 -1
  116. package/dist/cjs/internal/dateTime.js +747 -0
  117. package/dist/cjs/internal/dateTime.js.map +1 -0
  118. package/dist/cjs/internal/fiberRuntime.js +34 -11
  119. package/dist/cjs/internal/fiberRuntime.js.map +1 -1
  120. package/dist/cjs/internal/groupBy.js +9 -3
  121. package/dist/cjs/internal/groupBy.js.map +1 -1
  122. package/dist/cjs/internal/layer.js +1 -1
  123. package/dist/cjs/internal/layer.js.map +1 -1
  124. package/dist/cjs/internal/mailbox.js +1 -1
  125. package/dist/cjs/internal/mailbox.js.map +1 -1
  126. package/dist/cjs/internal/sink.js +25 -21
  127. package/dist/cjs/internal/sink.js.map +1 -1
  128. package/dist/cjs/internal/stream.js +70 -71
  129. package/dist/cjs/internal/stream.js.map +1 -1
  130. package/dist/cjs/internal/version.js +1 -1
  131. package/dist/cjs/internal/version.js.map +1 -1
  132. package/dist/dts/Array.d.ts +534 -0
  133. package/dist/dts/Array.d.ts.map +1 -1
  134. package/dist/dts/BigDecimal.d.ts +172 -1
  135. package/dist/dts/BigDecimal.d.ts.map +1 -1
  136. package/dist/dts/BigInt.d.ts +114 -0
  137. package/dist/dts/BigInt.d.ts.map +1 -1
  138. package/dist/dts/Boolean.d.ts +56 -0
  139. package/dist/dts/Boolean.d.ts.map +1 -1
  140. package/dist/dts/Brand.d.ts +6 -0
  141. package/dist/dts/Brand.d.ts.map +1 -1
  142. package/dist/dts/Channel.d.ts +66 -5
  143. package/dist/dts/Channel.d.ts.map +1 -1
  144. package/dist/dts/Chunk.d.ts +30 -0
  145. package/dist/dts/Chunk.d.ts.map +1 -1
  146. package/dist/dts/Config.d.ts +25 -1
  147. package/dist/dts/Config.d.ts.map +1 -1
  148. package/dist/dts/Context.d.ts +155 -0
  149. package/dist/dts/Context.d.ts.map +1 -1
  150. package/dist/dts/Cron.d.ts +21 -6
  151. package/dist/dts/Cron.d.ts.map +1 -1
  152. package/dist/dts/Data.d.ts +26 -0
  153. package/dist/dts/Data.d.ts.map +1 -1
  154. package/dist/dts/DateTime.d.ts +192 -49
  155. package/dist/dts/DateTime.d.ts.map +1 -1
  156. package/dist/dts/Duration.d.ts +2 -0
  157. package/dist/dts/Duration.d.ts.map +1 -1
  158. package/dist/dts/Effect.d.ts +658 -1
  159. package/dist/dts/Effect.d.ts.map +1 -1
  160. package/dist/dts/Either.d.ts +84 -2
  161. package/dist/dts/Either.d.ts.map +1 -1
  162. package/dist/dts/FiberHandle.d.ts +6 -0
  163. package/dist/dts/FiberHandle.d.ts.map +1 -1
  164. package/dist/dts/FiberMap.d.ts +6 -0
  165. package/dist/dts/FiberMap.d.ts.map +1 -1
  166. package/dist/dts/FiberSet.d.ts +6 -0
  167. package/dist/dts/FiberSet.d.ts.map +1 -1
  168. package/dist/dts/Function.d.ts +50 -0
  169. package/dist/dts/Function.d.ts.map +1 -1
  170. package/dist/dts/GlobalValue.d.ts +2 -0
  171. package/dist/dts/GlobalValue.d.ts.map +1 -1
  172. package/dist/dts/HashMap.d.ts +6 -0
  173. package/dist/dts/HashMap.d.ts.map +1 -1
  174. package/dist/dts/Inspectable.d.ts.map +1 -1
  175. package/dist/dts/Iterable.d.ts +26 -0
  176. package/dist/dts/Iterable.d.ts.map +1 -1
  177. package/dist/dts/JSONSchema.d.ts +1 -0
  178. package/dist/dts/JSONSchema.d.ts.map +1 -1
  179. package/dist/dts/List.d.ts +20 -0
  180. package/dist/dts/List.d.ts.map +1 -1
  181. package/dist/dts/Logger.d.ts +34 -0
  182. package/dist/dts/Logger.d.ts.map +1 -1
  183. package/dist/dts/Mailbox.d.ts +2 -0
  184. package/dist/dts/Mailbox.d.ts.map +1 -1
  185. package/dist/dts/ManagedRuntime.d.ts +2 -0
  186. package/dist/dts/ManagedRuntime.d.ts.map +1 -1
  187. package/dist/dts/Metric.d.ts +18 -0
  188. package/dist/dts/Metric.d.ts.map +1 -1
  189. package/dist/dts/Micro.d.ts +880 -863
  190. package/dist/dts/Micro.d.ts.map +1 -1
  191. package/dist/dts/Number.d.ts +104 -0
  192. package/dist/dts/Number.d.ts.map +1 -1
  193. package/dist/dts/Option.d.ts +142 -0
  194. package/dist/dts/Option.d.ts.map +1 -1
  195. package/dist/dts/Order.d.ts +2 -0
  196. package/dist/dts/Order.d.ts.map +1 -1
  197. package/dist/dts/Ordering.d.ts +8 -0
  198. package/dist/dts/Ordering.d.ts.map +1 -1
  199. package/dist/dts/Predicate.d.ts +104 -0
  200. package/dist/dts/Predicate.d.ts.map +1 -1
  201. package/dist/dts/Random.d.ts +4 -0
  202. package/dist/dts/Random.d.ts.map +1 -1
  203. package/dist/dts/RateLimiter.d.ts +4 -0
  204. package/dist/dts/RateLimiter.d.ts.map +1 -1
  205. package/dist/dts/RcMap.d.ts +6 -0
  206. package/dist/dts/RcMap.d.ts.map +1 -1
  207. package/dist/dts/RcRef.d.ts +2 -0
  208. package/dist/dts/RcRef.d.ts.map +1 -1
  209. package/dist/dts/Record.d.ts +136 -0
  210. package/dist/dts/Record.d.ts.map +1 -1
  211. package/dist/dts/Redacted.d.ts +8 -0
  212. package/dist/dts/Redacted.d.ts.map +1 -1
  213. package/dist/dts/RegExp.d.ts +4 -0
  214. package/dist/dts/RegExp.d.ts.map +1 -1
  215. package/dist/dts/Request.d.ts +4 -0
  216. package/dist/dts/Request.d.ts.map +1 -1
  217. package/dist/dts/RequestResolver.d.ts +6 -0
  218. package/dist/dts/RequestResolver.d.ts.map +1 -1
  219. package/dist/dts/Runtime.d.ts +18 -0
  220. package/dist/dts/Runtime.d.ts.map +1 -1
  221. package/dist/dts/STM.d.ts +2 -0
  222. package/dist/dts/STM.d.ts.map +1 -1
  223. package/dist/dts/Schema.d.ts +90 -0
  224. package/dist/dts/Schema.d.ts.map +1 -1
  225. package/dist/dts/Sink.d.ts +8 -0
  226. package/dist/dts/Sink.d.ts.map +1 -1
  227. package/dist/dts/Stream.d.ts +394 -32
  228. package/dist/dts/Stream.d.ts.map +1 -1
  229. package/dist/dts/String.d.ts +94 -0
  230. package/dist/dts/String.d.ts.map +1 -1
  231. package/dist/dts/Struct.d.ts +24 -0
  232. package/dist/dts/Struct.d.ts.map +1 -1
  233. package/dist/dts/Symbol.d.ts +2 -0
  234. package/dist/dts/Symbol.d.ts.map +1 -1
  235. package/dist/dts/Trie.d.ts +132 -0
  236. package/dist/dts/Trie.d.ts.map +1 -1
  237. package/dist/dts/Tuple.d.ts +42 -0
  238. package/dist/dts/Tuple.d.ts.map +1 -1
  239. package/dist/dts/Types.d.ts +24 -0
  240. package/dist/dts/Types.d.ts.map +1 -1
  241. package/dist/dts/Utils.d.ts +4 -0
  242. package/dist/dts/Utils.d.ts.map +1 -1
  243. package/dist/dts/internal/context.d.ts +1 -1
  244. package/dist/dts/internal/context.d.ts.map +1 -1
  245. package/dist/dts/internal/dateTime.d.ts +2 -0
  246. package/dist/dts/internal/dateTime.d.ts.map +1 -0
  247. package/dist/dts/internal/fiberRuntime.d.ts.map +1 -1
  248. package/dist/dts/internal/stream.d.ts.map +1 -1
  249. package/dist/esm/Array.js +208 -0
  250. package/dist/esm/Array.js.map +1 -1
  251. package/dist/esm/BigDecimal.js +175 -20
  252. package/dist/esm/BigDecimal.js.map +1 -1
  253. package/dist/esm/BigInt.js +54 -0
  254. package/dist/esm/BigInt.js.map +1 -1
  255. package/dist/esm/Boolean.js +24 -0
  256. package/dist/esm/Boolean.js.map +1 -1
  257. package/dist/esm/Brand.js +4 -0
  258. package/dist/esm/Brand.js.map +1 -1
  259. package/dist/esm/Channel.js +42 -2
  260. package/dist/esm/Channel.js.map +1 -1
  261. package/dist/esm/Chunk.js +8 -0
  262. package/dist/esm/Chunk.js.map +1 -1
  263. package/dist/esm/Config.js +9 -0
  264. package/dist/esm/Config.js.map +1 -1
  265. package/dist/esm/Context.js +49 -0
  266. package/dist/esm/Context.js.map +1 -1
  267. package/dist/esm/Cron.js +81 -67
  268. package/dist/esm/Cron.js.map +1 -1
  269. package/dist/esm/Data.js +16 -0
  270. package/dist/esm/Data.js.map +1 -1
  271. package/dist/esm/DateTime.js +176 -627
  272. package/dist/esm/DateTime.js.map +1 -1
  273. package/dist/esm/Duration.js +2 -0
  274. package/dist/esm/Duration.js.map +1 -1
  275. package/dist/esm/Effect.js +297 -0
  276. package/dist/esm/Effect.js.map +1 -1
  277. package/dist/esm/Either.js +40 -2
  278. package/dist/esm/Either.js.map +1 -1
  279. package/dist/esm/FiberHandle.js +6 -0
  280. package/dist/esm/FiberHandle.js.map +1 -1
  281. package/dist/esm/FiberMap.js +6 -0
  282. package/dist/esm/FiberMap.js.map +1 -1
  283. package/dist/esm/FiberSet.js +6 -0
  284. package/dist/esm/FiberSet.js.map +1 -1
  285. package/dist/esm/Function.js +34 -0
  286. package/dist/esm/Function.js.map +1 -1
  287. package/dist/esm/GlobalValue.js +2 -0
  288. package/dist/esm/GlobalValue.js.map +1 -1
  289. package/dist/esm/HashMap.js.map +1 -1
  290. package/dist/esm/Inspectable.js +8 -4
  291. package/dist/esm/Inspectable.js.map +1 -1
  292. package/dist/esm/Iterable.js +18 -0
  293. package/dist/esm/Iterable.js.map +1 -1
  294. package/dist/esm/JSONSchema.js.map +1 -1
  295. package/dist/esm/List.js +4 -0
  296. package/dist/esm/List.js.map +1 -1
  297. package/dist/esm/Logger.js +26 -0
  298. package/dist/esm/Logger.js.map +1 -1
  299. package/dist/esm/Mailbox.js +2 -0
  300. package/dist/esm/Mailbox.js.map +1 -1
  301. package/dist/esm/ManagedRuntime.js +2 -0
  302. package/dist/esm/ManagedRuntime.js.map +1 -1
  303. package/dist/esm/Metric.js +10 -0
  304. package/dist/esm/Metric.js.map +1 -1
  305. package/dist/esm/Micro.js +1077 -1037
  306. package/dist/esm/Micro.js.map +1 -1
  307. package/dist/esm/Number.js +44 -0
  308. package/dist/esm/Number.js.map +1 -1
  309. package/dist/esm/Option.js +72 -0
  310. package/dist/esm/Option.js.map +1 -1
  311. package/dist/esm/Order.js +2 -0
  312. package/dist/esm/Order.js.map +1 -1
  313. package/dist/esm/Ordering.js +4 -0
  314. package/dist/esm/Ordering.js.map +1 -1
  315. package/dist/esm/Predicate.js +68 -0
  316. package/dist/esm/Predicate.js.map +1 -1
  317. package/dist/esm/Random.js +4 -0
  318. package/dist/esm/Random.js.map +1 -1
  319. package/dist/esm/RateLimiter.js +4 -0
  320. package/dist/esm/RateLimiter.js.map +1 -1
  321. package/dist/esm/RcMap.js +2 -0
  322. package/dist/esm/RcMap.js.map +1 -1
  323. package/dist/esm/RcRef.js +2 -0
  324. package/dist/esm/RcRef.js.map +1 -1
  325. package/dist/esm/Record.js +56 -0
  326. package/dist/esm/Record.js.map +1 -1
  327. package/dist/esm/Redacted.js +8 -0
  328. package/dist/esm/Redacted.js.map +1 -1
  329. package/dist/esm/RegExp.js +4 -0
  330. package/dist/esm/RegExp.js.map +1 -1
  331. package/dist/esm/Request.js +4 -0
  332. package/dist/esm/Request.js.map +1 -1
  333. package/dist/esm/RequestResolver.js +2 -0
  334. package/dist/esm/RequestResolver.js.map +1 -1
  335. package/dist/esm/Runtime.js +6 -0
  336. package/dist/esm/Runtime.js.map +1 -1
  337. package/dist/esm/STM.js.map +1 -1
  338. package/dist/esm/Schema.js +88 -0
  339. package/dist/esm/Schema.js.map +1 -1
  340. package/dist/esm/Sink.js +8 -0
  341. package/dist/esm/Sink.js.map +1 -1
  342. package/dist/esm/Stream.js +183 -5
  343. package/dist/esm/Stream.js.map +1 -1
  344. package/dist/esm/String.js +62 -0
  345. package/dist/esm/String.js.map +1 -1
  346. package/dist/esm/Struct.js +12 -0
  347. package/dist/esm/Struct.js.map +1 -1
  348. package/dist/esm/Symbol.js +2 -0
  349. package/dist/esm/Symbol.js.map +1 -1
  350. package/dist/esm/Trie.js +56 -0
  351. package/dist/esm/Trie.js.map +1 -1
  352. package/dist/esm/Tuple.js +22 -0
  353. package/dist/esm/Tuple.js.map +1 -1
  354. package/dist/esm/Utils.js +5 -0
  355. package/dist/esm/Utils.js.map +1 -1
  356. package/dist/esm/internal/channel/channelExecutor.js +5 -7
  357. package/dist/esm/internal/channel/channelExecutor.js.map +1 -1
  358. package/dist/esm/internal/channel.js +152 -129
  359. package/dist/esm/internal/channel.js.map +1 -1
  360. package/dist/esm/internal/config.js +11 -3
  361. package/dist/esm/internal/config.js.map +1 -1
  362. package/dist/esm/internal/context.js +42 -2
  363. package/dist/esm/internal/context.js.map +1 -1
  364. package/dist/esm/internal/dateTime.js +704 -0
  365. package/dist/esm/internal/dateTime.js.map +1 -0
  366. package/dist/esm/internal/fiberRuntime.js +31 -9
  367. package/dist/esm/internal/fiberRuntime.js.map +1 -1
  368. package/dist/esm/internal/groupBy.js +9 -3
  369. package/dist/esm/internal/groupBy.js.map +1 -1
  370. package/dist/esm/internal/layer.js +1 -1
  371. package/dist/esm/internal/layer.js.map +1 -1
  372. package/dist/esm/internal/mailbox.js +1 -1
  373. package/dist/esm/internal/mailbox.js.map +1 -1
  374. package/dist/esm/internal/sink.js +23 -20
  375. package/dist/esm/internal/sink.js.map +1 -1
  376. package/dist/esm/internal/stream.js +66 -69
  377. package/dist/esm/internal/stream.js.map +1 -1
  378. package/dist/esm/internal/version.js +1 -1
  379. package/dist/esm/internal/version.js.map +1 -1
  380. package/package.json +1 -1
  381. package/src/Array.ts +534 -0
  382. package/src/BigDecimal.ts +247 -21
  383. package/src/BigInt.ts +114 -0
  384. package/src/Boolean.ts +56 -0
  385. package/src/Brand.ts +6 -0
  386. package/src/Channel.ts +81 -5
  387. package/src/Chunk.ts +32 -0
  388. package/src/Config.ts +26 -1
  389. package/src/Context.ts +163 -0
  390. package/src/Cron.ts +91 -68
  391. package/src/Data.ts +26 -0
  392. package/src/DateTime.ts +307 -757
  393. package/src/Duration.ts +2 -0
  394. package/src/Effect.ts +910 -1
  395. package/src/Either.ts +84 -2
  396. package/src/FiberHandle.ts +6 -0
  397. package/src/FiberMap.ts +6 -0
  398. package/src/FiberSet.ts +6 -0
  399. package/src/Function.ts +50 -0
  400. package/src/GlobalValue.ts +2 -0
  401. package/src/HashMap.ts +6 -0
  402. package/src/Inspectable.ts +11 -7
  403. package/src/Iterable.ts +26 -0
  404. package/src/JSONSchema.ts +1 -0
  405. package/src/List.ts +24 -0
  406. package/src/Logger.ts +34 -0
  407. package/src/Mailbox.ts +2 -0
  408. package/src/ManagedRuntime.ts +2 -0
  409. package/src/Metric.ts +18 -0
  410. package/src/Micro.ts +2007 -1745
  411. package/src/Number.ts +104 -0
  412. package/src/Option.ts +142 -0
  413. package/src/Order.ts +2 -0
  414. package/src/Ordering.ts +8 -0
  415. package/src/Predicate.ts +104 -0
  416. package/src/Random.ts +4 -0
  417. package/src/RateLimiter.ts +4 -0
  418. package/src/RcMap.ts +6 -0
  419. package/src/RcRef.ts +2 -0
  420. package/src/Record.ts +136 -0
  421. package/src/Redacted.ts +8 -0
  422. package/src/RegExp.ts +4 -0
  423. package/src/Request.ts +4 -0
  424. package/src/RequestResolver.ts +6 -0
  425. package/src/Runtime.ts +18 -0
  426. package/src/STM.ts +2 -0
  427. package/src/Schema.ts +124 -0
  428. package/src/Sink.ts +11 -0
  429. package/src/Stream.ts +399 -44
  430. package/src/String.ts +94 -0
  431. package/src/Struct.ts +24 -0
  432. package/src/Symbol.ts +2 -0
  433. package/src/Trie.ts +132 -0
  434. package/src/Tuple.ts +42 -0
  435. package/src/Types.ts +24 -0
  436. package/src/Utils.ts +8 -0
  437. package/src/internal/channel/channelExecutor.ts +37 -33
  438. package/src/internal/channel.ts +504 -467
  439. package/src/internal/config.ts +18 -6
  440. package/src/internal/context.ts +56 -4
  441. package/src/internal/dateTime.ts +1126 -0
  442. package/src/internal/fiberRuntime.ts +35 -16
  443. package/src/internal/groupBy.ts +13 -22
  444. package/src/internal/layer.ts +5 -8
  445. package/src/internal/mailbox.ts +6 -4
  446. package/src/internal/sink.ts +55 -35
  447. package/src/internal/stream.ts +299 -299
  448. package/src/internal/version.ts +1 -1
@@ -51,10 +51,12 @@ export declare const empty: <K extends string | symbol = never, V = never>() =>
51
51
  * @param self - record to test for emptiness.
52
52
  *
53
53
  * @example
54
+ * ```ts
54
55
  * import { isEmptyRecord } from "effect/Record"
55
56
  *
56
57
  * assert.deepStrictEqual(isEmptyRecord({}), true);
57
58
  * assert.deepStrictEqual(isEmptyRecord({ a: 3 }), false);
59
+ * ```
58
60
  *
59
61
  * @category guards
60
62
  * @since 2.0.0
@@ -66,10 +68,12 @@ export declare const isEmptyRecord: <K extends string, A>(self: Record<K, A>) =>
66
68
  * @param self - record to test for emptiness.
67
69
  *
68
70
  * @example
71
+ * ```ts
69
72
  * import { isEmptyReadonlyRecord } from "effect/Record"
70
73
  *
71
74
  * assert.deepStrictEqual(isEmptyReadonlyRecord({}), true);
72
75
  * assert.deepStrictEqual(isEmptyReadonlyRecord({ a: 3 }), false);
76
+ * ```
73
77
  *
74
78
  * @category guards
75
79
  * @since 2.0.0
@@ -83,6 +87,7 @@ export declare const isEmptyReadonlyRecord: <K extends string, A>(self: Readonly
83
87
  * @param f - A projection function that maps values of the iterable to a tuple of a key and a value.
84
88
  *
85
89
  * @example
90
+ * ```ts
86
91
  * import { fromIterableWith } from "effect/Record"
87
92
  *
88
93
  * const input = [1, 2, 3, 4]
@@ -91,6 +96,7 @@ export declare const isEmptyReadonlyRecord: <K extends string, A>(self: Readonly
91
96
  * fromIterableWith(input, a => [String(a), a * 2]),
92
97
  * { '1': 2, '2': 4, '3': 6, '4': 8 }
93
98
  * )
99
+ * ```
94
100
  *
95
101
  * @category constructors
96
102
  * @since 2.0.0
@@ -104,6 +110,7 @@ export declare const fromIterableWith: {
104
110
  * @param f - A projection function that maps values of the iterable to a tuple of a key and a value.
105
111
  *
106
112
  * @example
113
+ * ```ts
107
114
  * import { fromIterableWith } from "effect/Record"
108
115
  *
109
116
  * const input = [1, 2, 3, 4]
@@ -112,6 +119,7 @@ export declare const fromIterableWith: {
112
119
  * fromIterableWith(input, a => [String(a), a * 2]),
113
120
  * { '1': 2, '2': 4, '3': 6, '4': 8 }
114
121
  * )
122
+ * ```
115
123
  *
116
124
  * @category constructors
117
125
  * @since 2.0.0
@@ -125,6 +133,7 @@ export declare const fromIterableWith: {
125
133
  * @param f - A projection function that maps values of the iterable to a tuple of a key and a value.
126
134
  *
127
135
  * @example
136
+ * ```ts
128
137
  * import { fromIterableWith } from "effect/Record"
129
138
  *
130
139
  * const input = [1, 2, 3, 4]
@@ -133,6 +142,7 @@ export declare const fromIterableWith: {
133
142
  * fromIterableWith(input, a => [String(a), a * 2]),
134
143
  * { '1': 2, '2': 4, '3': 6, '4': 8 }
135
144
  * )
145
+ * ```
136
146
  *
137
147
  * @category constructors
138
148
  * @since 2.0.0
@@ -146,6 +156,7 @@ export declare const fromIterableWith: {
146
156
  * @param f - A function that extracts the key for each element.
147
157
  *
148
158
  * @example
159
+ * ```ts
149
160
  * import { fromIterableBy } from "effect/Record"
150
161
  *
151
162
  * const users = [
@@ -160,6 +171,7 @@ export declare const fromIterableWith: {
160
171
  * "1": { id: "1", name: "name1" }
161
172
  * }
162
173
  * )
174
+ * ```
163
175
  *
164
176
  * @category constructors
165
177
  * @since 2.0.0
@@ -174,11 +186,13 @@ export declare const fromIterableBy: <A, K extends string | symbol>(items: Itera
174
186
  * @param self - The iterable of key-value pairs.
175
187
  *
176
188
  * @example
189
+ * ```ts
177
190
  * import { fromEntries } from "effect/Record"
178
191
  *
179
192
  * const input: Array<[string, number]> = [["a", 1], ["b", 2]]
180
193
  *
181
194
  * assert.deepStrictEqual(fromEntries(input), { a: 1, b: 2 })
195
+ * ```
182
196
  *
183
197
  * @since 2.0.0
184
198
  * @category constructors
@@ -191,10 +205,12 @@ export declare const fromEntries: <Entry extends readonly [string | symbol, any]
191
205
  * @param f - The custom mapping function to apply to each key/value of the record.
192
206
  *
193
207
  * @example
208
+ * ```ts
194
209
  * import { collect } from "effect/Record"
195
210
  *
196
211
  * const x = { a: 1, b: 2, c: 3 }
197
212
  * assert.deepStrictEqual(collect(x, (key, n) => [key, n]), [["a", 1], ["b", 2], ["c", 3]])
213
+ * ```
198
214
  *
199
215
  * @category conversions
200
216
  * @since 2.0.0
@@ -207,10 +223,12 @@ export declare const collect: {
207
223
  * @param f - The custom mapping function to apply to each key/value of the record.
208
224
  *
209
225
  * @example
226
+ * ```ts
210
227
  * import { collect } from "effect/Record"
211
228
  *
212
229
  * const x = { a: 1, b: 2, c: 3 }
213
230
  * assert.deepStrictEqual(collect(x, (key, n) => [key, n]), [["a", 1], ["b", 2], ["c", 3]])
231
+ * ```
214
232
  *
215
233
  * @category conversions
216
234
  * @since 2.0.0
@@ -223,10 +241,12 @@ export declare const collect: {
223
241
  * @param f - The custom mapping function to apply to each key/value of the record.
224
242
  *
225
243
  * @example
244
+ * ```ts
226
245
  * import { collect } from "effect/Record"
227
246
  *
228
247
  * const x = { a: 1, b: 2, c: 3 }
229
248
  * assert.deepStrictEqual(collect(x, (key, n) => [key, n]), [["a", 1], ["b", 2], ["c", 3]])
249
+ * ```
230
250
  *
231
251
  * @category conversions
232
252
  * @since 2.0.0
@@ -239,10 +259,12 @@ export declare const collect: {
239
259
  * @param self - The record to transform.
240
260
  *
241
261
  * @example
262
+ * ```ts
242
263
  * import { toEntries } from "effect/Record"
243
264
  *
244
265
  * const x = { a: 1, b: 2, c: 3 }
245
266
  * assert.deepStrictEqual(toEntries(x), [["a", 1], ["b", 2], ["c", 3]])
267
+ * ```
246
268
  *
247
269
  * @category conversions
248
270
  * @since 2.0.0
@@ -254,9 +276,11 @@ export declare const toEntries: <K extends string, A>(self: ReadonlyRecord<K, A>
254
276
  * @param self - A record to calculate the number of key/value pairs in.
255
277
  *
256
278
  * @example
279
+ * ```ts
257
280
  * import { size } from "effect/Record";
258
281
  *
259
282
  * assert.deepStrictEqual(size({ a: "a", b: 1, c: true }), 3);
283
+ * ```
260
284
  *
261
285
  * @since 2.0.0
262
286
  */
@@ -268,10 +292,12 @@ export declare const size: <K extends string, A>(self: ReadonlyRecord<K, A>) =>
268
292
  * @param key - the key to look for in the record.
269
293
  *
270
294
  * @example
295
+ * ```ts
271
296
  * import { empty, has } from "effect/Record"
272
297
  *
273
298
  * assert.deepStrictEqual(has({ a: 1, b: 2 }, "a"), true);
274
299
  * assert.deepStrictEqual(has(empty<string>(), "c"), false);
300
+ * ```
275
301
  *
276
302
  * @since 2.0.0
277
303
  */
@@ -283,10 +309,12 @@ export declare const has: {
283
309
  * @param key - the key to look for in the record.
284
310
  *
285
311
  * @example
312
+ * ```ts
286
313
  * import { empty, has } from "effect/Record"
287
314
  *
288
315
  * assert.deepStrictEqual(has({ a: 1, b: 2 }, "a"), true);
289
316
  * assert.deepStrictEqual(has(empty<string>(), "c"), false);
317
+ * ```
290
318
  *
291
319
  * @since 2.0.0
292
320
  */
@@ -298,10 +326,12 @@ export declare const has: {
298
326
  * @param key - the key to look for in the record.
299
327
  *
300
328
  * @example
329
+ * ```ts
301
330
  * import { empty, has } from "effect/Record"
302
331
  *
303
332
  * assert.deepStrictEqual(has({ a: 1, b: 2 }, "a"), true);
304
333
  * assert.deepStrictEqual(has(empty<string>(), "c"), false);
334
+ * ```
305
335
  *
306
336
  * @since 2.0.0
307
337
  */
@@ -314,12 +344,14 @@ export declare const has: {
314
344
  * @param key - Key to retrieve from record.
315
345
  *
316
346
  * @example
347
+ * ```ts
317
348
  * import { Record as R, Option } from "effect"
318
349
  *
319
350
  * const person: Record<string, unknown> = { name: "John Doe", age: 35 }
320
351
  *
321
352
  * assert.deepStrictEqual(R.get(person, "name"), Option.some("John Doe"))
322
353
  * assert.deepStrictEqual(R.get(person, "email"), Option.none())
354
+ * ```
323
355
  *
324
356
  * @since 2.0.0
325
357
  */
@@ -331,12 +363,14 @@ export declare const get: {
331
363
  * @param key - Key to retrieve from record.
332
364
  *
333
365
  * @example
366
+ * ```ts
334
367
  * import { Record as R, Option } from "effect"
335
368
  *
336
369
  * const person: Record<string, unknown> = { name: "John Doe", age: 35 }
337
370
  *
338
371
  * assert.deepStrictEqual(R.get(person, "name"), Option.some("John Doe"))
339
372
  * assert.deepStrictEqual(R.get(person, "email"), Option.none())
373
+ * ```
340
374
  *
341
375
  * @since 2.0.0
342
376
  */
@@ -348,12 +382,14 @@ export declare const get: {
348
382
  * @param key - Key to retrieve from record.
349
383
  *
350
384
  * @example
385
+ * ```ts
351
386
  * import { Record as R, Option } from "effect"
352
387
  *
353
388
  * const person: Record<string, unknown> = { name: "John Doe", age: 35 }
354
389
  *
355
390
  * assert.deepStrictEqual(R.get(person, "name"), Option.some("John Doe"))
356
391
  * assert.deepStrictEqual(R.get(person, "email"), Option.none())
392
+ * ```
357
393
  *
358
394
  * @since 2.0.0
359
395
  */
@@ -368,6 +404,7 @@ export declare const get: {
368
404
  * @param f - The function to apply to the element.
369
405
  *
370
406
  * @example
407
+ * ```ts
371
408
  * import { Record as R } from "effect"
372
409
  *
373
410
  * const f = (x: number) => x * 2
@@ -380,6 +417,7 @@ export declare const get: {
380
417
  * R.modify({ a: 3 } as Record<string, number>, 'b', f),
381
418
  * { a: 3 }
382
419
  * )
420
+ * ```
383
421
  *
384
422
  * @since 2.0.0
385
423
  */
@@ -393,6 +431,7 @@ export declare const modify: {
393
431
  * @param f - The function to apply to the element.
394
432
  *
395
433
  * @example
434
+ * ```ts
396
435
  * import { Record as R } from "effect"
397
436
  *
398
437
  * const f = (x: number) => x * 2
@@ -405,6 +444,7 @@ export declare const modify: {
405
444
  * R.modify({ a: 3 } as Record<string, number>, 'b', f),
406
445
  * { a: 3 }
407
446
  * )
447
+ * ```
408
448
  *
409
449
  * @since 2.0.0
410
450
  */
@@ -418,6 +458,7 @@ export declare const modify: {
418
458
  * @param f - The function to apply to the element.
419
459
  *
420
460
  * @example
461
+ * ```ts
421
462
  * import { Record as R } from "effect"
422
463
  *
423
464
  * const f = (x: number) => x * 2
@@ -430,6 +471,7 @@ export declare const modify: {
430
471
  * R.modify({ a: 3 } as Record<string, number>, 'b', f),
431
472
  * { a: 3 }
432
473
  * )
474
+ * ```
433
475
  *
434
476
  * @since 2.0.0
435
477
  */
@@ -444,6 +486,7 @@ export declare const modify: {
444
486
  * @param f - The function to apply to the element.
445
487
  *
446
488
  * @example
489
+ * ```ts
447
490
  * import { Record as R, Option } from "effect"
448
491
  *
449
492
  * const f = (x: number) => x * 2
@@ -456,6 +499,7 @@ export declare const modify: {
456
499
  * R.modifyOption({ a: 3 } as Record<string, number>, 'b', f),
457
500
  * Option.none()
458
501
  * )
502
+ * ```
459
503
  *
460
504
  * @since 2.0.0
461
505
  */
@@ -469,6 +513,7 @@ export declare const modifyOption: {
469
513
  * @param f - The function to apply to the element.
470
514
  *
471
515
  * @example
516
+ * ```ts
472
517
  * import { Record as R, Option } from "effect"
473
518
  *
474
519
  * const f = (x: number) => x * 2
@@ -481,6 +526,7 @@ export declare const modifyOption: {
481
526
  * R.modifyOption({ a: 3 } as Record<string, number>, 'b', f),
482
527
  * Option.none()
483
528
  * )
529
+ * ```
484
530
  *
485
531
  * @since 2.0.0
486
532
  */
@@ -494,6 +540,7 @@ export declare const modifyOption: {
494
540
  * @param f - The function to apply to the element.
495
541
  *
496
542
  * @example
543
+ * ```ts
497
544
  * import { Record as R, Option } from "effect"
498
545
  *
499
546
  * const f = (x: number) => x * 2
@@ -506,6 +553,7 @@ export declare const modifyOption: {
506
553
  * R.modifyOption({ a: 3 } as Record<string, number>, 'b', f),
507
554
  * Option.none()
508
555
  * )
556
+ * ```
509
557
  *
510
558
  * @since 2.0.0
511
559
  */
@@ -519,6 +567,7 @@ export declare const modifyOption: {
519
567
  * @param b - The new value to replace the existing value with.
520
568
  *
521
569
  * @example
570
+ * ```ts
522
571
  * import { Record, Option } from "effect"
523
572
  *
524
573
  * assert.deepStrictEqual(
@@ -526,6 +575,7 @@ export declare const modifyOption: {
526
575
  * Option.some({ a: 10, b: 2, c: 3 })
527
576
  * )
528
577
  * assert.deepStrictEqual(Record.replaceOption(Record.empty<string>(), 'a', 10), Option.none())
578
+ * ```
529
579
  *
530
580
  * @since 2.0.0
531
581
  */
@@ -538,6 +588,7 @@ export declare const replaceOption: {
538
588
  * @param b - The new value to replace the existing value with.
539
589
  *
540
590
  * @example
591
+ * ```ts
541
592
  * import { Record, Option } from "effect"
542
593
  *
543
594
  * assert.deepStrictEqual(
@@ -545,6 +596,7 @@ export declare const replaceOption: {
545
596
  * Option.some({ a: 10, b: 2, c: 3 })
546
597
  * )
547
598
  * assert.deepStrictEqual(Record.replaceOption(Record.empty<string>(), 'a', 10), Option.none())
599
+ * ```
548
600
  *
549
601
  * @since 2.0.0
550
602
  */
@@ -557,6 +609,7 @@ export declare const replaceOption: {
557
609
  * @param b - The new value to replace the existing value with.
558
610
  *
559
611
  * @example
612
+ * ```ts
560
613
  * import { Record, Option } from "effect"
561
614
  *
562
615
  * assert.deepStrictEqual(
@@ -564,6 +617,7 @@ export declare const replaceOption: {
564
617
  * Option.some({ a: 10, b: 2, c: 3 })
565
618
  * )
566
619
  * assert.deepStrictEqual(Record.replaceOption(Record.empty<string>(), 'a', 10), Option.none())
620
+ * ```
567
621
  *
568
622
  * @since 2.0.0
569
623
  */
@@ -577,9 +631,11 @@ export declare const replaceOption: {
577
631
  * @param key - the key to remove from the record.
578
632
  *
579
633
  * @example
634
+ * ```ts
580
635
  * import { remove } from "effect/Record"
581
636
  *
582
637
  * assert.deepStrictEqual(remove({ a: 1, b: 2 }, "a"), { b: 2 })
638
+ * ```
583
639
  *
584
640
  * @since 2.0.0
585
641
  */
@@ -592,9 +648,11 @@ export declare const remove: {
592
648
  * @param key - the key to remove from the record.
593
649
  *
594
650
  * @example
651
+ * ```ts
595
652
  * import { remove } from "effect/Record"
596
653
  *
597
654
  * assert.deepStrictEqual(remove({ a: 1, b: 2 }, "a"), { b: 2 })
655
+ * ```
598
656
  *
599
657
  * @since 2.0.0
600
658
  */
@@ -607,9 +665,11 @@ export declare const remove: {
607
665
  * @param key - the key to remove from the record.
608
666
  *
609
667
  * @example
668
+ * ```ts
610
669
  * import { remove } from "effect/Record"
611
670
  *
612
671
  * assert.deepStrictEqual(remove({ a: 1, b: 2 }, "a"), { b: 2 })
672
+ * ```
613
673
  *
614
674
  * @since 2.0.0
615
675
  */
@@ -624,10 +684,12 @@ export declare const remove: {
624
684
  * @param key - The key of the property to retrieve.
625
685
  *
626
686
  * @example
687
+ * ```ts
627
688
  * import { Record as R, Option } from "effect"
628
689
  *
629
690
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 }, "a"), Option.some([1, { b: 2 }]))
630
691
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 } as Record<string, number>, "c"), Option.none())
692
+ * ```
631
693
  *
632
694
  * @category record
633
695
  * @since 2.0.0
@@ -642,10 +704,12 @@ export declare const pop: {
642
704
  * @param key - The key of the property to retrieve.
643
705
  *
644
706
  * @example
707
+ * ```ts
645
708
  * import { Record as R, Option } from "effect"
646
709
  *
647
710
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 }, "a"), Option.some([1, { b: 2 }]))
648
711
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 } as Record<string, number>, "c"), Option.none())
712
+ * ```
649
713
  *
650
714
  * @category record
651
715
  * @since 2.0.0
@@ -660,10 +724,12 @@ export declare const pop: {
660
724
  * @param key - The key of the property to retrieve.
661
725
  *
662
726
  * @example
727
+ * ```ts
663
728
  * import { Record as R, Option } from "effect"
664
729
  *
665
730
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 }, "a"), Option.some([1, { b: 2 }]))
666
731
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 } as Record<string, number>, "c"), Option.none())
732
+ * ```
667
733
  *
668
734
  * @category record
669
735
  * @since 2.0.0
@@ -677,6 +743,7 @@ export declare const pop: {
677
743
  * @param f - A transformation function that will be applied to each of the values in the record.
678
744
  *
679
745
  * @example
746
+ * ```ts
680
747
  * import { map } from "effect/Record"
681
748
  *
682
749
  * const f = (n: number) => `-${n}`
@@ -686,6 +753,7 @@ export declare const pop: {
686
753
  * const g = (n: number, key: string) => `${key.toUpperCase()}-${n}`
687
754
  *
688
755
  * assert.deepStrictEqual(map({ a: 3, b: 5 }, g), { a: "A-3", b: "B-5" })
756
+ * ```
689
757
  *
690
758
  * @category mapping
691
759
  * @since 2.0.0
@@ -698,6 +766,7 @@ export declare const map: {
698
766
  * @param f - A transformation function that will be applied to each of the values in the record.
699
767
  *
700
768
  * @example
769
+ * ```ts
701
770
  * import { map } from "effect/Record"
702
771
  *
703
772
  * const f = (n: number) => `-${n}`
@@ -707,6 +776,7 @@ export declare const map: {
707
776
  * const g = (n: number, key: string) => `${key.toUpperCase()}-${n}`
708
777
  *
709
778
  * assert.deepStrictEqual(map({ a: 3, b: 5 }, g), { a: "A-3", b: "B-5" })
779
+ * ```
710
780
  *
711
781
  * @category mapping
712
782
  * @since 2.0.0
@@ -719,6 +789,7 @@ export declare const map: {
719
789
  * @param f - A transformation function that will be applied to each of the values in the record.
720
790
  *
721
791
  * @example
792
+ * ```ts
722
793
  * import { map } from "effect/Record"
723
794
  *
724
795
  * const f = (n: number) => `-${n}`
@@ -728,6 +799,7 @@ export declare const map: {
728
799
  * const g = (n: number, key: string) => `${key.toUpperCase()}-${n}`
729
800
  *
730
801
  * assert.deepStrictEqual(map({ a: 3, b: 5 }, g), { a: "A-3", b: "B-5" })
802
+ * ```
731
803
  *
732
804
  * @category mapping
733
805
  * @since 2.0.0
@@ -738,9 +810,11 @@ export declare const map: {
738
810
  * Maps the keys of a `ReadonlyRecord` while preserving the corresponding values.
739
811
  *
740
812
  * @example
813
+ * ```ts
741
814
  * import { mapKeys } from "effect/Record"
742
815
  *
743
816
  * assert.deepStrictEqual(mapKeys({ a: 3, b: 5 }, (key) => key.toUpperCase()), { A: 3, B: 5 })
817
+ * ```
744
818
  *
745
819
  * @category mapping
746
820
  * @since 2.0.0
@@ -750,9 +824,11 @@ export declare const mapKeys: {
750
824
  * Maps the keys of a `ReadonlyRecord` while preserving the corresponding values.
751
825
  *
752
826
  * @example
827
+ * ```ts
753
828
  * import { mapKeys } from "effect/Record"
754
829
  *
755
830
  * assert.deepStrictEqual(mapKeys({ a: 3, b: 5 }, (key) => key.toUpperCase()), { A: 3, B: 5 })
831
+ * ```
756
832
  *
757
833
  * @category mapping
758
834
  * @since 2.0.0
@@ -762,9 +838,11 @@ export declare const mapKeys: {
762
838
  * Maps the keys of a `ReadonlyRecord` while preserving the corresponding values.
763
839
  *
764
840
  * @example
841
+ * ```ts
765
842
  * import { mapKeys } from "effect/Record"
766
843
  *
767
844
  * assert.deepStrictEqual(mapKeys({ a: 3, b: 5 }, (key) => key.toUpperCase()), { A: 3, B: 5 })
845
+ * ```
768
846
  *
769
847
  * @category mapping
770
848
  * @since 2.0.0
@@ -775,9 +853,11 @@ export declare const mapKeys: {
775
853
  * Maps entries of a `ReadonlyRecord` using the provided function, allowing modification of both keys and corresponding values.
776
854
  *
777
855
  * @example
856
+ * ```ts
778
857
  * import { mapEntries } from "effect/Record"
779
858
  *
780
859
  * assert.deepStrictEqual(mapEntries({ a: 3, b: 5 }, (a, key) => [key.toUpperCase(), a + 1]), { A: 4, B: 6 })
860
+ * ```
781
861
  *
782
862
  * @category mapping
783
863
  * @since 2.0.0
@@ -787,9 +867,11 @@ export declare const mapEntries: {
787
867
  * Maps entries of a `ReadonlyRecord` using the provided function, allowing modification of both keys and corresponding values.
788
868
  *
789
869
  * @example
870
+ * ```ts
790
871
  * import { mapEntries } from "effect/Record"
791
872
  *
792
873
  * assert.deepStrictEqual(mapEntries({ a: 3, b: 5 }, (a, key) => [key.toUpperCase(), a + 1]), { A: 4, B: 6 })
874
+ * ```
793
875
  *
794
876
  * @category mapping
795
877
  * @since 2.0.0
@@ -799,9 +881,11 @@ export declare const mapEntries: {
799
881
  * Maps entries of a `ReadonlyRecord` using the provided function, allowing modification of both keys and corresponding values.
800
882
  *
801
883
  * @example
884
+ * ```ts
802
885
  * import { mapEntries } from "effect/Record"
803
886
  *
804
887
  * assert.deepStrictEqual(mapEntries({ a: 3, b: 5 }, (a, key) => [key.toUpperCase(), a + 1]), { A: 4, B: 6 })
888
+ * ```
805
889
  *
806
890
  * @category mapping
807
891
  * @since 2.0.0
@@ -816,11 +900,13 @@ export declare const mapEntries: {
816
900
  * @param f - The transformation function.
817
901
  *
818
902
  * @example
903
+ * ```ts
819
904
  * import { Record, Option } from "effect"
820
905
  *
821
906
  * const x = { a: 1, b: 2, c: 3 }
822
907
  * const f = (a: number, key: string) => a > 2 ? Option.some(a * 2) : Option.none()
823
908
  * assert.deepStrictEqual(Record.filterMap(x, f), { c: 6 })
909
+ * ```
824
910
  *
825
911
  * @since 2.0.0
826
912
  */
@@ -833,11 +919,13 @@ export declare const filterMap: {
833
919
  * @param f - The transformation function.
834
920
  *
835
921
  * @example
922
+ * ```ts
836
923
  * import { Record, Option } from "effect"
837
924
  *
838
925
  * const x = { a: 1, b: 2, c: 3 }
839
926
  * const f = (a: number, key: string) => a > 2 ? Option.some(a * 2) : Option.none()
840
927
  * assert.deepStrictEqual(Record.filterMap(x, f), { c: 6 })
928
+ * ```
841
929
  *
842
930
  * @since 2.0.0
843
931
  */
@@ -850,11 +938,13 @@ export declare const filterMap: {
850
938
  * @param f - The transformation function.
851
939
  *
852
940
  * @example
941
+ * ```ts
853
942
  * import { Record, Option } from "effect"
854
943
  *
855
944
  * const x = { a: 1, b: 2, c: 3 }
856
945
  * const f = (a: number, key: string) => a > 2 ? Option.some(a * 2) : Option.none()
857
946
  * assert.deepStrictEqual(Record.filterMap(x, f), { c: 6 })
947
+ * ```
858
948
  *
859
949
  * @since 2.0.0
860
950
  */
@@ -867,10 +957,12 @@ export declare const filterMap: {
867
957
  * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
868
958
  *
869
959
  * @example
960
+ * ```ts
870
961
  * import { filter } from "effect/Record"
871
962
  *
872
963
  * const x = { a: 1, b: 2, c: 3, d: 4 }
873
964
  * assert.deepStrictEqual(filter(x, (n) => n > 2), { c: 3, d: 4 })
965
+ * ```
874
966
  *
875
967
  * @category filtering
876
968
  * @since 2.0.0
@@ -883,10 +975,12 @@ export declare const filter: {
883
975
  * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
884
976
  *
885
977
  * @example
978
+ * ```ts
886
979
  * import { filter } from "effect/Record"
887
980
  *
888
981
  * const x = { a: 1, b: 2, c: 3, d: 4 }
889
982
  * assert.deepStrictEqual(filter(x, (n) => n > 2), { c: 3, d: 4 })
983
+ * ```
890
984
  *
891
985
  * @category filtering
892
986
  * @since 2.0.0
@@ -899,10 +993,12 @@ export declare const filter: {
899
993
  * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
900
994
  *
901
995
  * @example
996
+ * ```ts
902
997
  * import { filter } from "effect/Record"
903
998
  *
904
999
  * const x = { a: 1, b: 2, c: 3, d: 4 }
905
1000
  * assert.deepStrictEqual(filter(x, (n) => n > 2), { c: 3, d: 4 })
1001
+ * ```
906
1002
  *
907
1003
  * @category filtering
908
1004
  * @since 2.0.0
@@ -915,10 +1011,12 @@ export declare const filter: {
915
1011
  * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
916
1012
  *
917
1013
  * @example
1014
+ * ```ts
918
1015
  * import { filter } from "effect/Record"
919
1016
  *
920
1017
  * const x = { a: 1, b: 2, c: 3, d: 4 }
921
1018
  * assert.deepStrictEqual(filter(x, (n) => n > 2), { c: 3, d: 4 })
1019
+ * ```
922
1020
  *
923
1021
  * @category filtering
924
1022
  * @since 2.0.0
@@ -931,10 +1029,12 @@ export declare const filter: {
931
1029
  * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
932
1030
  *
933
1031
  * @example
1032
+ * ```ts
934
1033
  * import { filter } from "effect/Record"
935
1034
  *
936
1035
  * const x = { a: 1, b: 2, c: 3, d: 4 }
937
1036
  * assert.deepStrictEqual(filter(x, (n) => n > 2), { c: 3, d: 4 })
1037
+ * ```
938
1038
  *
939
1039
  * @category filtering
940
1040
  * @since 2.0.0
@@ -947,12 +1047,14 @@ export declare const filter: {
947
1047
  * @param self - A record with `Option` values.
948
1048
  *
949
1049
  * @example
1050
+ * ```ts
950
1051
  * import { Record, Option } from "effect"
951
1052
  *
952
1053
  * assert.deepStrictEqual(
953
1054
  * Record.getSomes({ a: Option.some(1), b: Option.none(), c: Option.some(2) }),
954
1055
  * { a: 1, c: 2 }
955
1056
  * )
1057
+ * ```
956
1058
  *
957
1059
  * @category filtering
958
1060
  * @since 2.0.0
@@ -962,12 +1064,14 @@ export declare const getSomes: <K extends string, A>(self: ReadonlyRecord<K, Opt
962
1064
  * Given a record with `Either` values, returns a new record containing only the `Left` values, preserving the original keys.
963
1065
  *
964
1066
  * @example
1067
+ * ```ts
965
1068
  * import { Record, Either } from "effect"
966
1069
  *
967
1070
  * assert.deepStrictEqual(
968
1071
  * Record.getLefts({ a: Either.right(1), b: Either.left("err"), c: Either.right(2) }),
969
1072
  * { b: "err" }
970
1073
  * )
1074
+ * ```
971
1075
  *
972
1076
  * @category filtering
973
1077
  * @since 2.0.0
@@ -977,12 +1081,14 @@ export declare const getLefts: <K extends string, R, L>(self: ReadonlyRecord<K,
977
1081
  * Given a record with `Either` values, returns a new record containing only the `Right` values, preserving the original keys.
978
1082
  *
979
1083
  * @example
1084
+ * ```ts
980
1085
  * import { Record, Either } from "effect"
981
1086
  *
982
1087
  * assert.deepStrictEqual(
983
1088
  * Record.getRights({ a: Either.right(1), b: Either.left("err"), c: Either.right(2) }),
984
1089
  * { a: 1, c: 2 }
985
1090
  * )
1091
+ * ```
986
1092
  *
987
1093
  * @category filtering
988
1094
  * @since 2.0.0
@@ -995,11 +1101,13 @@ export declare const getRights: <K extends string, R, L>(self: ReadonlyRecord<K,
995
1101
  * @param f - The predicate function to apply to each element.
996
1102
  *
997
1103
  * @example
1104
+ * ```ts
998
1105
  * import { Record, Either } from "effect"
999
1106
  *
1000
1107
  * const x = { a: 1, b: 2, c: 3 }
1001
1108
  * const f = (n: number) => (n % 2 === 0 ? Either.right(n) : Either.left(n))
1002
1109
  * assert.deepStrictEqual(Record.partitionMap(x, f), [{ a: 1, c: 3 }, { b: 2}])
1110
+ * ```
1003
1111
  *
1004
1112
  * @category filtering
1005
1113
  * @since 2.0.0
@@ -1012,11 +1120,13 @@ export declare const partitionMap: {
1012
1120
  * @param f - The predicate function to apply to each element.
1013
1121
  *
1014
1122
  * @example
1123
+ * ```ts
1015
1124
  * import { Record, Either } from "effect"
1016
1125
  *
1017
1126
  * const x = { a: 1, b: 2, c: 3 }
1018
1127
  * const f = (n: number) => (n % 2 === 0 ? Either.right(n) : Either.left(n))
1019
1128
  * assert.deepStrictEqual(Record.partitionMap(x, f), [{ a: 1, c: 3 }, { b: 2}])
1129
+ * ```
1020
1130
  *
1021
1131
  * @category filtering
1022
1132
  * @since 2.0.0
@@ -1029,11 +1139,13 @@ export declare const partitionMap: {
1029
1139
  * @param f - The predicate function to apply to each element.
1030
1140
  *
1031
1141
  * @example
1142
+ * ```ts
1032
1143
  * import { Record, Either } from "effect"
1033
1144
  *
1034
1145
  * const x = { a: 1, b: 2, c: 3 }
1035
1146
  * const f = (n: number) => (n % 2 === 0 ? Either.right(n) : Either.left(n))
1036
1147
  * assert.deepStrictEqual(Record.partitionMap(x, f), [{ a: 1, c: 3 }, { b: 2}])
1148
+ * ```
1037
1149
  *
1038
1150
  * @category filtering
1039
1151
  * @since 2.0.0
@@ -1047,12 +1159,14 @@ export declare const partitionMap: {
1047
1159
  * @param self - the record to partition.
1048
1160
  *
1049
1161
  * @example
1162
+ * ```ts
1050
1163
  * import { Record, Either } from "effect"
1051
1164
  *
1052
1165
  * assert.deepStrictEqual(
1053
1166
  * Record.separate({ a: Either.left("e"), b: Either.right(1) }),
1054
1167
  * [{ a: "e" }, { b: 1 }]
1055
1168
  * )
1169
+ * ```
1056
1170
  *
1057
1171
  * @category filtering
1058
1172
  * @since 2.0.0
@@ -1065,12 +1179,14 @@ export declare const separate: <K extends string, A, B>(self: ReadonlyRecord<K,
1065
1179
  * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1066
1180
  *
1067
1181
  * @example
1182
+ * ```ts
1068
1183
  * import { partition } from "effect/Record"
1069
1184
  *
1070
1185
  * assert.deepStrictEqual(
1071
1186
  * partition({ a: 1, b: 3 }, (n) => n > 2),
1072
1187
  * [{ a: 1 }, { b: 3 }]
1073
1188
  * )
1189
+ * ```
1074
1190
  *
1075
1191
  * @category filtering
1076
1192
  * @since 2.0.0
@@ -1083,12 +1199,14 @@ export declare const partition: {
1083
1199
  * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1084
1200
  *
1085
1201
  * @example
1202
+ * ```ts
1086
1203
  * import { partition } from "effect/Record"
1087
1204
  *
1088
1205
  * assert.deepStrictEqual(
1089
1206
  * partition({ a: 1, b: 3 }, (n) => n > 2),
1090
1207
  * [{ a: 1 }, { b: 3 }]
1091
1208
  * )
1209
+ * ```
1092
1210
  *
1093
1211
  * @category filtering
1094
1212
  * @since 2.0.0
@@ -1104,12 +1222,14 @@ export declare const partition: {
1104
1222
  * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1105
1223
  *
1106
1224
  * @example
1225
+ * ```ts
1107
1226
  * import { partition } from "effect/Record"
1108
1227
  *
1109
1228
  * assert.deepStrictEqual(
1110
1229
  * partition({ a: 1, b: 3 }, (n) => n > 2),
1111
1230
  * [{ a: 1 }, { b: 3 }]
1112
1231
  * )
1232
+ * ```
1113
1233
  *
1114
1234
  * @category filtering
1115
1235
  * @since 2.0.0
@@ -1122,12 +1242,14 @@ export declare const partition: {
1122
1242
  * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1123
1243
  *
1124
1244
  * @example
1245
+ * ```ts
1125
1246
  * import { partition } from "effect/Record"
1126
1247
  *
1127
1248
  * assert.deepStrictEqual(
1128
1249
  * partition({ a: 1, b: 3 }, (n) => n > 2),
1129
1250
  * [{ a: 1 }, { b: 3 }]
1130
1251
  * )
1252
+ * ```
1131
1253
  *
1132
1254
  * @category filtering
1133
1255
  * @since 2.0.0
@@ -1143,12 +1265,14 @@ export declare const partition: {
1143
1265
  * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1144
1266
  *
1145
1267
  * @example
1268
+ * ```ts
1146
1269
  * import { partition } from "effect/Record"
1147
1270
  *
1148
1271
  * assert.deepStrictEqual(
1149
1272
  * partition({ a: 1, b: 3 }, (n) => n > 2),
1150
1273
  * [{ a: 1 }, { b: 3 }]
1151
1274
  * )
1275
+ * ```
1152
1276
  *
1153
1277
  * @category filtering
1154
1278
  * @since 2.0.0
@@ -1179,10 +1303,12 @@ export declare const values: <K extends string, A>(self: ReadonlyRecord<K, A>) =
1179
1303
  * @param values - The value you want to associate with the key.
1180
1304
  *
1181
1305
  * @example
1306
+ * ```ts
1182
1307
  * import { set } from "effect/Record"
1183
1308
  *
1184
1309
  * assert.deepStrictEqual(set("a", 5)({ a: 1, b: 2 }), { a: 5, b: 2 });
1185
1310
  * assert.deepStrictEqual(set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 });
1311
+ * ```
1186
1312
  *
1187
1313
  * @since 2.0.0
1188
1314
  */
@@ -1195,10 +1321,12 @@ export declare const set: {
1195
1321
  * @param values - The value you want to associate with the key.
1196
1322
  *
1197
1323
  * @example
1324
+ * ```ts
1198
1325
  * import { set } from "effect/Record"
1199
1326
  *
1200
1327
  * assert.deepStrictEqual(set("a", 5)({ a: 1, b: 2 }), { a: 5, b: 2 });
1201
1328
  * assert.deepStrictEqual(set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 });
1329
+ * ```
1202
1330
  *
1203
1331
  * @since 2.0.0
1204
1332
  */
@@ -1211,10 +1339,12 @@ export declare const set: {
1211
1339
  * @param values - The value you want to associate with the key.
1212
1340
  *
1213
1341
  * @example
1342
+ * ```ts
1214
1343
  * import { set } from "effect/Record"
1215
1344
  *
1216
1345
  * assert.deepStrictEqual(set("a", 5)({ a: 1, b: 2 }), { a: 5, b: 2 });
1217
1346
  * assert.deepStrictEqual(set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 });
1347
+ * ```
1218
1348
  *
1219
1349
  * @since 2.0.0
1220
1350
  */
@@ -1229,10 +1359,12 @@ export declare const set: {
1229
1359
  * @param value - The new value to associate with the key.
1230
1360
  *
1231
1361
  * @example
1362
+ * ```ts
1232
1363
  * import { Record } from "effect"
1233
1364
  *
1234
1365
  * assert.deepStrictEqual(Record.replace("a", 3)({ a: 1, b: 2 }), { a: 3, b: 2 });
1235
1366
  * assert.deepStrictEqual(Record.replace("c", 3)({ a: 1, b: 2 }), { a: 1, b: 2 });
1367
+ * ```
1236
1368
  *
1237
1369
  * @since 2.0.0
1238
1370
  */
@@ -1246,10 +1378,12 @@ export declare const replace: {
1246
1378
  * @param value - The new value to associate with the key.
1247
1379
  *
1248
1380
  * @example
1381
+ * ```ts
1249
1382
  * import { Record } from "effect"
1250
1383
  *
1251
1384
  * assert.deepStrictEqual(Record.replace("a", 3)({ a: 1, b: 2 }), { a: 3, b: 2 });
1252
1385
  * assert.deepStrictEqual(Record.replace("c", 3)({ a: 1, b: 2 }), { a: 1, b: 2 });
1386
+ * ```
1253
1387
  *
1254
1388
  * @since 2.0.0
1255
1389
  */
@@ -1263,10 +1397,12 @@ export declare const replace: {
1263
1397
  * @param value - The new value to associate with the key.
1264
1398
  *
1265
1399
  * @example
1400
+ * ```ts
1266
1401
  * import { Record } from "effect"
1267
1402
  *
1268
1403
  * assert.deepStrictEqual(Record.replace("a", 3)({ a: 1, b: 2 }), { a: 3, b: 2 });
1269
1404
  * assert.deepStrictEqual(Record.replace("c", 3)({ a: 1, b: 2 }), { a: 1, b: 2 });
1405
+ * ```
1270
1406
  *
1271
1407
  * @since 2.0.0
1272
1408
  */