effect 3.13.8 → 3.13.9

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 (333) hide show
  1. package/dist/cjs/Array.js +460 -431
  2. package/dist/cjs/Array.js.map +1 -1
  3. package/dist/cjs/BigDecimal.js +31 -89
  4. package/dist/cjs/BigDecimal.js.map +1 -1
  5. package/dist/cjs/BigInt.js +27 -71
  6. package/dist/cjs/BigInt.js.map +1 -1
  7. package/dist/cjs/Boolean.js +12 -10
  8. package/dist/cjs/Boolean.js.map +1 -1
  9. package/dist/cjs/Brand.js +2 -0
  10. package/dist/cjs/Brand.js.map +1 -1
  11. package/dist/cjs/Channel.js +0 -2
  12. package/dist/cjs/Channel.js.map +1 -1
  13. package/dist/cjs/Chunk.js +4 -0
  14. package/dist/cjs/Chunk.js.map +1 -1
  15. package/dist/cjs/Config.js +0 -5
  16. package/dist/cjs/Config.js.map +1 -1
  17. package/dist/cjs/Context.js +14 -24
  18. package/dist/cjs/Context.js.map +1 -1
  19. package/dist/cjs/Cron.js +11 -25
  20. package/dist/cjs/Cron.js.map +1 -1
  21. package/dist/cjs/Data.js +6 -0
  22. package/dist/cjs/Data.js.map +1 -1
  23. package/dist/cjs/DateTime.js +2 -0
  24. package/dist/cjs/DateTime.js.map +1 -1
  25. package/dist/cjs/Duration.js +2 -2
  26. package/dist/cjs/Effect.js +122 -53
  27. package/dist/cjs/Effect.js.map +1 -1
  28. package/dist/cjs/Either.js +21 -25
  29. package/dist/cjs/Either.js.map +1 -1
  30. package/dist/cjs/Encoding.js +1 -1
  31. package/dist/cjs/Equivalence.js +1 -1
  32. package/dist/cjs/Function.js +21 -24
  33. package/dist/cjs/Function.js.map +1 -1
  34. package/dist/cjs/HashMap.js +0 -3
  35. package/dist/cjs/HashMap.js.map +1 -1
  36. package/dist/cjs/Iterable.js +9 -2
  37. package/dist/cjs/Iterable.js.map +1 -1
  38. package/dist/cjs/List.js +2 -0
  39. package/dist/cjs/List.js.map +1 -1
  40. package/dist/cjs/Logger.js +0 -2
  41. package/dist/cjs/Logger.js.map +1 -1
  42. package/dist/cjs/Mailbox.js +1 -0
  43. package/dist/cjs/Mailbox.js.map +1 -1
  44. package/dist/cjs/ManagedRuntime.js +0 -2
  45. package/dist/cjs/ManagedRuntime.js.map +1 -1
  46. package/dist/cjs/Metric.js +6 -12
  47. package/dist/cjs/Metric.js.map +1 -1
  48. package/dist/cjs/Number.js +22 -61
  49. package/dist/cjs/Number.js.map +1 -1
  50. package/dist/cjs/Option.js +5 -0
  51. package/dist/cjs/Option.js.map +1 -1
  52. package/dist/cjs/Order.js +1 -0
  53. package/dist/cjs/Order.js.map +1 -1
  54. package/dist/cjs/Ordering.js +2 -7
  55. package/dist/cjs/Ordering.js.map +1 -1
  56. package/dist/cjs/Pool.js +1 -1
  57. package/dist/cjs/Predicate.js +36 -77
  58. package/dist/cjs/Predicate.js.map +1 -1
  59. package/dist/cjs/Random.js +1 -2
  60. package/dist/cjs/Random.js.map +1 -1
  61. package/dist/cjs/RcMap.js +5 -2
  62. package/dist/cjs/RcMap.js.map +1 -1
  63. package/dist/cjs/Record.js +28 -107
  64. package/dist/cjs/Record.js.map +1 -1
  65. package/dist/cjs/Redacted.js +3 -0
  66. package/dist/cjs/Redacted.js.map +1 -1
  67. package/dist/cjs/RegExp.js +2 -2
  68. package/dist/cjs/RegExp.js.map +1 -1
  69. package/dist/cjs/STM.js +3 -5
  70. package/dist/cjs/STM.js.map +1 -1
  71. package/dist/cjs/Schedule.js +2 -2
  72. package/dist/cjs/Schema.js +14 -13
  73. package/dist/cjs/Schema.js.map +1 -1
  74. package/dist/cjs/SchemaAST.js +0 -2
  75. package/dist/cjs/SchemaAST.js.map +1 -1
  76. package/dist/cjs/Sink.js +14 -10
  77. package/dist/cjs/Sink.js.map +1 -1
  78. package/dist/cjs/Stream.js +24 -25
  79. package/dist/cjs/Stream.js.map +1 -1
  80. package/dist/cjs/String.js +31 -2
  81. package/dist/cjs/String.js.map +1 -1
  82. package/dist/cjs/Struct.js +6 -0
  83. package/dist/cjs/Struct.js.map +1 -1
  84. package/dist/cjs/Symbol.js +1 -2
  85. package/dist/cjs/Symbol.js.map +1 -1
  86. package/dist/cjs/TestClock.js.map +1 -1
  87. package/dist/cjs/Trie.js +28 -0
  88. package/dist/cjs/Trie.js.map +1 -1
  89. package/dist/cjs/Tuple.js +9 -24
  90. package/dist/cjs/Tuple.js.map +1 -1
  91. package/dist/cjs/internal/matcher.js +1 -1
  92. package/dist/cjs/internal/matcher.js.map +1 -1
  93. package/dist/cjs/internal/version.js +1 -1
  94. package/dist/dts/Array.d.ts +1235 -1188
  95. package/dist/dts/Array.d.ts.map +1 -1
  96. package/dist/dts/BigDecimal.d.ts +61 -189
  97. package/dist/dts/BigDecimal.d.ts.map +1 -1
  98. package/dist/dts/BigInt.d.ts +57 -165
  99. package/dist/dts/BigInt.d.ts.map +1 -1
  100. package/dist/dts/Boolean.d.ts +28 -18
  101. package/dist/dts/Boolean.d.ts.map +1 -1
  102. package/dist/dts/Brand.d.ts +3 -3
  103. package/dist/dts/Brand.d.ts.map +1 -1
  104. package/dist/dts/Channel.d.ts +0 -6
  105. package/dist/dts/Channel.d.ts.map +1 -1
  106. package/dist/dts/Chunk.d.ts +15 -0
  107. package/dist/dts/Chunk.d.ts.map +1 -1
  108. package/dist/dts/Config.d.ts +0 -5
  109. package/dist/dts/Config.d.ts.map +1 -1
  110. package/dist/dts/Context.d.ts +26 -54
  111. package/dist/dts/Context.d.ts.map +1 -1
  112. package/dist/dts/Cron.d.ts +9 -23
  113. package/dist/dts/Cron.d.ts.map +1 -1
  114. package/dist/dts/Data.d.ts +8 -0
  115. package/dist/dts/Data.d.ts.map +1 -1
  116. package/dist/dts/DateTime.d.ts +6 -0
  117. package/dist/dts/DateTime.d.ts.map +1 -1
  118. package/dist/dts/Duration.d.ts +2 -2
  119. package/dist/dts/Effect.d.ts +153 -71
  120. package/dist/dts/Effect.d.ts.map +1 -1
  121. package/dist/dts/Either.d.ts +44 -57
  122. package/dist/dts/Either.d.ts.map +1 -1
  123. package/dist/dts/Encoding.d.ts +1 -1
  124. package/dist/dts/Equivalence.d.ts +1 -1
  125. package/dist/dts/Function.d.ts +55 -59
  126. package/dist/dts/Function.d.ts.map +1 -1
  127. package/dist/dts/HashMap.d.ts +0 -9
  128. package/dist/dts/HashMap.d.ts.map +1 -1
  129. package/dist/dts/Iterable.d.ts +13 -2
  130. package/dist/dts/Iterable.d.ts.map +1 -1
  131. package/dist/dts/List.d.ts +10 -0
  132. package/dist/dts/List.d.ts.map +1 -1
  133. package/dist/dts/Logger.d.ts +0 -6
  134. package/dist/dts/Logger.d.ts.map +1 -1
  135. package/dist/dts/Mailbox.d.ts +1 -0
  136. package/dist/dts/Mailbox.d.ts.map +1 -1
  137. package/dist/dts/ManagedRuntime.d.ts +0 -2
  138. package/dist/dts/ManagedRuntime.d.ts.map +1 -1
  139. package/dist/dts/Metric.d.ts +14 -20
  140. package/dist/dts/Metric.d.ts.map +1 -1
  141. package/dist/dts/Micro.d.ts +1 -1
  142. package/dist/dts/Number.d.ts +52 -155
  143. package/dist/dts/Number.d.ts.map +1 -1
  144. package/dist/dts/Option.d.ts +12 -0
  145. package/dist/dts/Option.d.ts.map +1 -1
  146. package/dist/dts/Order.d.ts +1 -0
  147. package/dist/dts/Order.d.ts.map +1 -1
  148. package/dist/dts/Ordering.d.ts +4 -17
  149. package/dist/dts/Ordering.d.ts.map +1 -1
  150. package/dist/dts/Pool.d.ts +1 -1
  151. package/dist/dts/Predicate.d.ts +56 -133
  152. package/dist/dts/Predicate.d.ts.map +1 -1
  153. package/dist/dts/Random.d.ts +1 -2
  154. package/dist/dts/Random.d.ts.map +1 -1
  155. package/dist/dts/RcMap.d.ts +15 -6
  156. package/dist/dts/RcMap.d.ts.map +1 -1
  157. package/dist/dts/Record.d.ts +68 -279
  158. package/dist/dts/Record.d.ts.map +1 -1
  159. package/dist/dts/Redacted.d.ts +3 -0
  160. package/dist/dts/Redacted.d.ts.map +1 -1
  161. package/dist/dts/RegExp.d.ts +2 -2
  162. package/dist/dts/RegExp.d.ts.map +1 -1
  163. package/dist/dts/STM.d.ts +5 -7
  164. package/dist/dts/STM.d.ts.map +1 -1
  165. package/dist/dts/Schedule.d.ts +7 -7
  166. package/dist/dts/Schema.d.ts +31 -25
  167. package/dist/dts/Schema.d.ts.map +1 -1
  168. package/dist/dts/SchemaAST.d.ts +0 -2
  169. package/dist/dts/SchemaAST.d.ts.map +1 -1
  170. package/dist/dts/Sink.d.ts +14 -10
  171. package/dist/dts/Sink.d.ts.map +1 -1
  172. package/dist/dts/Stream.d.ts +58 -62
  173. package/dist/dts/Stream.d.ts.map +1 -1
  174. package/dist/dts/String.d.ts +47 -2
  175. package/dist/dts/String.d.ts.map +1 -1
  176. package/dist/dts/Struct.d.ts +12 -0
  177. package/dist/dts/Struct.d.ts.map +1 -1
  178. package/dist/dts/Symbol.d.ts +1 -2
  179. package/dist/dts/Symbol.d.ts.map +1 -1
  180. package/dist/dts/TestClock.d.ts +2 -1
  181. package/dist/dts/TestClock.d.ts.map +1 -1
  182. package/dist/dts/Trie.d.ts +66 -0
  183. package/dist/dts/Trie.d.ts.map +1 -1
  184. package/dist/dts/Tuple.d.ts +21 -62
  185. package/dist/dts/Tuple.d.ts.map +1 -1
  186. package/dist/dts/Utils.d.ts +8 -8
  187. package/dist/esm/Array.js +474 -442
  188. package/dist/esm/Array.js.map +1 -1
  189. package/dist/esm/BigDecimal.js +31 -89
  190. package/dist/esm/BigDecimal.js.map +1 -1
  191. package/dist/esm/BigInt.js +27 -71
  192. package/dist/esm/BigInt.js.map +1 -1
  193. package/dist/esm/Boolean.js +12 -10
  194. package/dist/esm/Boolean.js.map +1 -1
  195. package/dist/esm/Brand.js +2 -0
  196. package/dist/esm/Brand.js.map +1 -1
  197. package/dist/esm/Channel.js +0 -2
  198. package/dist/esm/Channel.js.map +1 -1
  199. package/dist/esm/Chunk.js +4 -0
  200. package/dist/esm/Chunk.js.map +1 -1
  201. package/dist/esm/Config.js +0 -5
  202. package/dist/esm/Config.js.map +1 -1
  203. package/dist/esm/Context.js +14 -24
  204. package/dist/esm/Context.js.map +1 -1
  205. package/dist/esm/Cron.js +11 -25
  206. package/dist/esm/Cron.js.map +1 -1
  207. package/dist/esm/Data.js +7 -0
  208. package/dist/esm/Data.js.map +1 -1
  209. package/dist/esm/DateTime.js +2 -0
  210. package/dist/esm/DateTime.js.map +1 -1
  211. package/dist/esm/Duration.js +2 -2
  212. package/dist/esm/Effect.js +123 -53
  213. package/dist/esm/Effect.js.map +1 -1
  214. package/dist/esm/Either.js +22 -25
  215. package/dist/esm/Either.js.map +1 -1
  216. package/dist/esm/Encoding.js +1 -1
  217. package/dist/esm/Equivalence.js +1 -1
  218. package/dist/esm/Function.js +21 -24
  219. package/dist/esm/Function.js.map +1 -1
  220. package/dist/esm/HashMap.js +0 -3
  221. package/dist/esm/HashMap.js.map +1 -1
  222. package/dist/esm/Iterable.js +9 -2
  223. package/dist/esm/Iterable.js.map +1 -1
  224. package/dist/esm/List.js +2 -0
  225. package/dist/esm/List.js.map +1 -1
  226. package/dist/esm/Logger.js +0 -2
  227. package/dist/esm/Logger.js.map +1 -1
  228. package/dist/esm/Mailbox.js +1 -0
  229. package/dist/esm/Mailbox.js.map +1 -1
  230. package/dist/esm/ManagedRuntime.js +0 -2
  231. package/dist/esm/ManagedRuntime.js.map +1 -1
  232. package/dist/esm/Metric.js +6 -12
  233. package/dist/esm/Metric.js.map +1 -1
  234. package/dist/esm/Micro.js +1 -1
  235. package/dist/esm/Number.js +22 -61
  236. package/dist/esm/Number.js.map +1 -1
  237. package/dist/esm/Option.js +6 -0
  238. package/dist/esm/Option.js.map +1 -1
  239. package/dist/esm/Order.js +1 -0
  240. package/dist/esm/Order.js.map +1 -1
  241. package/dist/esm/Ordering.js +2 -7
  242. package/dist/esm/Ordering.js.map +1 -1
  243. package/dist/esm/Pool.js +1 -1
  244. package/dist/esm/Predicate.js +36 -77
  245. package/dist/esm/Predicate.js.map +1 -1
  246. package/dist/esm/Random.js +1 -2
  247. package/dist/esm/Random.js.map +1 -1
  248. package/dist/esm/RcMap.js +5 -2
  249. package/dist/esm/RcMap.js.map +1 -1
  250. package/dist/esm/Record.js +28 -107
  251. package/dist/esm/Record.js.map +1 -1
  252. package/dist/esm/Redacted.js +3 -0
  253. package/dist/esm/Redacted.js.map +1 -1
  254. package/dist/esm/RegExp.js +2 -2
  255. package/dist/esm/RegExp.js.map +1 -1
  256. package/dist/esm/STM.js +3 -5
  257. package/dist/esm/STM.js.map +1 -1
  258. package/dist/esm/Schedule.js +2 -2
  259. package/dist/esm/Schema.js +14 -13
  260. package/dist/esm/Schema.js.map +1 -1
  261. package/dist/esm/SchemaAST.js +0 -2
  262. package/dist/esm/SchemaAST.js.map +1 -1
  263. package/dist/esm/Sink.js +14 -10
  264. package/dist/esm/Sink.js.map +1 -1
  265. package/dist/esm/Stream.js +25 -25
  266. package/dist/esm/Stream.js.map +1 -1
  267. package/dist/esm/String.js +31 -2
  268. package/dist/esm/String.js.map +1 -1
  269. package/dist/esm/Struct.js +6 -0
  270. package/dist/esm/Struct.js.map +1 -1
  271. package/dist/esm/Symbol.js +1 -2
  272. package/dist/esm/Symbol.js.map +1 -1
  273. package/dist/esm/TestClock.js.map +1 -1
  274. package/dist/esm/Trie.js +28 -0
  275. package/dist/esm/Trie.js.map +1 -1
  276. package/dist/esm/Tuple.js +11 -30
  277. package/dist/esm/Tuple.js.map +1 -1
  278. package/dist/esm/internal/matcher.js +1 -1
  279. package/dist/esm/internal/matcher.js.map +1 -1
  280. package/dist/esm/internal/version.js +1 -1
  281. package/package.json +1 -1
  282. package/src/Array.ts +1235 -1188
  283. package/src/BigDecimal.ts +61 -189
  284. package/src/BigInt.ts +57 -165
  285. package/src/Boolean.ts +28 -18
  286. package/src/Brand.ts +3 -3
  287. package/src/Channel.ts +0 -6
  288. package/src/Chunk.ts +16 -0
  289. package/src/Config.ts +0 -5
  290. package/src/Context.ts +26 -54
  291. package/src/Cron.ts +11 -25
  292. package/src/Data.ts +8 -0
  293. package/src/DateTime.ts +6 -0
  294. package/src/Duration.ts +2 -2
  295. package/src/Effect.ts +153 -71
  296. package/src/Either.ts +45 -58
  297. package/src/Encoding.ts +1 -1
  298. package/src/Equivalence.ts +1 -1
  299. package/src/Function.ts +55 -59
  300. package/src/HashMap.ts +0 -9
  301. package/src/Iterable.ts +13 -2
  302. package/src/List.ts +12 -0
  303. package/src/Logger.ts +0 -6
  304. package/src/Mailbox.ts +1 -0
  305. package/src/ManagedRuntime.ts +0 -2
  306. package/src/Metric.ts +14 -20
  307. package/src/Micro.ts +1 -1
  308. package/src/Number.ts +52 -155
  309. package/src/Option.ts +12 -0
  310. package/src/Order.ts +1 -0
  311. package/src/Ordering.ts +4 -17
  312. package/src/Pool.ts +1 -1
  313. package/src/Predicate.ts +56 -133
  314. package/src/Random.ts +1 -2
  315. package/src/RcMap.ts +15 -6
  316. package/src/Record.ts +68 -279
  317. package/src/Redacted.ts +3 -0
  318. package/src/RegExp.ts +2 -2
  319. package/src/STM.ts +5 -7
  320. package/src/Schedule.ts +7 -7
  321. package/src/Schema.ts +31 -25
  322. package/src/SchemaAST.ts +0 -2
  323. package/src/Sink.ts +14 -10
  324. package/src/Stream.ts +56 -61
  325. package/src/String.ts +47 -2
  326. package/src/Struct.ts +12 -0
  327. package/src/Symbol.ts +1 -2
  328. package/src/TestClock.ts +2 -1
  329. package/src/Trie.ts +66 -0
  330. package/src/Tuple.ts +21 -62
  331. package/src/Utils.ts +8 -8
  332. package/src/internal/matcher.ts +1 -1
  333. package/src/internal/version.ts +1 -1
