effect 3.13.7 → 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 (338) 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/ParseResult.js +14 -8
  57. package/dist/cjs/ParseResult.js.map +1 -1
  58. package/dist/cjs/Pool.js +1 -1
  59. package/dist/cjs/Predicate.js +36 -77
  60. package/dist/cjs/Predicate.js.map +1 -1
  61. package/dist/cjs/Random.js +1 -2
  62. package/dist/cjs/Random.js.map +1 -1
  63. package/dist/cjs/RcMap.js +5 -2
  64. package/dist/cjs/RcMap.js.map +1 -1
  65. package/dist/cjs/Record.js +28 -107
  66. package/dist/cjs/Record.js.map +1 -1
  67. package/dist/cjs/Redacted.js +3 -0
  68. package/dist/cjs/Redacted.js.map +1 -1
  69. package/dist/cjs/RegExp.js +2 -2
  70. package/dist/cjs/RegExp.js.map +1 -1
  71. package/dist/cjs/STM.js +3 -5
  72. package/dist/cjs/STM.js.map +1 -1
  73. package/dist/cjs/Schedule.js +2 -2
  74. package/dist/cjs/Schema.js +19 -16
  75. package/dist/cjs/Schema.js.map +1 -1
  76. package/dist/cjs/SchemaAST.js +0 -2
  77. package/dist/cjs/SchemaAST.js.map +1 -1
  78. package/dist/cjs/Sink.js +14 -10
  79. package/dist/cjs/Sink.js.map +1 -1
  80. package/dist/cjs/Stream.js +24 -25
  81. package/dist/cjs/Stream.js.map +1 -1
  82. package/dist/cjs/String.js +31 -2
  83. package/dist/cjs/String.js.map +1 -1
  84. package/dist/cjs/Struct.js +6 -0
  85. package/dist/cjs/Struct.js.map +1 -1
  86. package/dist/cjs/Symbol.js +1 -2
  87. package/dist/cjs/Symbol.js.map +1 -1
  88. package/dist/cjs/TestClock.js.map +1 -1
  89. package/dist/cjs/Trie.js +28 -0
  90. package/dist/cjs/Trie.js.map +1 -1
  91. package/dist/cjs/Tuple.js +9 -24
  92. package/dist/cjs/Tuple.js.map +1 -1
  93. package/dist/cjs/internal/matcher.js +1 -1
  94. package/dist/cjs/internal/matcher.js.map +1 -1
  95. package/dist/cjs/internal/version.js +1 -1
  96. package/dist/dts/Array.d.ts +1235 -1188
  97. package/dist/dts/Array.d.ts.map +1 -1
  98. package/dist/dts/BigDecimal.d.ts +61 -189
  99. package/dist/dts/BigDecimal.d.ts.map +1 -1
  100. package/dist/dts/BigInt.d.ts +57 -165
  101. package/dist/dts/BigInt.d.ts.map +1 -1
  102. package/dist/dts/Boolean.d.ts +28 -18
  103. package/dist/dts/Boolean.d.ts.map +1 -1
  104. package/dist/dts/Brand.d.ts +3 -3
  105. package/dist/dts/Brand.d.ts.map +1 -1
  106. package/dist/dts/Channel.d.ts +0 -6
  107. package/dist/dts/Channel.d.ts.map +1 -1
  108. package/dist/dts/Chunk.d.ts +15 -0
  109. package/dist/dts/Chunk.d.ts.map +1 -1
  110. package/dist/dts/Config.d.ts +0 -5
  111. package/dist/dts/Config.d.ts.map +1 -1
  112. package/dist/dts/Context.d.ts +26 -54
  113. package/dist/dts/Context.d.ts.map +1 -1
  114. package/dist/dts/Cron.d.ts +9 -23
  115. package/dist/dts/Cron.d.ts.map +1 -1
  116. package/dist/dts/Data.d.ts +8 -0
  117. package/dist/dts/Data.d.ts.map +1 -1
  118. package/dist/dts/DateTime.d.ts +6 -0
  119. package/dist/dts/DateTime.d.ts.map +1 -1
  120. package/dist/dts/Duration.d.ts +2 -2
  121. package/dist/dts/Effect.d.ts +153 -71
  122. package/dist/dts/Effect.d.ts.map +1 -1
  123. package/dist/dts/Either.d.ts +44 -57
  124. package/dist/dts/Either.d.ts.map +1 -1
  125. package/dist/dts/Encoding.d.ts +1 -1
  126. package/dist/dts/Equivalence.d.ts +1 -1
  127. package/dist/dts/Function.d.ts +55 -59
  128. package/dist/dts/Function.d.ts.map +1 -1
  129. package/dist/dts/HashMap.d.ts +0 -9
  130. package/dist/dts/HashMap.d.ts.map +1 -1
  131. package/dist/dts/Iterable.d.ts +13 -2
  132. package/dist/dts/Iterable.d.ts.map +1 -1
  133. package/dist/dts/List.d.ts +10 -0
  134. package/dist/dts/List.d.ts.map +1 -1
  135. package/dist/dts/Logger.d.ts +0 -6
  136. package/dist/dts/Logger.d.ts.map +1 -1
  137. package/dist/dts/Mailbox.d.ts +1 -0
  138. package/dist/dts/Mailbox.d.ts.map +1 -1
  139. package/dist/dts/ManagedRuntime.d.ts +0 -2
  140. package/dist/dts/ManagedRuntime.d.ts.map +1 -1
  141. package/dist/dts/Metric.d.ts +14 -20
  142. package/dist/dts/Metric.d.ts.map +1 -1
  143. package/dist/dts/Micro.d.ts +1 -1
  144. package/dist/dts/Number.d.ts +52 -155
  145. package/dist/dts/Number.d.ts.map +1 -1
  146. package/dist/dts/Option.d.ts +12 -0
  147. package/dist/dts/Option.d.ts.map +1 -1
  148. package/dist/dts/Order.d.ts +1 -0
  149. package/dist/dts/Order.d.ts.map +1 -1
  150. package/dist/dts/Ordering.d.ts +4 -17
  151. package/dist/dts/Ordering.d.ts.map +1 -1
  152. package/dist/dts/Pool.d.ts +1 -1
  153. package/dist/dts/Predicate.d.ts +56 -133
  154. package/dist/dts/Predicate.d.ts.map +1 -1
  155. package/dist/dts/Random.d.ts +1 -2
  156. package/dist/dts/Random.d.ts.map +1 -1
  157. package/dist/dts/RcMap.d.ts +15 -6
  158. package/dist/dts/RcMap.d.ts.map +1 -1
  159. package/dist/dts/Record.d.ts +68 -279
  160. package/dist/dts/Record.d.ts.map +1 -1
  161. package/dist/dts/Redacted.d.ts +3 -0
  162. package/dist/dts/Redacted.d.ts.map +1 -1
  163. package/dist/dts/RegExp.d.ts +2 -2
  164. package/dist/dts/RegExp.d.ts.map +1 -1
  165. package/dist/dts/STM.d.ts +5 -7
  166. package/dist/dts/STM.d.ts.map +1 -1
  167. package/dist/dts/Schedule.d.ts +7 -7
  168. package/dist/dts/Schema.d.ts +32 -26
  169. package/dist/dts/Schema.d.ts.map +1 -1
  170. package/dist/dts/SchemaAST.d.ts +0 -2
  171. package/dist/dts/SchemaAST.d.ts.map +1 -1
  172. package/dist/dts/Sink.d.ts +14 -10
  173. package/dist/dts/Sink.d.ts.map +1 -1
  174. package/dist/dts/Stream.d.ts +58 -62
  175. package/dist/dts/Stream.d.ts.map +1 -1
  176. package/dist/dts/String.d.ts +47 -2
  177. package/dist/dts/String.d.ts.map +1 -1
  178. package/dist/dts/Struct.d.ts +12 -0
  179. package/dist/dts/Struct.d.ts.map +1 -1
  180. package/dist/dts/Symbol.d.ts +1 -2
  181. package/dist/dts/Symbol.d.ts.map +1 -1
  182. package/dist/dts/TestClock.d.ts +2 -1
  183. package/dist/dts/TestClock.d.ts.map +1 -1
  184. package/dist/dts/Trie.d.ts +66 -0
  185. package/dist/dts/Trie.d.ts.map +1 -1
  186. package/dist/dts/Tuple.d.ts +21 -62
  187. package/dist/dts/Tuple.d.ts.map +1 -1
  188. package/dist/dts/Utils.d.ts +8 -8
  189. package/dist/esm/Array.js +474 -442
  190. package/dist/esm/Array.js.map +1 -1
  191. package/dist/esm/BigDecimal.js +31 -89
  192. package/dist/esm/BigDecimal.js.map +1 -1
  193. package/dist/esm/BigInt.js +27 -71
  194. package/dist/esm/BigInt.js.map +1 -1
  195. package/dist/esm/Boolean.js +12 -10
  196. package/dist/esm/Boolean.js.map +1 -1
  197. package/dist/esm/Brand.js +2 -0
  198. package/dist/esm/Brand.js.map +1 -1
  199. package/dist/esm/Channel.js +0 -2
  200. package/dist/esm/Channel.js.map +1 -1
  201. package/dist/esm/Chunk.js +4 -0
  202. package/dist/esm/Chunk.js.map +1 -1
  203. package/dist/esm/Config.js +0 -5
  204. package/dist/esm/Config.js.map +1 -1
  205. package/dist/esm/Context.js +14 -24
  206. package/dist/esm/Context.js.map +1 -1
  207. package/dist/esm/Cron.js +11 -25
  208. package/dist/esm/Cron.js.map +1 -1
  209. package/dist/esm/Data.js +7 -0
  210. package/dist/esm/Data.js.map +1 -1
  211. package/dist/esm/DateTime.js +2 -0
  212. package/dist/esm/DateTime.js.map +1 -1
  213. package/dist/esm/Duration.js +2 -2
  214. package/dist/esm/Effect.js +123 -53
  215. package/dist/esm/Effect.js.map +1 -1
  216. package/dist/esm/Either.js +22 -25
  217. package/dist/esm/Either.js.map +1 -1
  218. package/dist/esm/Encoding.js +1 -1
  219. package/dist/esm/Equivalence.js +1 -1
  220. package/dist/esm/Function.js +21 -24
  221. package/dist/esm/Function.js.map +1 -1
  222. package/dist/esm/HashMap.js +0 -3
  223. package/dist/esm/HashMap.js.map +1 -1
  224. package/dist/esm/Iterable.js +9 -2
  225. package/dist/esm/Iterable.js.map +1 -1
  226. package/dist/esm/List.js +2 -0
  227. package/dist/esm/List.js.map +1 -1
  228. package/dist/esm/Logger.js +0 -2
  229. package/dist/esm/Logger.js.map +1 -1
  230. package/dist/esm/Mailbox.js +1 -0
  231. package/dist/esm/Mailbox.js.map +1 -1
  232. package/dist/esm/ManagedRuntime.js +0 -2
  233. package/dist/esm/ManagedRuntime.js.map +1 -1
  234. package/dist/esm/Metric.js +6 -12
  235. package/dist/esm/Metric.js.map +1 -1
  236. package/dist/esm/Micro.js +1 -1
  237. package/dist/esm/Number.js +22 -61
  238. package/dist/esm/Number.js.map +1 -1
  239. package/dist/esm/Option.js +6 -0
  240. package/dist/esm/Option.js.map +1 -1
  241. package/dist/esm/Order.js +1 -0
  242. package/dist/esm/Order.js.map +1 -1
  243. package/dist/esm/Ordering.js +2 -7
  244. package/dist/esm/Ordering.js.map +1 -1
  245. package/dist/esm/ParseResult.js +14 -8
  246. package/dist/esm/ParseResult.js.map +1 -1
  247. package/dist/esm/Pool.js +1 -1
  248. package/dist/esm/Predicate.js +36 -77
  249. package/dist/esm/Predicate.js.map +1 -1
  250. package/dist/esm/Random.js +1 -2
  251. package/dist/esm/Random.js.map +1 -1
  252. package/dist/esm/RcMap.js +5 -2
  253. package/dist/esm/RcMap.js.map +1 -1
  254. package/dist/esm/Record.js +28 -107
  255. package/dist/esm/Record.js.map +1 -1
  256. package/dist/esm/Redacted.js +3 -0
  257. package/dist/esm/Redacted.js.map +1 -1
  258. package/dist/esm/RegExp.js +2 -2
  259. package/dist/esm/RegExp.js.map +1 -1
  260. package/dist/esm/STM.js +3 -5
  261. package/dist/esm/STM.js.map +1 -1
  262. package/dist/esm/Schedule.js +2 -2
  263. package/dist/esm/Schema.js +19 -16
  264. package/dist/esm/Schema.js.map +1 -1
  265. package/dist/esm/SchemaAST.js +0 -2
  266. package/dist/esm/SchemaAST.js.map +1 -1
  267. package/dist/esm/Sink.js +14 -10
  268. package/dist/esm/Sink.js.map +1 -1
  269. package/dist/esm/Stream.js +25 -25
  270. package/dist/esm/Stream.js.map +1 -1
  271. package/dist/esm/String.js +31 -2
  272. package/dist/esm/String.js.map +1 -1
  273. package/dist/esm/Struct.js +6 -0
  274. package/dist/esm/Struct.js.map +1 -1
  275. package/dist/esm/Symbol.js +1 -2
  276. package/dist/esm/Symbol.js.map +1 -1
  277. package/dist/esm/TestClock.js.map +1 -1
  278. package/dist/esm/Trie.js +28 -0
  279. package/dist/esm/Trie.js.map +1 -1
  280. package/dist/esm/Tuple.js +11 -30
  281. package/dist/esm/Tuple.js.map +1 -1
  282. package/dist/esm/internal/matcher.js +1 -1
  283. package/dist/esm/internal/matcher.js.map +1 -1
  284. package/dist/esm/internal/version.js +1 -1
  285. package/package.json +1 -1
  286. package/src/Array.ts +1235 -1188
  287. package/src/BigDecimal.ts +61 -189
  288. package/src/BigInt.ts +57 -165
  289. package/src/Boolean.ts +28 -18
  290. package/src/Brand.ts +3 -3
  291. package/src/Channel.ts +0 -6
  292. package/src/Chunk.ts +16 -0
  293. package/src/Config.ts +0 -5
  294. package/src/Context.ts +26 -54
  295. package/src/Cron.ts +11 -25
  296. package/src/Data.ts +8 -0
  297. package/src/DateTime.ts +6 -0
  298. package/src/Duration.ts +2 -2
  299. package/src/Effect.ts +153 -71
  300. package/src/Either.ts +45 -58
  301. package/src/Encoding.ts +1 -1
  302. package/src/Equivalence.ts +1 -1
  303. package/src/Function.ts +55 -59
  304. package/src/HashMap.ts +0 -9
  305. package/src/Iterable.ts +13 -2
  306. package/src/List.ts +12 -0
  307. package/src/Logger.ts +0 -6
  308. package/src/Mailbox.ts +1 -0
  309. package/src/ManagedRuntime.ts +0 -2
  310. package/src/Metric.ts +14 -20
  311. package/src/Micro.ts +1 -1
  312. package/src/Number.ts +52 -155
  313. package/src/Option.ts +12 -0
  314. package/src/Order.ts +1 -0
  315. package/src/Ordering.ts +4 -17
  316. package/src/ParseResult.ts +16 -9
  317. package/src/Pool.ts +1 -1
  318. package/src/Predicate.ts +56 -133
  319. package/src/Random.ts +1 -2
  320. package/src/RcMap.ts +15 -6
  321. package/src/Record.ts +68 -279
  322. package/src/Redacted.ts +3 -0
  323. package/src/RegExp.ts +2 -2
  324. package/src/STM.ts +5 -7
  325. package/src/Schedule.ts +7 -7
  326. package/src/Schema.ts +37 -28
  327. package/src/SchemaAST.ts +0 -2
  328. package/src/Sink.ts +14 -10
  329. package/src/Stream.ts +56 -61
  330. package/src/String.ts +47 -2
  331. package/src/Struct.ts +12 -0
  332. package/src/Symbol.ts +1 -2
  333. package/src/TestClock.ts +2 -1
  334. package/src/Trie.ts +66 -0
  335. package/src/Tuple.ts +21 -62
  336. package/src/Utils.ts +8 -8
  337. package/src/internal/matcher.ts +1 -1
  338. package/src/internal/version.ts +1 -1