package/src/Record.ts CHANGED
@@ -66,10 +66,9 @@ export const empty = <K extends string | symbol = never, V = never>(): Record<
66
66
  /**
67
67
  * Determine if a record is empty.
68
68
  *
69
- * @param self - record to test for emptiness.
70
- *
71
69
  * @example
72
70
  * ```ts
71
+ * import * as assert from "node:assert"
73
72
  * import { isEmptyRecord } from "effect/Record"
74
73
  *
75
74
  * assert.deepStrictEqual(isEmptyRecord({}), true);
@@ -85,10 +84,9 @@ export const isEmptyRecord = <K extends string, A>(self: Record<K, A>): self is
85
84
  /**
86
85
  * Determine if a record is empty.
87
86
  *
88
- * @param self - record to test for emptiness.
89
- *
90
87
  * @example
91
88
  * ```ts
89
+ * import * as assert from "node:assert"
92
90
  * import { isEmptyReadonlyRecord } from "effect/Record"
93
91
  *
94
92
  * assert.deepStrictEqual(isEmptyReadonlyRecord({}), true);
@@ -106,11 +104,9 @@ export const isEmptyReadonlyRecord: <K extends string, A>(
106
104
  * Takes an iterable and a projection function and returns a record.
107
105
  * The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record.
108
106
  *
109
- * @param self - An iterable of values to be mapped to a record.
110
- * @param f - A projection function that maps values of the iterable to a tuple of a key and a value.
111
- *
112
107
  * @example
113
108
  * ```ts
109
+ * import * as assert from "node:assert"
114
110
  * import { fromIterableWith } from "effect/Record"
115
111
  *
116
112
  * const input = [1, 2, 3, 4]
@@ -129,11 +125,9 @@ export const fromIterableWith: {
129
125
  * Takes an iterable and a projection function and returns a record.
130
126
  * The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record.
131
127
  *
132
- * @param self - An iterable of values to be mapped to a record.
133
- * @param f - A projection function that maps values of the iterable to a tuple of a key and a value.
134
- *
135
128
  * @example
136
129
  * ```ts
130
+ * import * as assert from "node:assert"
137
131
  * import { fromIterableWith } from "effect/Record"
138
132
  *
139
133
  * const input = [1, 2, 3, 4]
@@ -152,11 +146,9 @@ export const fromIterableWith: {
152
146
  * Takes an iterable and a projection function and returns a record.
153
147
  * The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record.
154
148
  *
155
- * @param self - An iterable of values to be mapped to a record.
156
- * @param f - A projection function that maps values of the iterable to a tuple of a key and a value.
157
- *
158
149
  * @example
159
150
  * ```ts
151
+ * import * as assert from "node:assert"
160
152
  * import { fromIterableWith } from "effect/Record"
161
153
  *
162
154
  * const input = [1, 2, 3, 4]
@@ -189,11 +181,9 @@ export const fromIterableWith: {
189
181
  /**
190
182
  * Creates a new record from an iterable, utilizing the provided function to determine the key for each element.
191
183
  *
192
- * @param items - An iterable containing elements.
193
- * @param f - A function that extracts the key for each element.
194
- *
195
184
  * @example
196
185
  * ```ts
186
+ * import * as assert from "node:assert"
197
187
  * import { fromIterableBy } from "effect/Record"
198
188
  *
199
189
  * const users = [
@@ -224,10 +214,9 @@ export const fromIterableBy = <A, K extends string | symbol>(
224
214
  * If there are conflicting keys when using `fromEntries`, the last occurrence of the key/value pair will overwrite the
225
215
  * previous ones. So the resulting record will only have the value of the last occurrence of each key.
226
216
  *
227
- * @param self - The iterable of key-value pairs.
228
- *
229
217
  * @example
230
218
  * ```ts
219
+ * import * as assert from "node:assert"
231
220
  * import { fromEntries } from "effect/Record"
232
221
  *
233
222
  * const input: Array<[string, number]> = [["a", 1], ["b", 2]]
@@ -245,11 +234,9 @@ export const fromEntries: <Entry extends readonly [string | symbol, any]>(
245
234
  /**
246
235
  * Transforms the values of a record into an `Array` with a custom mapping function.
247
236
  *
248
- * @param self - The record to transform.
249
- * @param f - The custom mapping function to apply to each key/value of the record.
250
- *
251
237
  * @example
252
238
  * ```ts
239
+ * import * as assert from "node:assert"
253
240
  * import { collect } from "effect/Record"
254
241
  *
255
242
  * const x = { a: 1, b: 2, c: 3 }
@@ -263,11 +250,9 @@ export const collect: {
263
250
  /**
264
251
  * Transforms the values of a record into an `Array` with a custom mapping function.
265
252
  *
266
- * @param self - The record to transform.
267
- * @param f - The custom mapping function to apply to each key/value of the record.
268
- *
269
253
  * @example
270
254
  * ```ts
255
+ * import * as assert from "node:assert"
271
256
  * import { collect } from "effect/Record"
272
257
  *
273
258
  * const x = { a: 1, b: 2, c: 3 }
@@ -281,11 +266,9 @@ export const collect: {
281
266
  /**
282
267
  * Transforms the values of a record into an `Array` with a custom mapping function.
283
268
  *
284
- * @param self - The record to transform.
285
- * @param f - The custom mapping function to apply to each key/value of the record.
286
- *
287
269
  * @example
288
270
  * ```ts
271
+ * import * as assert from "node:assert"
289
272
  * import { collect } from "effect/Record"
290
273
  *
291
274
  * const x = { a: 1, b: 2, c: 3 }
@@ -310,10 +293,9 @@ export const collect: {
310
293
  /**
311
294
  * Takes a record and returns an array of tuples containing its keys and values.
312
295
  *
313
- * @param self - The record to transform.
314
- *
315
296
  * @example
316
297
  * ```ts
298
+ * import * as assert from "node:assert"
317
299
  * import { toEntries } from "effect/Record"
318
300
  *
319
301
  * const x = { a: 1, b: 2, c: 3 }
@@ -331,10 +313,9 @@ export const toEntries: <K extends string, A>(self: ReadonlyRecord<K, A>) => Arr
331
313
  /**
332
314
  * Returns the number of key/value pairs in a record.
333
315
  *
334
- * @param self - A record to calculate the number of key/value pairs in.
335
- *
336
316
  * @example
337
317
  * ```ts
318
+ * import * as assert from "node:assert"
338
319
  * import { size } from "effect/Record";
339
320
  *
340
321
  * assert.deepStrictEqual(size({ a: "a", b: 1, c: true }), 3);
@@ -347,11 +328,9 @@ export const size = <K extends string, A>(self: ReadonlyRecord<K, A>): number =>
347
328
  /**
348
329
  * Check if a given `key` exists in a record.
349
330
  *
350
- * @param self - the record to look in.
351
- * @param key - the key to look for in the record.
352
- *
353
331
  * @example
354
332
  * ```ts
333
+ * import * as assert from "node:assert"
355
334
  * import { empty, has } from "effect/Record"
356
335
  *
357
336
  * assert.deepStrictEqual(has({ a: 1, b: 2 }, "a"), true);
@@ -364,11 +343,9 @@ export const has: {
364
343
  /**
365
344
  * Check if a given `key` exists in a record.
366
345
  *
367
- * @param self - the record to look in.
368
- * @param key - the key to look for in the record.
369
- *
370
346
  * @example
371
347
  * ```ts
348
+ * import * as assert from "node:assert"
372
349
  * import { empty, has } from "effect/Record"
373
350
  *
374
351
  * assert.deepStrictEqual(has({ a: 1, b: 2 }, "a"), true);
@@ -381,11 +358,9 @@ export const has: {
381
358
  /**
382
359
  * Check if a given `key` exists in a record.
383
360
  *
384
- * @param self - the record to look in.
385
- * @param key - the key to look for in the record.
386
- *
387
361
  * @example
388
362
  * ```ts
363
+ * import * as assert from "node:assert"
389
364
  * import { empty, has } from "effect/Record"
390
365
  *
391
366
  * assert.deepStrictEqual(has({ a: 1, b: 2 }, "a"), true);
@@ -406,11 +381,9 @@ export const has: {
406
381
  /**
407
382
  * Retrieve a value at a particular key from a record, returning it wrapped in an `Option`.
408
383
  *
409
- * @param self - The record to retrieve value from.
410
- * @param key - Key to retrieve from record.
411
- *
412
384
  * @example
413
385
  * ```ts
386
+ * import * as assert from "node:assert"
414
387
  * import { Record as R, Option } from "effect"
415
388
  *
416
389
  * const person: Record<string, unknown> = { name: "John Doe", age: 35 }
@@ -425,11 +398,9 @@ export const get: {
425
398
  /**
426
399
  * Retrieve a value at a particular key from a record, returning it wrapped in an `Option`.
427
400
  *
428
- * @param self - The record to retrieve value from.
429
- * @param key - Key to retrieve from record.
430
- *
431
401
  * @example
432
402
  * ```ts
403
+ * import * as assert from "node:assert"
433
404
  * import { Record as R, Option } from "effect"
434
405
  *
435
406
  * const person: Record<string, unknown> = { name: "John Doe", age: 35 }
@@ -444,11 +415,9 @@ export const get: {
444
415
  /**
445
416
  * Retrieve a value at a particular key from a record, returning it wrapped in an `Option`.
446
417
  *
447
- * @param self - The record to retrieve value from.
448
- * @param key - Key to retrieve from record.
449
- *
450
418
  * @example
451
419
  * ```ts
420
+ * import * as assert from "node:assert"
452
421
  * import { Record as R, Option } from "effect"
453
422
  *
454
423
  * const person: Record<string, unknown> = { name: "John Doe", age: 35 }
@@ -470,12 +439,9 @@ export const get: {
470
439
  * Apply a function to the element at the specified key, creating a new record.
471
440
  * If the key does not exist, the record is returned unchanged.
472
441
  *
473
- * @param self - The record to be updated.
474
- * @param key - The key of the element to modify.
475
- * @param f - The function to apply to the element.
476
- *
477
442
  * @example
478
443
  * ```ts
444
+ * import * as assert from "node:assert"
479
445
  * import { Record as R } from "effect"
480
446
  *
481
447
  * const f = (x: number) => x * 2
@@ -497,12 +463,9 @@ export const modify: {
497
463
  * Apply a function to the element at the specified key, creating a new record.
498
464
  * If the key does not exist, the record is returned unchanged.
499
465
  *
500
- * @param self - The record to be updated.
501
- * @param key - The key of the element to modify.
502
- * @param f - The function to apply to the element.
503
- *
504
466
  * @example
505
467
  * ```ts
468
+ * import * as assert from "node:assert"
506
469
  * import { Record as R } from "effect"
507
470
  *
508
471
  * const f = (x: number) => x * 2
@@ -524,12 +487,9 @@ export const modify: {
524
487
  * Apply a function to the element at the specified key, creating a new record.
525
488
  * If the key does not exist, the record is returned unchanged.
526
489
  *
527
- * @param self - The record to be updated.
528
- * @param key - The key of the element to modify.
529
- * @param f - The function to apply to the element.
530
- *
531
490
  * @example
532
491
  * ```ts
492
+ * import * as assert from "node:assert"
533
493
  * import { Record as R } from "effect"
534
494
  *
535
495
  * const f = (x: number) => x * 2
@@ -561,12 +521,9 @@ export const modify: {
561
521
  * Apply a function to the element at the specified key, creating a new record,
562
522
  * or return `None` if the key doesn't exist.
563
523
  *
564
- * @param self - The record to be updated.
565
- * @param key - The key of the element to modify.
566
- * @param f - The function to apply to the element.
567
- *
568
524
  * @example
569
525
  * ```ts
526
+ * import * as assert from "node:assert"
570
527
  * import { Record as R, Option } from "effect"
571
528
  *
572
529
  * const f = (x: number) => x * 2
@@ -588,12 +545,9 @@ export const modifyOption: {
588
545
  * Apply a function to the element at the specified key, creating a new record,
589
546
  * or return `None` if the key doesn't exist.
590
547
  *
591
- * @param self - The record to be updated.
592
- * @param key - The key of the element to modify.
593
- * @param f - The function to apply to the element.
594
- *
595
548
  * @example
596
549
  * ```ts
550
+ * import * as assert from "node:assert"
597
551
  * import { Record as R, Option } from "effect"
598
552
  *
599
553
  * const f = (x: number) => x * 2
@@ -615,12 +569,9 @@ export const modifyOption: {
615
569
  * Apply a function to the element at the specified key, creating a new record,
616
570
  * or return `None` if the key doesn't exist.
617
571
  *
618
- * @param self - The record to be updated.
619
- * @param key - The key of the element to modify.
620
- * @param f - The function to apply to the element.
621
- *
622
572
  * @example
623
573
  * ```ts
574
+ * import * as assert from "node:assert"
624
575
  * import { Record as R, Option } from "effect"
625
576
  *
626
577
  * const f = (x: number) => x * 2
@@ -655,12 +606,9 @@ export const modifyOption: {
655
606
  /**
656
607
  * Replaces a value in the record with the new value passed as parameter.
657
608
  *
658
- * @param self - The record to be updated.
659
- * @param key - The key to search for in the record.
660
- * @param b - The new value to replace the existing value with.
661
- *
662
609
  * @example
663
610
  * ```ts
611
+ * import * as assert from "node:assert"
664
612
  * import { Record, Option } from "effect"
665
613
  *
666
614
  * assert.deepStrictEqual(
@@ -676,12 +624,9 @@ export const replaceOption: {
676
624
  /**
677
625
  * Replaces a value in the record with the new value passed as parameter.
678
626
  *
679
- * @param self - The record to be updated.
680
- * @param key - The key to search for in the record.
681
- * @param b - The new value to replace the existing value with.
682
- *
683
627
  * @example
684
628
  * ```ts
629
+ * import * as assert from "node:assert"
685
630
  * import { Record, Option } from "effect"
686
631
  *
687
632
  * assert.deepStrictEqual(
@@ -697,12 +642,9 @@ export const replaceOption: {
697
642
  /**
698
643
  * Replaces a value in the record with the new value passed as parameter.
699
644
  *
700
- * @param self - The record to be updated.
701
- * @param key - The key to search for in the record.
702
- * @param b - The new value to replace the existing value with.
703
- *
704
645
  * @example
705
646
  * ```ts
647
+ * import * as assert from "node:assert"
706
648
  * import { Record, Option } from "effect"
707
649
  *
708
650
  * assert.deepStrictEqual(
@@ -728,11 +670,9 @@ export const replaceOption: {
728
670
  * If the given key exists in the record, returns a new record with the key removed,
729
671
  * otherwise returns a copy of the original record.
730
672
  *
731
- * @param self - the record to remove the key from.
732
- * @param key - the key to remove from the record.
733
- *
734
673
  * @example
735
674
  * ```ts
675
+ * import * as assert from "node:assert"
736
676
  * import { remove } from "effect/Record"
737
677
  *
738
678
  * assert.deepStrictEqual(remove({ a: 1, b: 2 }, "a"), { b: 2 })
@@ -745,11 +685,9 @@ export const remove: {
745
685
  * If the given key exists in the record, returns a new record with the key removed,
746
686
  * otherwise returns a copy of the original record.
747
687
  *
748
- * @param self - the record to remove the key from.
749
- * @param key - the key to remove from the record.
750
- *
751
688
  * @example
752
689
  * ```ts
690
+ * import * as assert from "node:assert"
753
691
  * import { remove } from "effect/Record"
754
692
  *
755
693
  * assert.deepStrictEqual(remove({ a: 1, b: 2 }, "a"), { b: 2 })
@@ -762,11 +700,9 @@ export const remove: {
762
700
  * If the given key exists in the record, returns a new record with the key removed,
763
701
  * otherwise returns a copy of the original record.
764
702
  *
765
- * @param self - the record to remove the key from.
766
- * @param key - the key to remove from the record.
767
- *
768
703
  * @example
769
704
  * ```ts
705
+ * import * as assert from "node:assert"
770
706
  * import { remove } from "effect/Record"
771
707
  *
772
708
  * assert.deepStrictEqual(remove({ a: 1, b: 2 }, "a"), { b: 2 })
@@ -792,11 +728,9 @@ export const remove: {
792
728
  * of a tuple with the value and the record with the removed property.
793
729
  * If the key is not present, returns `O.none`.
794
730
  *
795
- * @param self - The input record.
796
- * @param key - The key of the property to retrieve.
797
- *
798
731
  * @example
799
732
  * ```ts
733
+ * import * as assert from "node:assert"
800
734
  * import { Record as R, Option } from "effect"
801
735
  *
802
736
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 }, "a"), Option.some([1, { b: 2 }]))
@@ -812,11 +746,9 @@ export const pop: {
812
746
  * of a tuple with the value and the record with the removed property.
813
747
  * If the key is not present, returns `O.none`.
814
748
  *
815
- * @param self - The input record.
816
- * @param key - The key of the property to retrieve.
817
- *
818
749
  * @example
819
750
  * ```ts
751
+ * import * as assert from "node:assert"
820
752
  * import { Record as R, Option } from "effect"
821
753
  *
822
754
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 }, "a"), Option.some([1, { b: 2 }]))
@@ -832,11 +764,9 @@ export const pop: {
832
764
  * of a tuple with the value and the record with the removed property.
833
765
  * If the key is not present, returns `O.none`.
834
766
  *
835
- * @param self - The input record.
836
- * @param key - The key of the property to retrieve.
837
- *
838
767
  * @example
839
768
  * ```ts
769
+ * import * as assert from "node:assert"
840
770
  * import { Record as R, Option } from "effect"
841
771
  *
842
772
  * assert.deepStrictEqual(R.pop({ a: 1, b: 2 }, "a"), Option.some([1, { b: 2 }]))
@@ -856,11 +786,9 @@ export const pop: {
856
786
  /**
857
787
  * Maps a record into another record by applying a transformation function to each of its values.
858
788
  *
859
- * @param self - The record to be mapped.
860
- * @param f - A transformation function that will be applied to each of the values in the record.
861
- *
862
789
  * @example
863
790
  * ```ts
791
+ * import * as assert from "node:assert"
864
792
  * import { map } from "effect/Record"
865
793
  *
866
794
  * const f = (n: number) => `-${n}`
@@ -879,11 +807,9 @@ export const map: {
879
807
  /**
880
808
  * Maps a record into another record by applying a transformation function to each of its values.
881
809
  *
882
- * @param self - The record to be mapped.
883
- * @param f - A transformation function that will be applied to each of the values in the record.
884
- *
885
810
  * @example
886
811
  * ```ts
812
+ * import * as assert from "node:assert"
887
813
  * import { map } from "effect/Record"
888
814
  *
889
815
  * const f = (n: number) => `-${n}`
@@ -902,11 +828,9 @@ export const map: {
902
828
  /**
903
829
  * Maps a record into another record by applying a transformation function to each of its values.
904
830
  *
905
- * @param self - The record to be mapped.
906
- * @param f - A transformation function that will be applied to each of the values in the record.
907
- *
908
831
  * @example
909
832
  * ```ts
833
+ * import * as assert from "node:assert"
910
834
  * import { map } from "effect/Record"
911
835
  *
912
836
  * const f = (n: number) => `-${n}`
@@ -938,6 +862,7 @@ export const map: {
938
862
  *
939
863
  * @example
940
864
  * ```ts
865
+ * import * as assert from "node:assert"
941
866
  * import { mapKeys } from "effect/Record"
942
867
  *
943
868
  * assert.deepStrictEqual(mapKeys({ a: 3, b: 5 }, (key) => key.toUpperCase()), { A: 3, B: 5 })
@@ -952,6 +877,7 @@ export const mapKeys: {
952
877
  *
953
878
  * @example
954
879
  * ```ts
880
+ * import * as assert from "node:assert"
955
881
  * import { mapKeys } from "effect/Record"
956
882
  *
957
883
  * assert.deepStrictEqual(mapKeys({ a: 3, b: 5 }, (key) => key.toUpperCase()), { A: 3, B: 5 })
@@ -966,6 +892,7 @@ export const mapKeys: {
966
892
  *
967
893
  * @example
968
894
  * ```ts
895
+ * import * as assert from "node:assert"
969
896
  * import { mapKeys } from "effect/Record"
970
897
  *
971
898
  * assert.deepStrictEqual(mapKeys({ a: 3, b: 5 }, (key) => key.toUpperCase()), { A: 3, B: 5 })
@@ -995,6 +922,7 @@ export const mapKeys: {
995
922
  *
996
923
  * @example
997
924
  * ```ts
925
+ * import * as assert from "node:assert"
998
926
  * import { mapEntries } from "effect/Record"
999
927
  *
1000
928
  * assert.deepStrictEqual(mapEntries({ a: 3, b: 5 }, (a, key) => [key.toUpperCase(), a + 1]), { A: 4, B: 6 })
@@ -1009,6 +937,7 @@ export const mapEntries: {
1009
937
  *
1010
938
  * @example
1011
939
  * ```ts
940
+ * import * as assert from "node:assert"
1012
941
  * import { mapEntries } from "effect/Record"
1013
942
  *
1014
943
  * assert.deepStrictEqual(mapEntries({ a: 3, b: 5 }, (a, key) => [key.toUpperCase(), a + 1]), { A: 4, B: 6 })
@@ -1023,6 +952,7 @@ export const mapEntries: {
1023
952
  *
1024
953
  * @example
1025
954
  * ```ts
955
+ * import * as assert from "node:assert"
1026
956
  * import { mapEntries } from "effect/Record"
1027
957
  *
1028
958
  * assert.deepStrictEqual(mapEntries({ a: 3, b: 5 }, (a, key) => [key.toUpperCase(), a + 1]), { A: 4, B: 6 })
@@ -1051,11 +981,9 @@ export const mapEntries: {
1051
981
  * Transforms a record into a record by applying the function `f` to each key and value in the original record.
1052
982
  * If the function returns `Some`, the key-value pair is included in the output record.
1053
983
  *
1054
- * @param self - The input record.
1055
- * @param f - The transformation function.
1056
- *
1057
984
  * @example
1058
985
  * ```ts
986
+ * import * as assert from "node:assert"
1059
987
  * import { Record, Option } from "effect"
1060
988
  *
1061
989
  * const x = { a: 1, b: 2, c: 3 }
@@ -1070,11 +998,9 @@ export const filterMap: {
1070
998
  * Transforms a record into a record by applying the function `f` to each key and value in the original record.
1071
999
  * If the function returns `Some`, the key-value pair is included in the output record.
1072
1000
  *
1073
- * @param self - The input record.
1074
- * @param f - The transformation function.
1075
- *
1076
1001
  * @example
1077
1002
  * ```ts
1003
+ * import * as assert from "node:assert"
1078
1004
  * import { Record, Option } from "effect"
1079
1005
  *
1080
1006
  * const x = { a: 1, b: 2, c: 3 }
@@ -1089,11 +1015,9 @@ export const filterMap: {
1089
1015
  * Transforms a record into a record by applying the function `f` to each key and value in the original record.
1090
1016
  * If the function returns `Some`, the key-value pair is included in the output record.
1091
1017
  *
1092
- * @param self - The input record.
1093
- * @param f - The transformation function.
1094
- *
1095
1018
  * @example
1096
1019
  * ```ts
1020
+ * import * as assert from "node:assert"
1097
1021
  * import { Record, Option } from "effect"
1098
1022
  *
1099
1023
  * const x = { a: 1, b: 2, c: 3 }
@@ -1124,11 +1048,9 @@ export const filterMap: {
1124
1048
  /**
1125
1049
  * Selects properties from a record whose values match the given predicate.
1126
1050
  *
1127
- * @param self - The record to filter.
1128
- * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
1129
- *
1130
1051
  * @example
1131
1052
  * ```ts
1053
+ * import * as assert from "node:assert"
1132
1054
  * import { filter } from "effect/Record"
1133
1055
  *
1134
1056
  * const x = { a: 1, b: 2, c: 3, d: 4 }
@@ -1142,11 +1064,9 @@ export const filter: {
1142
1064
  /**
1143
1065
  * Selects properties from a record whose values match the given predicate.
1144
1066
  *
1145
- * @param self - The record to filter.
1146
- * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
1147
- *
1148
1067
  * @example
1149
1068
  * ```ts
1069
+ * import * as assert from "node:assert"
1150
1070
  * import { filter } from "effect/Record"
1151
1071
  *
1152
1072
  * const x = { a: 1, b: 2, c: 3, d: 4 }
@@ -1160,11 +1080,9 @@ export const filter: {
1160
1080
  /**
1161
1081
  * Selects properties from a record whose values match the given predicate.
1162
1082
  *
1163
- * @param self - The record to filter.
1164
- * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
1165
- *
1166
1083
  * @example
1167
1084
  * ```ts
1085
+ * import * as assert from "node:assert"
1168
1086
  * import { filter } from "effect/Record"
1169
1087
  *
1170
1088
  * const x = { a: 1, b: 2, c: 3, d: 4 }
@@ -1178,11 +1096,9 @@ export const filter: {
1178
1096
  /**
1179
1097
  * Selects properties from a record whose values match the given predicate.
1180
1098
  *
1181
- * @param self - The record to filter.
1182
- * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
1183
- *
1184
1099
  * @example
1185
1100
  * ```ts
1101
+ * import * as assert from "node:assert"
1186
1102
  * import { filter } from "effect/Record"
1187
1103
  *
1188
1104
  * const x = { a: 1, b: 2, c: 3, d: 4 }
@@ -1196,11 +1112,9 @@ export const filter: {
1196
1112
  /**
1197
1113
  * Selects properties from a record whose values match the given predicate.
1198
1114
  *
1199
- * @param self - The record to filter.
1200
- * @param predicate - A function that returns a `boolean` value to determine if the entry should be included in the new record.
1201
- *
1202
1115
  * @example
1203
1116
  * ```ts
1117
+ * import * as assert from "node:assert"
1204
1118
  * import { filter } from "effect/Record"
1205
1119
  *
1206
1120
  * const x = { a: 1, b: 2, c: 3, d: 4 }
@@ -1230,10 +1144,9 @@ export const filter: {
1230
1144
  /**
1231
1145
  * Given a record with `Option` values, returns a new record containing only the `Some` values, preserving the original keys.
1232
1146
  *
1233
- * @param self - A record with `Option` values.
1234
- *
1235
1147
  * @example
1236
1148
  * ```ts
1149
+ * import * as assert from "node:assert"
1237
1150
  * import { Record, Option } from "effect"
1238
1151
  *
1239
1152
  * assert.deepStrictEqual(
@@ -1256,6 +1169,7 @@ export const getSomes: <K extends string, A>(
1256
1169
  *
1257
1170
  * @example
1258
1171
  * ```ts
1172
+ * import * as assert from "node:assert"
1259
1173
  * import { Record, Either } from "effect"
1260
1174
  *
1261
1175
  * assert.deepStrictEqual(
@@ -1286,6 +1200,7 @@ export const getLefts = <K extends string, R, L>(
1286
1200
  *
1287
1201
  * @example
1288
1202
  * ```ts
1203
+ * import * as assert from "node:assert"
1289
1204
  * import { Record, Either } from "effect"
1290
1205
  *
1291
1206
  * assert.deepStrictEqual(
@@ -1314,11 +1229,9 @@ export const getRights = <K extends string, R, L>(
1314
1229
  /**
1315
1230
  * Partitions the elements of a record into two groups: those that match a predicate, and those that don't.
1316
1231
  *
1317
- * @param self - The record to partition.
1318
- * @param f - The predicate function to apply to each element.
1319
- *
1320
1232
  * @example
1321
1233
  * ```ts
1234
+ * import * as assert from "node:assert"
1322
1235
  * import { Record, Either } from "effect"
1323
1236
  *
1324
1237
  * const x = { a: 1, b: 2, c: 3 }
@@ -1333,11 +1246,9 @@ export const partitionMap: {
1333
1246
  /**
1334
1247
  * Partitions the elements of a record into two groups: those that match a predicate, and those that don't.
1335
1248
  *
1336
- * @param self - The record to partition.
1337
- * @param f - The predicate function to apply to each element.
1338
- *
1339
1249
  * @example
1340
1250
  * ```ts
1251
+ * import * as assert from "node:assert"
1341
1252
  * import { Record, Either } from "effect"
1342
1253
  *
1343
1254
  * const x = { a: 1, b: 2, c: 3 }
@@ -1354,11 +1265,9 @@ export const partitionMap: {
1354
1265
  /**
1355
1266
  * Partitions the elements of a record into two groups: those that match a predicate, and those that don't.
1356
1267
  *
1357
- * @param self - The record to partition.
1358
- * @param f - The predicate function to apply to each element.
1359
- *
1360
1268
  * @example
1361
1269
  * ```ts
1270
+ * import * as assert from "node:assert"
1362
1271
  * import { Record, Either } from "effect"
1363
1272
  *
1364
1273
  * const x = { a: 1, b: 2, c: 3 }
@@ -1394,10 +1303,9 @@ export const partitionMap: {
1394
1303
  * Partitions a record of `Either` values into two separate records,
1395
1304
  * one with the `Left` values and one with the `Right` values.
1396
1305
  *
1397
- * @param self - the record to partition.
1398
- *
1399
1306
  * @example
1400
1307
  * ```ts
1308
+ * import * as assert from "node:assert"
1401
1309
  * import { Record, Either } from "effect"
1402
1310
  *
1403
1311
  * assert.deepStrictEqual(
@@ -1416,11 +1324,9 @@ export const separate: <K extends string, A, B>(
1416
1324
  /**
1417
1325
  * Partitions a record into two separate records based on the result of a predicate function.
1418
1326
  *
1419
- * @param self - The input record to partition.
1420
- * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1421
- *
1422
1327
  * @example
1423
1328
  * ```ts
1329
+ * import * as assert from "node:assert"
1424
1330
  * import { partition } from "effect/Record"
1425
1331
  *
1426
1332
  * assert.deepStrictEqual(
@@ -1436,11 +1342,9 @@ export const partition: {
1436
1342
  /**
1437
1343
  * Partitions a record into two separate records based on the result of a predicate function.
1438
1344
  *
1439
- * @param self - The input record to partition.
1440
- * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1441
- *
1442
1345
  * @example
1443
1346
  * ```ts
1347
+ * import * as assert from "node:assert"
1444
1348
  * import { partition } from "effect/Record"
1445
1349
  *
1446
1350
  * assert.deepStrictEqual(
@@ -1461,11 +1365,9 @@ export const partition: {
1461
1365
  /**
1462
1366
  * Partitions a record into two separate records based on the result of a predicate function.
1463
1367
  *
1464
- * @param self - The input record to partition.
1465
- * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1466
- *
1467
1368
  * @example
1468
1369
  * ```ts
1370
+ * import * as assert from "node:assert"
1469
1371
  * import { partition } from "effect/Record"
1470
1372
  *
1471
1373
  * assert.deepStrictEqual(
@@ -1483,11 +1385,9 @@ export const partition: {
1483
1385
  /**
1484
1386
  * Partitions a record into two separate records based on the result of a predicate function.
1485
1387
  *
1486
- * @param self - The input record to partition.
1487
- * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1488
- *
1489
1388
  * @example
1490
1389
  * ```ts
1390
+ * import * as assert from "node:assert"
1491
1391
  * import { partition } from "effect/Record"
1492
1392
  *
1493
1393
  * assert.deepStrictEqual(
@@ -1506,11 +1406,9 @@ export const partition: {
1506
1406
  /**
1507
1407
  * Partitions a record into two separate records based on the result of a predicate function.
1508
1408
  *
1509
- * @param self - The input record to partition.
1510
- * @param predicate - The partitioning function to determine the partitioning of each value of the record.
1511
- *
1512
1409
  * @example
1513
1410
  * ```ts
1411
+ * import * as assert from "node:assert"
1514
1412
  * import { partition } from "effect/Record"
1515
1413
  *
1516
1414
  * assert.deepStrictEqual(
@@ -1545,8 +1443,6 @@ export const partition: {
1545
1443
  /**
1546
1444
  * Retrieve the keys of a given record as an array.
1547
1445
  *
1548
- * @param self - The object for which you want to get the keys.
1549
- *
1550
1446
  * @since 2.0.0
1551
1447
  */
1552
1448
  export const keys = <K extends string | symbol, A>(self: ReadonlyRecord<K, A>): Array<K & string> =>
@@ -1555,8 +1451,6 @@ export const keys = <K extends string | symbol, A>(self: ReadonlyRecord<K, A>):
1555
1451
  /**
1556
1452
  * Retrieve the values of a given record as an array.
1557
1453
  *
1558
- * @param self - The object for which you want to get the values.
1559
- *
1560
1454
  * @since 2.0.0
1561
1455
  */
1562
1456
  export const values = <K extends string, A>(self: ReadonlyRecord<K, A>): Array<A> => collect(self, (_, a) => a)
@@ -1564,12 +1458,9 @@ export const values = <K extends string, A>(self: ReadonlyRecord<K, A>): Array<A
1564
1458
  /**
1565
1459
  * Add a new key-value pair or update an existing key's value in a record.
1566
1460
  *
1567
- * @param self - The record to which you want to add or update a key-value pair.
1568
- * @param key - The key you want to add or update.
1569
- * @param values - The value you want to associate with the key.
1570
- *
1571
1461
  * @example
1572
1462
  * ```ts
1463
+ * import * as assert from "node:assert"
1573
1464
  * import { set } from "effect/Record"
1574
1465
  *
1575
1466
  * assert.deepStrictEqual(set("a", 5)({ a: 1, b: 2 }), { a: 5, b: 2 });
@@ -1582,12 +1473,9 @@ export const set: {
1582
1473
  /**
1583
1474
  * Add a new key-value pair or update an existing key's value in a record.
1584
1475
  *
1585
- * @param self - The record to which you want to add or update a key-value pair.
1586
- * @param key - The key you want to add or update.
1587
- * @param values - The value you want to associate with the key.
1588
- *
1589
1476
  * @example
1590
1477
  * ```ts
1478
+ * import * as assert from "node:assert"
1591
1479
  * import { set } from "effect/Record"
1592
1480
  *
1593
1481
  * assert.deepStrictEqual(set("a", 5)({ a: 1, b: 2 }), { a: 5, b: 2 });
@@ -1600,12 +1488,9 @@ export const set: {
1600
1488
  /**
1601
1489
  * Add a new key-value pair or update an existing key's value in a record.
1602
1490
  *
1603
- * @param self - The record to which you want to add or update a key-value pair.
1604
- * @param key - The key you want to add or update.
1605
- * @param values - The value you want to associate with the key.
1606
- *
1607
1491
  * @example
1608
1492
  * ```ts
1493
+ * import * as assert from "node:assert"
1609
1494
  * import { set } from "effect/Record"
1610
1495
  *
1611
1496
  * assert.deepStrictEqual(set("a", 5)({ a: 1, b: 2 }), { a: 5, b: 2 });
@@ -1630,12 +1515,9 @@ export const set: {
1630
1515
  * Replace a key's value in a record and return the updated record.
1631
1516
  * If the key does not exist in the record, a copy of the original record is returned.
1632
1517
  *
1633
- * @param self - The original record.
1634
- * @param key - The key to replace.
1635
- * @param value - The new value to associate with the key.
1636
- *
1637
1518
  * @example
1638
1519
  * ```ts
1520
+ * import * as assert from "node:assert"
1639
1521
  * import { Record } from "effect"
1640
1522
  *
1641
1523
  * assert.deepStrictEqual(Record.replace("a", 3)({ a: 1, b: 2 }), { a: 3, b: 2 });
@@ -1649,12 +1531,9 @@ export const replace: {
1649
1531
  * Replace a key's value in a record and return the updated record.
1650
1532
  * If the key does not exist in the record, a copy of the original record is returned.
1651
1533
  *
1652
- * @param self - The original record.
1653
- * @param key - The key to replace.
1654
- * @param value - The new value to associate with the key.
1655
- *
1656
1534
  * @example
1657
1535
  * ```ts
1536
+ * import * as assert from "node:assert"
1658
1537
  * import { Record } from "effect"
1659
1538
  *
1660
1539
  * assert.deepStrictEqual(Record.replace("a", 3)({ a: 1, b: 2 }), { a: 3, b: 2 });
@@ -1668,12 +1547,9 @@ export const replace: {
1668
1547
  * Replace a key's value in a record and return the updated record.
1669
1548
  * If the key does not exist in the record, a copy of the original record is returned.
1670
1549
  *
1671
- * @param self - The original record.
1672
- * @param key - The key to replace.
1673
- * @param value - The new value to associate with the key.
1674
- *
1675
1550
  * @example
1676
1551
  * ```ts
1552
+ * import * as assert from "node:assert"
1677
1553
  * import { Record } from "effect"
1678
1554
  *
1679
1555
  * assert.deepStrictEqual(Record.replace("a", 3)({ a: 1, b: 2 }), { a: 3, b: 2 });
@@ -1696,10 +1572,6 @@ export const replace: {
1696
1572
  /**
1697
1573
  * Check if all the keys and values in one record are also found in another record.
1698
1574
  *
1699
- * @param self - The first record to check.
1700
- * @param that - The second record to compare against.
1701
- * @param equivalence - A function to compare values.
1702
- *
1703
1575
  * @since 2.0.0
1704
1576
  */