package/src/Context.ts CHANGED
@@ -142,10 +142,9 @@ export declare namespace Tag {
142
142
  /**
143
143
  * Creates a new `Tag` instance with an optional key parameter.
144
144
  *
145
- * @param key - A key that will be used to compare tags.
146
- *
147
145
  * @example
148
146
  * ```ts
147
+ * import * as assert from "node:assert"
149
148
  * import { Context } from "effect"
150
149
  *
151
150
  * assert.strictEqual(Context.GenericTag("PORT").key === Context.GenericTag("PORT").key, true)
@@ -191,10 +190,9 @@ export const unsafeMake: <Services>(unsafeMap: Map<string, any>) => Context<Serv
191
190
  /**
192
191
  * Checks if the provided argument is a `Context`.
193
192
  *
194
- * @param input - The value to be checked if it is a `Context`.
195
- *
196
193
  * @example
197
194
  * ```ts
195
+ * import * as assert from "node:assert"
198
196
  * import { Context } from "effect"
199
197
  *
200
198
  * assert.strictEqual(Context.isContext(Context.empty()), true)
@@ -208,10 +206,9 @@ export const isContext: (input: unknown) => input is Context<never> = internal.i
208
206
  /**
209
207
  * Checks if the provided argument is a `Tag`.
210
208
  *
211
- * @param input - The value to be checked if it is a `Tag`.
212
- *
213
209
  * @example
214
210
  * ```ts
211
+ * import * as assert from "node:assert"
215
212
  * import { Context } from "effect"
216
213
  *
217
214
  * assert.strictEqual(Context.isTag(Context.GenericTag("Tag")), true)
@@ -225,7 +222,6 @@ export const isTag: (input: unknown) => input is Tag<any, any> = internal.isTag
225
222
  /**
226
223
  * Checks if the provided argument is a `Reference`.
227
224
  *
228
- * @param input - The value to be checked if it is a `Reference`.
229
225
  * @since 3.11.0
230
226
  * @category guards
231
227
  * @experimental
@@ -237,6 +233,7 @@ export const isReference: (u: unknown) => u is Reference<any, any> = internal.is
237
233
  *
238
234
  * @example
239
235
  * ```ts
236
+ * import * as assert from "node:assert"
240
237
  * import { Context } from "effect"
241
238
  *
242
239
  * assert.strictEqual(Context.isContext(Context.empty()), true)
@@ -252,6 +249,7 @@ export const empty: () => Context<never> = internal.empty
252
249
  *
253
250
  * @example
254
251
  * ```ts
252
+ * import * as assert from "node:assert"
255
253
  * import { Context } from "effect"
256
254
  *
257
255
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -272,6 +270,7 @@ export const make: <T extends Tag<any, any>>(tag: T, service: Tag.Service<T>) =>
272
270
  *
273
271
  * @example
274
272
  * ```ts
273
+ * import * as assert from "node:assert"
275
274
  * import { Context, pipe } from "effect"
276
275
  *
277
276
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -296,6 +295,7 @@ export const add: {
296
295
  *
297
296
  * @example
298
297
  * ```ts
298
+ * import * as assert from "node:assert"
299
299
  * import { Context, pipe } from "effect"
300
300
  *
301
301
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -320,6 +320,7 @@ export const add: {
320
320
  *
321
321
  * @example
322
322
  * ```ts
323
+ * import * as assert from "node:assert"
323
324
  * import { Context, pipe } from "effect"
324
325
  *
325
326
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -344,11 +345,9 @@ export const add: {
344
345
  /**
345
346
  * Get a service from the context that corresponds to the given tag.
346
347
  *
347
- * @param self - The `Context` to search for the service.
348
- * @param tag - The `Tag` of the service to retrieve.
349
- *
350
348
  * @example
351
349
  * ```ts
350
+ * import * as assert from "node:assert"
352
351
  * import { pipe, Context } from "effect"
353
352
  *
354
353
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -369,11 +368,9 @@ export const get: {
369
368
  /**
370
369
  * Get a service from the context that corresponds to the given tag.
371
370
  *
372
- * @param self - The `Context` to search for the service.
373
- * @param tag - The `Tag` of the service to retrieve.
374
- *
375
371
  * @example
376
372
  * ```ts
373
+ * import * as assert from "node:assert"
377
374
  * import { pipe, Context } from "effect"
378
375
  *
379
376
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -394,11 +391,9 @@ export const get: {
394
391
  /**
395
392
  * Get a service from the context that corresponds to the given tag.
396
393
  *
397
- * @param self - The `Context` to search for the service.
398
- * @param tag - The `Tag` of the service to retrieve.
399
- *
400
394
  * @example
401
395
  * ```ts
396
+ * import * as assert from "node:assert"
402
397
  * import { pipe, Context } from "effect"
403
398
  *
404
399
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -419,11 +414,9 @@ export const get: {
419
414
  /**
420
415
  * Get a service from the context that corresponds to the given tag.
421
416
  *
422
- * @param self - The `Context` to search for the service.
423
- * @param tag - The `Tag` of the service to retrieve.
424
- *
425
417
  * @example
426
418
  * ```ts
419
+ * import * as assert from "node:assert"
427
420
  * import { pipe, Context } from "effect"
428
421
  *
429
422
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -444,11 +437,9 @@ export const get: {
444
437
  /**
445
438
  * Get a service from the context that corresponds to the given tag.
446
439
  *
447
- * @param self - The `Context` to search for the service.
448
- * @param tag - The `Tag` of the service to retrieve.
449
- *
450
440
  * @example
451
441
  * ```ts
442
+ * import * as assert from "node:assert"
452
443
  * import { pipe, Context } from "effect"
453
444
  *
454
445
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -500,11 +491,9 @@ export const getOrElse: {
500
491
  *
501
492
  * For a safer version see {@link getOption}.
502
493
  *
503
- * @param self - The `Context` to search for the service.
504
- * @param tag - The `Tag` of the service to retrieve.
505
- *
506
494
  * @example
507
495
  * ```ts
496
+ * import * as assert from "node:assert"
508
497
  * import { Context } from "effect"
509
498
  *
510
499
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -526,11 +515,9 @@ export const unsafeGet: {
526
515
  *
527
516
  * For a safer version see {@link getOption}.
528
517
  *
529
- * @param self - The `Context` to search for the service.
530
- * @param tag - The `Tag` of the service to retrieve.
531
- *
532
518
  * @example
533
519
  * ```ts
520
+ * import * as assert from "node:assert"
534
521
  * import { Context } from "effect"
535
522
  *
536
523
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -552,11 +539,9 @@ export const unsafeGet: {
552
539
  *
553
540
  * For a safer version see {@link getOption}.
554
541
  *
555
- * @param self - The `Context` to search for the service.
556
- * @param tag - The `Tag` of the service to retrieve.
557
- *
558
542
  * @example
559
543
  * ```ts
544
+ * import * as assert from "node:assert"
560
545
  * import { Context } from "effect"
561
546
  *
562
547
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -578,11 +563,9 @@ export const unsafeGet: {
578
563
  * Get the value associated with the specified tag from the context wrapped in an `Option` object. If the tag is not
579
564
  * found, the `Option` object will be `None`.
580
565
  *
581
- * @param self - The `Context` to search for the service.
582
- * @param tag - The `Tag` of the service to retrieve.
583
- *
584
566
  * @example
585
567
  * ```ts
568
+ * import * as assert from "node:assert"
586
569
  * import { Context, Option } from "effect"
587
570
  *
588
571
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -602,11 +585,9 @@ export const getOption: {
602
585
  * Get the value associated with the specified tag from the context wrapped in an `Option` object. If the tag is not
603
586
  * found, the `Option` object will be `None`.
604
587
  *
605
- * @param self - The `Context` to search for the service.
606
- * @param tag - The `Tag` of the service to retrieve.
607
- *
608
588
  * @example
609
589
  * ```ts
590
+ * import * as assert from "node:assert"
610
591
  * import { Context, Option } from "effect"
611
592
  *
612
593
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -626,11 +607,9 @@ export const getOption: {
626
607
  * Get the value associated with the specified tag from the context wrapped in an `Option` object. If the tag is not
627
608
  * found, the `Option` object will be `None`.
628
609
  *
629
- * @param self - The `Context` to search for the service.
630
- * @param tag - The `Tag` of the service to retrieve.
631
- *
632
610
  * @example
633
611
  * ```ts
612
+ * import * as assert from "node:assert"
634
613
  * import { Context, Option } from "effect"
635
614
  *
636
615
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -651,11 +630,9 @@ export const getOption: {
651
630
  /**
652
631
  * Merges two `Context`s, returning a new `Context` containing the services of both.
653
632
  *
654
- * @param self - The first `Context` to merge.
655
- * @param that - The second `Context` to merge.
656
- *
657
633
  * @example
658
634
  * ```ts
635
+ * import * as assert from "node:assert"
659
636
  * import { Context } from "effect"
660
637
  *
661
638
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -676,11 +653,9 @@ export const merge: {
676
653
  /**
677
654
  * Merges two `Context`s, returning a new `Context` containing the services of both.
678
655
  *
679
- * @param self - The first `Context` to merge.
680
- * @param that - The second `Context` to merge.
681
- *
682
656
  * @example
683
657
  * ```ts
658
+ * import * as assert from "node:assert"
684
659
  * import { Context } from "effect"
685
660
  *
686
661
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -701,11 +676,9 @@ export const merge: {
701
676
  /**
702
677
  * Merges two `Context`s, returning a new `Context` containing the services of both.
703
678
  *
704
- * @param self - The first `Context` to merge.
705
- * @param that - The second `Context` to merge.
706
- *
707
679
  * @example
708
680
  * ```ts
681
+ * import * as assert from "node:assert"
709
682
  * import { Context } from "effect"
710
683
  *
711
684
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -728,10 +701,9 @@ export const merge: {
728
701
  /**
729
702
  * Merges any number of `Context`s, returning a new `Context` containing the services of all.
730
703
  *
731
- * @param ctxs - The `Context`s to merge.
732
- *
733
704
  * @example
734
705
  * ```ts
706
+ * import * as assert from "node:assert"
735
707
  * import { Context } from "effect"
736
708
  *
737
709
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -758,11 +730,9 @@ export const mergeAll: <T extends Array<unknown>>(
758
730
  /**
759
731
  * Returns a new `Context` that contains only the specified services.
760
732
  *
761
- * @param self - The `Context` to prune services from.
762
- * @param tags - The list of `Tag`s to be included in the new `Context`.
763
- *
764
733
  * @example
765
734
  * ```ts
735
+ * import * as assert from "node:assert"
766
736
  * import { pipe, Context, Option } from "effect"
767
737
  *
768
738
  * const Port = Context.GenericTag<{ PORT: number }>("Port")
@@ -796,6 +766,7 @@ export const omit: <Services, S extends Array<ValidTagsById<Services>>>(
796
766
  /**
797
767
  * @example
798
768
  * ```ts
769
+ * import * as assert from "node:assert"
799
770
  * import { Context, Layer } from "effect"
800
771
  *
801
772
  * class MyTag extends Context.Tag("MyTag")<
@@ -824,6 +795,7 @@ export const Tag: <const Id extends string>(id: Id) => <Self, Shape>() => TagCla
824
795
  * @example
825
796
  * ```ts
826
797
  * // Title: Declaring a Tag with a default value
798
+ * import * as assert from "node:assert"
827
799
  * import { Context, Effect } from "effect"
828
800
  *
829
801
  * class SpecialNumber extends Context.Reference<SpecialNumber>()(
package/src/Cron.ts CHANGED
@@ -106,8 +106,6 @@ const CronProto = {
106
106
  /**
107
107
  * Checks if a given value is a `Cron` instance.
108
108
  *
109
- * @param u - The value to check.
110
- *
111
109
  * @since 2.0.0
112
110
  * @category guards
113
111
  */
@@ -116,8 +114,6 @@ export const isCron = (u: unknown): u is Cron => hasProperty(u, TypeId)
116
114
  /**
117
115
  * Creates a `Cron` instance.
118
116
  *
119
- * @param constraints - The cron constraints.
120
- *
121
117
  * @since 2.0.0
122
118
  * @category constructors
123
119
  */
@@ -216,8 +212,6 @@ export class ParseError extends Data.TaggedError("CronParseError")<{
216
212
  /**
217
213
  * Returns `true` if the specified value is an `ParseError`, `false` otherwise.
218
214
  *
219
- * @param u - The value to check.
220
- *
221
215
  * @since 2.0.0
222
216
  * @category guards
223
217
  */
@@ -226,10 +220,9 @@ export const isParseError = (u: unknown): u is ParseError => hasProperty(u, Pars
226
220
  /**
227
221
  * Parses a cron expression into a `Cron` instance.
228
222
  *
229
- * @param cron - The cron expression to parse.
230
- *
231
223
  * @example
232
224
  * ```ts
225
+ * import * as assert from "node:assert"
233
226
  * import { Cron, Either } from "effect"
234
227
  *
235
228
  * // At 04:00 on every day-of-month from 8 through 14.
@@ -327,13 +320,9 @@ export const unsafeParse = (cron: string, tz?: DateTime.TimeZone | string): Cron
327
320
  /**
328
321
  * Checks if a given `Date` falls within an active `Cron` time window.
329
322
  *
330
- * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
331
- *
332
- * @param cron - The `Cron` instance.
333
- * @param date - The `Date` to check against.
334
- *
335
323
  * @example
336
324
  * ```ts
325
+ * import * as assert from "node:assert"
337
326
  * import { Cron, Either } from "effect"
338
327
  *
339
328
  * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *"))
@@ -341,6 +330,8 @@ export const unsafeParse = (cron: string, tz?: DateTime.TimeZone | string): Cron
341
330
  * assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 05:00:00")), false)
342
331
  * ```
343
332
  *
333
+ * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
334
+ *
344
335
  * @since 2.0.0
345
336
  */
346
337
  export const match = (cron: Cron, date: DateTime.DateTime.Input): boolean => {
@@ -387,11 +378,9 @@ const daysInMonth = (date: Date): number =>
387
378
  *
388
379
  * Uses the current time as a starting point if no value is provided for `now`.
389
380
  *
390
- * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
391
- * @throws `Error` if the next run date cannot be found within 10,000 iterations.
392
- *
393
381
  * @example
394
382
  * ```ts
383
+ * import * as assert from "node:assert"
395
384
  * import { Cron, Either } from "effect"
396
385
  *
397
386
  * const after = new Date("2021-01-01 00:00:00")
@@ -399,14 +388,14 @@ const daysInMonth = (date: Date): number =>
399
388
  * assert.deepStrictEqual(Cron.next(cron, after), new Date("2021-01-08 04:00:00"))
400
389
  * ```
401
390
  *
402
- * @param cron - The `Cron` instance.
403
- * @param now - The `Date` to start searching from.
391
+ * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
392
+ * @throws `Error` if the next run date cannot be found within 10,000 iterations.
404
393
  *
405
394
  * @since 2.0.0
406
395
  */
407
- export const next = (cron: Cron, now?: DateTime.DateTime.Input): Date => {
396
+ export const next = (cron: Cron, startFrom?: DateTime.DateTime.Input): Date => {
408
397
  const tz = Option.getOrUndefined(cron.tz)
409
- const zoned = dateTime.unsafeMakeZoned(now ?? new Date(), {
398
+ const zoned = dateTime.unsafeMakeZoned(startFrom ?? new Date(), {
410
399
  timeZone: tz
411
400
  })
412
401
 
@@ -529,14 +518,11 @@ export const next = (cron: Cron, now?: DateTime.DateTime.Input): Date => {
529
518
  /**
530
519
  * Returns an `IterableIterator` which yields the sequence of `Date`s that match the `Cron` instance.
531
520
  *
532
- * @param cron - The `Cron` instance.
533
- * @param now - The `Date` to start searching from.
534
- *
535
521
  * @since 2.0.0
536
522
  */
537
- export const sequence = function*(cron: Cron, now?: DateTime.DateTime.Input): IterableIterator<Date> {
523
+ export const sequence = function*(cron: Cron, startFrom?: DateTime.DateTime.Input): IterableIterator<Date> {
538
524
  while (true) {
539
- yield now = next(cron, now)
525
+ yield startFrom = next(cron, startFrom)
540
526
  }
541
527
  }
542
528
 
package/src/Data.ts CHANGED
@@ -28,6 +28,7 @@ export declare namespace Case {
28
28
  /**
29
29
  * @example
30
30
  * ```ts
31
+ * import * as assert from "node:assert"
31
32
  * import { Data, Equal } from "effect"
32
33
  *
33
34
  * const alice = Data.struct({ name: "Alice", age: 30 })
@@ -56,6 +57,7 @@ export const unsafeStruct = <A extends Record<string, any>>(as: A): { readonly [
56
57
  /**
57
58
  * @example
58
59
  * ```ts
60
+ * import * as assert from "node:assert"
59
61
  * import { Data, Equal } from "effect"
60
62
  *
61
63
  * const alice = Data.tuple("Alice", 30)
@@ -77,6 +79,7 @@ export const tuple = <As extends ReadonlyArray<any>>(...as: As): Readonly<As> =>
77
79
  /**
78
80
  * @example
79
81
  * ```ts
82
+ * import * as assert from "node:assert"
80
83
  * import { Data, Equal } from "effect"
81
84
  *
82
85
  * const alice = Data.struct({ name: "Alice", age: 30 })
@@ -117,6 +120,7 @@ export {
117
120
  *
118
121
  * @example
119
122
  * ```ts
123
+ * import * as assert from "node:assert"
120
124
  * import { Data, Equal } from "effect"
121
125
  *
122
126
  * interface Person {
@@ -147,6 +151,7 @@ export {
147
151
  *
148
152
  * @example
149
153
  * ```ts
154
+ * import * as assert from "node:assert"
150
155
  * import { Data } from "effect"
151
156
  *
152
157
  * interface Person {
@@ -178,6 +183,7 @@ export const tagged = <A extends { readonly _tag: string }>(
178
183
  *
179
184
  * @example
180
185
  * ```ts
186
+ * import * as assert from "node:assert"
181
187
  * import { Data, Equal } from "effect"
182
188
  *
183
189
  * class Person extends Data.Class<{ readonly name: string }> {}
@@ -205,6 +211,7 @@ export const Class: new<A extends Record<string, any> = {}>(
205
211
  *
206
212
  * @example
207
213
  * ```ts
214
+ * import * as assert from "node:assert"
208
215
  * import { Data, Equal } from "effect"
209
216
  *
210
217
  * class Person extends Data.TaggedClass("Person")<{ readonly name: string }> {}
@@ -249,6 +256,7 @@ export const Structural: new<A>(
249
256
  * Create a tagged enum data type, which is a union of `Data` structs.
250
257
  *
251
258
  * ```ts
259
+ * import * as assert from "node:assert"
252
260
  * import { Data } from "effect"
253
261
  *
254
262
  * type HttpError = Data.TaggedEnum<{
package/src/DateTime.ts CHANGED
@@ -1272,6 +1272,7 @@ export const toPartsUtc: (self: DateTime) => DateTime.PartsWithWeekday = Interna
1272
1272
  * @category parts
1273
1273
  * @example
1274
1274
  * ```ts
1275
+ * import * as assert from "node:assert"
1275
1276
  * import { DateTime } from "effect"
1276
1277
  *
1277
1278
  * const now = DateTime.unsafeMake({ year: 2024 })
@@ -1289,6 +1290,7 @@ export const getPartUtc: {
1289
1290
  * @category parts
1290
1291
  * @example
1291
1292
  * ```ts
1293
+ * import * as assert from "node:assert"
1292
1294
  * import { DateTime } from "effect"
1293
1295
  *
1294
1296
  * const now = DateTime.unsafeMake({ year: 2024 })
@@ -1306,6 +1308,7 @@ export const getPartUtc: {
1306
1308
  * @category parts
1307
1309
  * @example
1308
1310
  * ```ts
1311
+ * import * as assert from "node:assert"
1309
1312
  * import { DateTime } from "effect"
1310
1313
  *
1311
1314
  * const now = DateTime.unsafeMake({ year: 2024 })
@@ -1325,6 +1328,7 @@ export const getPartUtc: {
1325
1328
  * @category parts
1326
1329
  * @example
1327
1330
  * ```ts
1331
+ * import * as assert from "node:assert"
1328
1332
  * import { DateTime } from "effect"
1329
1333
  *
1330
1334
  * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" })
@@ -1342,6 +1346,7 @@ export const getPart: {
1342
1346
  * @category parts
1343
1347
  * @example
1344
1348
  * ```ts
1349
+ * import * as assert from "node:assert"
1345
1350
  * import { DateTime } from "effect"
1346
1351
  *
1347
1352
  * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" })
@@ -1359,6 +1364,7 @@ export const getPart: {
1359
1364
  * @category parts
1360
1365
  * @example
1361
1366
  * ```ts
1367
+ * import * as assert from "node:assert"
1362
1368
  * import { DateTime } from "effect"
1363
1369
  *
1364
1370
  * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" })
package/src/Duration.ts CHANGED
@@ -1001,8 +1001,6 @@ export const format = (self: DurationInput): string => {
1001
1001
  *
1002
1002
  * Milliseconds and nanoseconds are expressed as fractional seconds.
1003
1003
  *
1004
- * @throws `RangeError` If the duration is not finite.
1005
- *
1006
1004
  * @example
1007
1005
  * ```ts
1008
1006
  * import { Duration } from "effect"
@@ -1012,6 +1010,8 @@ export const format = (self: DurationInput): string => {
1012
1010
  * Duration.unsafeFormatIso(Duration.millis(1500)) // => "PT1.5S"
1013
1011
  * ```
1014
1012
  *
1013
+ * @throws `RangeError` If the duration is not finite.
1014
+ *
1015
1015
  * @since 3.13.0
1016
1016
  * @category conversions
1017
1017
  */