1705
1577
  export const isSubrecordBy = <A>(equivalence: Equivalence<A>): {
@@ -1719,9 +1591,6 @@ export const isSubrecordBy = <A>(equivalence: Equivalence<A>): {
1719
1591
  * Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record.
1720
1592
  * This comparison uses default equality checks (`Equal.equivalence()`).
1721
1593
  *
1722
- * @param self - The first record to check.
1723
- * @param that - The second record to compare against.
1724
- *
1725
1594
  * @since 2.0.0
1726
1595
  */
1727
1596
  export const isSubrecord: {
@@ -1729,9 +1598,6 @@ export const isSubrecord: {
1729
1598
  * Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record.
1730
1599
  * This comparison uses default equality checks (`Equal.equivalence()`).
1731
1600
  *
1732
- * @param self - The first record to check.
1733
- * @param that - The second record to compare against.
1734
- *
1735
1601
  * @since 2.0.0
1736
1602
  */
1737
1603
  <K extends string, A>(that: ReadonlyRecord<K, A>): (self: ReadonlyRecord<K, A>) => boolean
@@ -1739,9 +1605,6 @@ export const isSubrecord: {
1739
1605
  * Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record.
1740
1606
  * This comparison uses default equality checks (`Equal.equivalence()`).
1741
1607
  *
1742
- * @param self - The first record to check.
1743
- * @param that - The second record to compare against.
1744
- *
1745
1608
  * @since 2.0.0
1746
1609
  */
1747
1610
  <K extends string, A>(self: ReadonlyRecord<K, A>, that: ReadonlyRecord<K, A>): boolean
@@ -1750,10 +1613,6 @@ export const isSubrecord: {
1750
1613
  /**
1751
1614
  * Reduce a record to a single value by combining its entries with a specified function.
1752
1615
  *
1753
- * @param self - The record to reduce.
1754
- * @param zero - The initial value of the accumulator.
1755
- * @param f - The function to combine entries (accumulator, value, key).
1756
- *
1757
1616
  * @category folding
1758
1617
  * @since 2.0.0
1759
1618
  */
@@ -1761,10 +1620,6 @@ export const reduce: {
1761
1620
  /**
1762
1621
  * Reduce a record to a single value by combining its entries with a specified function.
1763
1622
  *
1764
- * @param self - The record to reduce.
1765
- * @param zero - The initial value of the accumulator.
1766
- * @param f - The function to combine entries (accumulator, value, key).
1767
- *
1768
1623
  * @category folding
1769
1624
  * @since 2.0.0
1770
1625
  */
@@ -1772,10 +1627,6 @@ export const reduce: {
1772
1627
  /**
1773
1628
  * Reduce a record to a single value by combining its entries with a specified function.
1774
1629
  *
1775
- * @param self - The record to reduce.
1776
- * @param zero - The initial value of the accumulator.
1777
- * @param f - The function to combine entries (accumulator, value, key).
1778
- *
1779
1630
  * @category folding
1780
1631
  * @since 2.0.0
1781
1632
  */
@@ -1802,45 +1653,30 @@ export const reduce: {
1802
1653
  /**
1803
1654
  * Check if all entries in a record meet a specific condition.
1804
1655
  *
1805
- * @param self - The record to check.
1806
- * @param predicate - The condition to test entries (value, key).
1807
- *
1808
1656
  * @since 2.0.0
1809
1657
  */
1810
1658
  export const every: {
1811
1659
  /**
1812
1660
  * Check if all entries in a record meet a specific condition.
1813
1661
  *
1814
- * @param self - The record to check.
1815
- * @param predicate - The condition to test entries (value, key).
1816
- *
1817
1662
  * @since 2.0.0
1818
1663
  */
1819
1664
  <A, K extends string, B extends A>(refinement: (value: A, key: K) => value is B): (self: ReadonlyRecord<K, A>) => self is ReadonlyRecord<K, B>
1820
1665
  /**
1821
1666
  * Check if all entries in a record meet a specific condition.
1822
1667
  *
1823
- * @param self - The record to check.
1824
- * @param predicate - The condition to test entries (value, key).
1825
- *
1826
1668
  * @since 2.0.0
1827
1669
  */
1828
1670
  <A, K extends string>(predicate: (value: A, key: K) => boolean): (self: ReadonlyRecord<K, A>) => boolean
1829
1671
  /**
1830
1672
  * Check if all entries in a record meet a specific condition.
1831
1673
  *
1832
- * @param self - The record to check.
1833
- * @param predicate - The condition to test entries (value, key).
1834
- *
1835
1674
  * @since 2.0.0
1836
1675
  */
1837
1676
  <A, K extends string, B extends A>(self: ReadonlyRecord<K, A>, refinement: (value: A, key: K) => value is B): self is ReadonlyRecord<K, B>
1838
1677
  /**
1839
1678
  * Check if all entries in a record meet a specific condition.
1840
1679
  *
1841
- * @param self - The record to check.
1842
- * @param predicate - The condition to test entries (value, key).
1843
- *
1844
1680
  * @since 2.0.0
1845
1681
  */
1846
1682
  <K extends string, A>(self: ReadonlyRecord<K, A>, predicate: (value: A, key: K) => boolean): boolean
@@ -1862,27 +1698,18 @@ export const every: {
1862
1698
  /**
1863
1699
  * Check if any entry in a record meets a specific condition.
1864
1700
  *
1865
- * @param self - The record to check.
1866
- * @param predicate - The condition to test entries (value, key).
1867
- *
1868
1701
  * @since 2.0.0
1869
1702
  */
1870
1703
  export const some: {
1871
1704
  /**
1872
1705
  * Check if any entry in a record meets a specific condition.
1873
1706
  *
1874
- * @param self - The record to check.
1875
- * @param predicate - The condition to test entries (value, key).
1876
- *
1877
1707
  * @since 2.0.0
1878
1708
  */
1879
1709
  <A, K extends string>(predicate: (value: A, key: K) => boolean): (self: ReadonlyRecord<K, A>) => boolean
1880
1710
  /**
1881
1711
  * Check if any entry in a record meets a specific condition.
1882
1712
  *
1883
- * @param self - The record to check.
1884
- * @param predicate - The condition to test entries (value, key).
1885
- *
1886
1713
  * @since 2.0.0
1887
1714
  */
1888
1715
  <K extends string, A>(self: ReadonlyRecord<K, A>, predicate: (value: A, key: K) => boolean): boolean
@@ -1901,30 +1728,18 @@ export const some: {
1901
1728
  /**
1902
1729
  * Merge two records, preserving entries that exist in either of the records.
1903
1730
  *
1904
- * @param self - The first record.
1905
- * @param that - The second record to combine with the first.
1906
- * @param combine - A function to specify how to merge entries with the same key.
1907
- *
1908
1731
  * @since 2.0.0
1909
1732
  */
1910
1733
  export const union: {
1911
1734
  /**
1912
1735
  * Merge two records, preserving entries that exist in either of the records.
1913
1736
  *
1914
- * @param self - The first record.
1915
- * @param that - The second record to combine with the first.
1916
- * @param combine - A function to specify how to merge entries with the same key.
1917
- *
1918
1737
  * @since 2.0.0
1919
1738
  */
1920
1739
  <K1 extends string, A, B, C>(that: ReadonlyRecord<K1, B>, combine: (selfValue: A, thatValue: B) => C): <K0 extends string>(self: ReadonlyRecord<K0, A>) => Record<K0 | K1, A | B | C>
1921
1740
  /**
1922
1741
  * Merge two records, preserving entries that exist in either of the records.
1923
1742
  *
1924
- * @param self - The first record.
1925
- * @param that - The second record to combine with the first.
1926
- * @param combine - A function to specify how to merge entries with the same key.
1927
- *
1928
1743
  * @since 2.0.0
1929
1744
  */
1930
1745
  <K0 extends string, A, K1 extends string, B, C>(
@@ -1965,30 +1780,18 @@ export const union: {
1965
1780
  /**
1966
1781
  * Merge two records, retaining only the entries that exist in both records.
1967
1782
  *
1968
- * @param self - The first record.
1969
- * @param that - The second record to merge with the first.
1970
- * @param combine - A function to specify how to merge entries with the same key.
1971
- *
1972
1783
  * @since 2.0.0
1973
1784
  */
1974
1785
  export const intersection: {
1975
1786
  /**
1976
1787
  * Merge two records, retaining only the entries that exist in both records.
1977
1788
  *
1978
- * @param self - The first record.
1979
- * @param that - The second record to merge with the first.
1980
- * @param combine - A function to specify how to merge entries with the same key.
1981
- *
1982
1789
  * @since 2.0.0
1983
1790
  */
1984
1791
  <K1 extends string, A, B, C>(that: ReadonlyRecord<K1, B>, combine: (selfValue: A, thatValue: B) => C): <K0 extends string>(self: ReadonlyRecord<K0, A>) => Record<ReadonlyRecord.IntersectKeys<K0, K1>, C>
1985
1792
  /**
1986
1793
  * Merge two records, retaining only the entries that exist in both records.
1987
1794
  *
1988
- * @param self - The first record.
1989
- * @param that - The second record to merge with the first.
1990
- * @param combine - A function to specify how to merge entries with the same key.
1991
- *
1992
1795
  * @since 2.0.0
1993
1796
  */
1994
1797
  <K0 extends string, A, K1 extends string, B, C>(
@@ -2019,27 +1822,18 @@ export const intersection: {
2019
1822
  /**
2020
1823
  * Merge two records, preserving only the entries that are unique to each record.
2021
1824
  *
2022
- * @param self - The first record.
2023
- * @param that - The second record to compare with the first.
2024
- *
2025
1825
  * @since 2.0.0
2026
1826
  */
2027
1827
  export const difference: {
2028
1828
  /**
2029
1829
  * Merge two records, preserving only the entries that are unique to each record.
2030
1830
  *
2031
- * @param self - The first record.
2032
- * @param that - The second record to compare with the first.
2033
- *
2034
1831
  * @since 2.0.0
2035
1832
  */
2036
1833
  <K1 extends string, B>(that: ReadonlyRecord<K1, B>): <K0 extends string, A>(self: ReadonlyRecord<K0, A>) => Record<K0 | K1, A | B>
2037
1834
  /**
2038
1835
  * Merge two records, preserving only the entries that are unique to each record.
2039
1836
  *
2040
- * @param self - The first record.
2041
- * @param that - The second record to compare with the first.
2042
- *
2043
1837
  * @since 2.0.0
2044
1838
  */
2045
1839
  <K0 extends string, A, K1 extends string, B>(self: ReadonlyRecord<K0, A>, that: ReadonlyRecord<K1, B>): Record<K0 | K1, A | B>
@@ -2070,8 +1864,6 @@ export const difference: {
2070
1864
  /**
2071
1865
  * Create an `Equivalence` for records using the provided `Equivalence` for values.
2072
1866
  *
2073
- * @param equivalence - An `Equivalence` for the values contained in the records.
2074
- *
2075
1867
  * @category instances
2076
1868
  * @since 2.0.0
2077
1869
  */
@@ -2085,9 +1877,6 @@ export const getEquivalence = <K extends string, A>(
2085
1877
  /**
2086
1878
  * Create a non-empty record from a single element.
2087
1879
  *
2088
- * @param key - The key for the element.
2089
- * @param value - The value associated with the key.
2090
- *
2091
1880
  * @category constructors
2092
1881
  * @since 2.0.0
2093
1882
  */