effect 4.0.0-beta.66 → 4.0.0-beta.67

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 (1633) hide show
  1. package/dist/Array.d.ts +113 -67
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +28 -18
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +404 -337
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +190 -146
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +167 -97
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +87 -47
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +62 -31
  14. package/dist/Boolean.d.ts.map +1 -1
  15. package/dist/Boolean.js +30 -15
  16. package/dist/Boolean.js.map +1 -1
  17. package/dist/Brand.d.ts +20 -1
  18. package/dist/Brand.d.ts.map +1 -1
  19. package/dist/Brand.js +16 -0
  20. package/dist/Brand.js.map +1 -1
  21. package/dist/Cache.d.ts +236 -132
  22. package/dist/Cache.d.ts.map +1 -1
  23. package/dist/Cache.js +133 -57
  24. package/dist/Cache.js.map +1 -1
  25. package/dist/Cause.d.ts +74 -62
  26. package/dist/Cause.d.ts.map +1 -1
  27. package/dist/Cause.js +43 -36
  28. package/dist/Cause.js.map +1 -1
  29. package/dist/Channel.d.ts +1518 -575
  30. package/dist/Channel.d.ts.map +1 -1
  31. package/dist/Channel.js +661 -287
  32. package/dist/Channel.js.map +1 -1
  33. package/dist/ChannelSchema.d.ts +119 -10
  34. package/dist/ChannelSchema.d.ts.map +1 -1
  35. package/dist/ChannelSchema.js +45 -6
  36. package/dist/ChannelSchema.js.map +1 -1
  37. package/dist/Chunk.d.ts +548 -379
  38. package/dist/Chunk.d.ts.map +1 -1
  39. package/dist/Chunk.js +238 -170
  40. package/dist/Chunk.js.map +1 -1
  41. package/dist/Clock.d.ts +15 -8
  42. package/dist/Clock.d.ts.map +1 -1
  43. package/dist/Clock.js +8 -4
  44. package/dist/Clock.js.map +1 -1
  45. package/dist/Combiner.d.ts +2 -4
  46. package/dist/Combiner.d.ts.map +1 -1
  47. package/dist/Combiner.js +2 -4
  48. package/dist/Combiner.js.map +1 -1
  49. package/dist/Config.d.ts +4 -2
  50. package/dist/Config.d.ts.map +1 -1
  51. package/dist/Config.js +2 -2
  52. package/dist/Config.js.map +1 -1
  53. package/dist/ConfigProvider.d.ts +1 -1
  54. package/dist/ConfigProvider.js +1 -1
  55. package/dist/Console.d.ts +76 -50
  56. package/dist/Console.d.ts.map +1 -1
  57. package/dist/Console.js +69 -46
  58. package/dist/Console.js.map +1 -1
  59. package/dist/Context.d.ts +383 -134
  60. package/dist/Context.d.ts.map +1 -1
  61. package/dist/Context.js +134 -54
  62. package/dist/Context.js.map +1 -1
  63. package/dist/Cron.d.ts +69 -48
  64. package/dist/Cron.d.ts.map +1 -1
  65. package/dist/Cron.js +96 -36
  66. package/dist/Cron.js.map +1 -1
  67. package/dist/Data.d.ts +3 -2
  68. package/dist/Data.d.ts.map +1 -1
  69. package/dist/Data.js.map +1 -1
  70. package/dist/DateTime.d.ts +874 -443
  71. package/dist/DateTime.d.ts.map +1 -1
  72. package/dist/DateTime.js +374 -215
  73. package/dist/DateTime.js.map +1 -1
  74. package/dist/Deferred.d.ts +367 -174
  75. package/dist/Deferred.d.ts.map +1 -1
  76. package/dist/Deferred.js +145 -71
  77. package/dist/Deferred.js.map +1 -1
  78. package/dist/Differ.d.ts +42 -0
  79. package/dist/Differ.d.ts.map +1 -1
  80. package/dist/Differ.js +36 -0
  81. package/dist/Duration.d.ts +329 -185
  82. package/dist/Duration.d.ts.map +1 -1
  83. package/dist/Duration.js +174 -106
  84. package/dist/Duration.js.map +1 -1
  85. package/dist/Effect.d.ts +2109 -1945
  86. package/dist/Effect.d.ts.map +1 -1
  87. package/dist/Effect.js +901 -726
  88. package/dist/Effect.js.map +1 -1
  89. package/dist/Effectable.d.ts +37 -2
  90. package/dist/Effectable.d.ts.map +1 -1
  91. package/dist/Effectable.js +2 -2
  92. package/dist/Effectable.js.map +1 -1
  93. package/dist/Encoding.d.ts +78 -28
  94. package/dist/Encoding.d.ts.map +1 -1
  95. package/dist/Encoding.js +75 -27
  96. package/dist/Encoding.js.map +1 -1
  97. package/dist/Equivalence.d.ts +14 -19
  98. package/dist/Equivalence.d.ts.map +1 -1
  99. package/dist/Equivalence.js +14 -19
  100. package/dist/Equivalence.js.map +1 -1
  101. package/dist/ErrorReporter.d.ts +66 -82
  102. package/dist/ErrorReporter.d.ts.map +1 -1
  103. package/dist/ErrorReporter.js +38 -29
  104. package/dist/ErrorReporter.js.map +1 -1
  105. package/dist/ExecutionPlan.d.ts +94 -9
  106. package/dist/ExecutionPlan.d.ts.map +1 -1
  107. package/dist/ExecutionPlan.js +20 -5
  108. package/dist/ExecutionPlan.js.map +1 -1
  109. package/dist/Exit.d.ts +7 -5
  110. package/dist/Exit.d.ts.map +1 -1
  111. package/dist/Exit.js.map +1 -1
  112. package/dist/Fiber.d.ts +72 -40
  113. package/dist/Fiber.d.ts.map +1 -1
  114. package/dist/Fiber.js +39 -21
  115. package/dist/Fiber.js.map +1 -1
  116. package/dist/FiberHandle.d.ts +117 -56
  117. package/dist/FiberHandle.d.ts.map +1 -1
  118. package/dist/FiberHandle.js +120 -38
  119. package/dist/FiberHandle.js.map +1 -1
  120. package/dist/FiberMap.d.ts +286 -158
  121. package/dist/FiberMap.d.ts.map +1 -1
  122. package/dist/FiberMap.js +174 -72
  123. package/dist/FiberMap.js.map +1 -1
  124. package/dist/FiberSet.d.ts +92 -51
  125. package/dist/FiberSet.d.ts.map +1 -1
  126. package/dist/FiberSet.js +96 -33
  127. package/dist/FiberSet.js.map +1 -1
  128. package/dist/FileSystem.d.ts +104 -73
  129. package/dist/FileSystem.d.ts.map +1 -1
  130. package/dist/FileSystem.js +53 -39
  131. package/dist/FileSystem.js.map +1 -1
  132. package/dist/Filter.d.ts +166 -88
  133. package/dist/Filter.d.ts.map +1 -1
  134. package/dist/Filter.js +68 -42
  135. package/dist/Filter.js.map +1 -1
  136. package/dist/Function.d.ts +154 -86
  137. package/dist/Function.d.ts.map +1 -1
  138. package/dist/Function.js +53 -37
  139. package/dist/Function.js.map +1 -1
  140. package/dist/Graph.d.ts +682 -365
  141. package/dist/Graph.d.ts.map +1 -1
  142. package/dist/Graph.js +308 -157
  143. package/dist/Graph.js.map +1 -1
  144. package/dist/HKT.d.ts +29 -13
  145. package/dist/HKT.d.ts.map +1 -1
  146. package/dist/Hash.d.ts +31 -18
  147. package/dist/Hash.d.ts.map +1 -1
  148. package/dist/Hash.js +25 -15
  149. package/dist/Hash.js.map +1 -1
  150. package/dist/HashMap.d.ts +444 -256
  151. package/dist/HashMap.d.ts.map +1 -1
  152. package/dist/HashMap.js +223 -105
  153. package/dist/HashMap.js.map +1 -1
  154. package/dist/HashRing.d.ts +36 -17
  155. package/dist/HashRing.d.ts.map +1 -1
  156. package/dist/HashRing.js +75 -8
  157. package/dist/HashRing.js.map +1 -1
  158. package/dist/HashSet.d.ts +194 -104
  159. package/dist/HashSet.d.ts.map +1 -1
  160. package/dist/HashSet.js +93 -38
  161. package/dist/HashSet.js.map +1 -1
  162. package/dist/Inspectable.d.ts +20 -9
  163. package/dist/Inspectable.d.ts.map +1 -1
  164. package/dist/Inspectable.js +16 -6
  165. package/dist/Inspectable.js.map +1 -1
  166. package/dist/Iterable.d.ts +309 -149
  167. package/dist/Iterable.d.ts.map +1 -1
  168. package/dist/Iterable.js +129 -65
  169. package/dist/Iterable.js.map +1 -1
  170. package/dist/JsonPatch.d.ts +4 -3
  171. package/dist/JsonPatch.d.ts.map +1 -1
  172. package/dist/JsonPatch.js +4 -3
  173. package/dist/JsonPatch.js.map +1 -1
  174. package/dist/Latch.d.ts +98 -15
  175. package/dist/Latch.d.ts.map +1 -1
  176. package/dist/Latch.js +41 -10
  177. package/dist/Latch.js.map +1 -1
  178. package/dist/Layer.d.ts +412 -309
  179. package/dist/Layer.d.ts.map +1 -1
  180. package/dist/Layer.js +261 -180
  181. package/dist/Layer.js.map +1 -1
  182. package/dist/LayerMap.d.ts +95 -21
  183. package/dist/LayerMap.d.ts.map +1 -1
  184. package/dist/LayerMap.js +55 -11
  185. package/dist/LayerMap.js.map +1 -1
  186. package/dist/LogLevel.d.ts +92 -131
  187. package/dist/LogLevel.d.ts.map +1 -1
  188. package/dist/LogLevel.js +25 -15
  189. package/dist/LogLevel.js.map +1 -1
  190. package/dist/Logger.d.ts +155 -99
  191. package/dist/Logger.d.ts.map +1 -1
  192. package/dist/Logger.js +211 -184
  193. package/dist/Logger.js.map +1 -1
  194. package/dist/ManagedRuntime.d.ts +75 -17
  195. package/dist/ManagedRuntime.d.ts.map +1 -1
  196. package/dist/ManagedRuntime.js +22 -16
  197. package/dist/ManagedRuntime.js.map +1 -1
  198. package/dist/Match.d.ts +133 -157
  199. package/dist/Match.d.ts.map +1 -1
  200. package/dist/Match.js +85 -76
  201. package/dist/Match.js.map +1 -1
  202. package/dist/Metric.d.ts +325 -284
  203. package/dist/Metric.d.ts.map +1 -1
  204. package/dist/Metric.js +217 -212
  205. package/dist/Metric.js.map +1 -1
  206. package/dist/MutableHashMap.d.ts +117 -58
  207. package/dist/MutableHashMap.d.ts.map +1 -1
  208. package/dist/MutableHashMap.js +52 -29
  209. package/dist/MutableHashMap.js.map +1 -1
  210. package/dist/MutableHashSet.d.ts +52 -30
  211. package/dist/MutableHashSet.d.ts.map +1 -1
  212. package/dist/MutableHashSet.js +94 -38
  213. package/dist/MutableHashSet.js.map +1 -1
  214. package/dist/MutableList.d.ts +92 -49
  215. package/dist/MutableList.d.ts.map +1 -1
  216. package/dist/MutableList.js +123 -71
  217. package/dist/MutableList.js.map +1 -1
  218. package/dist/MutableRef.d.ts +99 -62
  219. package/dist/MutableRef.d.ts.map +1 -1
  220. package/dist/MutableRef.js +79 -60
  221. package/dist/MutableRef.js.map +1 -1
  222. package/dist/Newtype.d.ts +3 -0
  223. package/dist/Newtype.d.ts.map +1 -1
  224. package/dist/Newtype.js.map +1 -1
  225. package/dist/NonEmptyIterable.d.ts +36 -39
  226. package/dist/NonEmptyIterable.d.ts.map +1 -1
  227. package/dist/NonEmptyIterable.js +34 -20
  228. package/dist/NonEmptyIterable.js.map +1 -1
  229. package/dist/Number.d.ts +116 -64
  230. package/dist/Number.d.ts.map +1 -1
  231. package/dist/Number.js +54 -30
  232. package/dist/Number.js.map +1 -1
  233. package/dist/Optic.d.ts +1 -2
  234. package/dist/Optic.d.ts.map +1 -1
  235. package/dist/Optic.js +0 -1
  236. package/dist/Optic.js.map +1 -1
  237. package/dist/Option.d.ts +28 -47
  238. package/dist/Option.d.ts.map +1 -1
  239. package/dist/Option.js +14 -12
  240. package/dist/Option.js.map +1 -1
  241. package/dist/Ordering.d.ts +43 -28
  242. package/dist/Ordering.d.ts.map +1 -1
  243. package/dist/Ordering.js +4 -2
  244. package/dist/Ordering.js.map +1 -1
  245. package/dist/PartitionedSemaphore.d.ts +225 -40
  246. package/dist/PartitionedSemaphore.d.ts.map +1 -1
  247. package/dist/PartitionedSemaphore.js +113 -17
  248. package/dist/PartitionedSemaphore.js.map +1 -1
  249. package/dist/Path.d.ts +77 -13
  250. package/dist/Path.d.ts.map +1 -1
  251. package/dist/Path.js +48 -4
  252. package/dist/Path.js.map +1 -1
  253. package/dist/Pipeable.d.ts +71 -15
  254. package/dist/Pipeable.d.ts.map +1 -1
  255. package/dist/Pipeable.js +59 -12
  256. package/dist/Pipeable.js.map +1 -1
  257. package/dist/PlatformError.d.ts +74 -6
  258. package/dist/PlatformError.d.ts.map +1 -1
  259. package/dist/PlatformError.js +68 -5
  260. package/dist/PlatformError.js.map +1 -1
  261. package/dist/Pool.d.ts +66 -31
  262. package/dist/Pool.d.ts.map +1 -1
  263. package/dist/Pool.js +26 -24
  264. package/dist/Pool.js.map +1 -1
  265. package/dist/Predicate.d.ts +16 -21
  266. package/dist/Predicate.d.ts.map +1 -1
  267. package/dist/Predicate.js +9 -14
  268. package/dist/Predicate.js.map +1 -1
  269. package/dist/PrimaryKey.d.ts +9 -2
  270. package/dist/PrimaryKey.d.ts.map +1 -1
  271. package/dist/PrimaryKey.js +7 -1
  272. package/dist/PrimaryKey.js.map +1 -1
  273. package/dist/PubSub.d.ts +364 -262
  274. package/dist/PubSub.d.ts.map +1 -1
  275. package/dist/PubSub.js +245 -174
  276. package/dist/PubSub.js.map +1 -1
  277. package/dist/Pull.d.ts +94 -25
  278. package/dist/Pull.d.ts.map +1 -1
  279. package/dist/Pull.js +61 -13
  280. package/dist/Pull.js.map +1 -1
  281. package/dist/Queue.d.ts +284 -150
  282. package/dist/Queue.d.ts.map +1 -1
  283. package/dist/Queue.js +216 -113
  284. package/dist/Queue.js.map +1 -1
  285. package/dist/Random.d.ts +54 -35
  286. package/dist/Random.d.ts.map +1 -1
  287. package/dist/Random.js +36 -24
  288. package/dist/Random.js.map +1 -1
  289. package/dist/RcMap.d.ts +151 -141
  290. package/dist/RcMap.d.ts.map +1 -1
  291. package/dist/RcMap.js +66 -20
  292. package/dist/RcMap.js.map +1 -1
  293. package/dist/RcRef.d.ts +69 -32
  294. package/dist/RcRef.d.ts.map +1 -1
  295. package/dist/RcRef.js +33 -16
  296. package/dist/RcRef.js.map +1 -1
  297. package/dist/Record.d.ts +273 -129
  298. package/dist/Record.d.ts.map +1 -1
  299. package/dist/Record.js +117 -57
  300. package/dist/Record.js.map +1 -1
  301. package/dist/Redactable.d.ts +3 -3
  302. package/dist/Redactable.js +2 -2
  303. package/dist/Redacted.d.ts +63 -33
  304. package/dist/Redacted.d.ts.map +1 -1
  305. package/dist/Redacted.js +30 -14
  306. package/dist/Redacted.js.map +1 -1
  307. package/dist/Ref.d.ts +81 -52
  308. package/dist/Ref.d.ts.map +1 -1
  309. package/dist/Ref.js +54 -35
  310. package/dist/Ref.js.map +1 -1
  311. package/dist/References.d.ts +73 -31
  312. package/dist/References.d.ts.map +1 -1
  313. package/dist/References.js +66 -30
  314. package/dist/References.js.map +1 -1
  315. package/dist/RegExp.d.ts +11 -5
  316. package/dist/RegExp.d.ts.map +1 -1
  317. package/dist/RegExp.js +11 -5
  318. package/dist/RegExp.js.map +1 -1
  319. package/dist/Request.d.ts +158 -34
  320. package/dist/Request.d.ts.map +1 -1
  321. package/dist/Request.js +67 -12
  322. package/dist/Request.js.map +1 -1
  323. package/dist/RequestResolver.d.ts +261 -116
  324. package/dist/RequestResolver.d.ts.map +1 -1
  325. package/dist/RequestResolver.js +77 -41
  326. package/dist/RequestResolver.js.map +1 -1
  327. package/dist/Resource.d.ts +13 -7
  328. package/dist/Resource.d.ts.map +1 -1
  329. package/dist/Resource.js +44 -6
  330. package/dist/Resource.js.map +1 -1
  331. package/dist/Result.d.ts +16 -14
  332. package/dist/Result.d.ts.map +1 -1
  333. package/dist/Result.js +6 -6
  334. package/dist/Result.js.map +1 -1
  335. package/dist/Runtime.d.ts +43 -18
  336. package/dist/Runtime.d.ts.map +1 -1
  337. package/dist/Runtime.js +35 -16
  338. package/dist/Runtime.js.map +1 -1
  339. package/dist/Schedule.d.ts +545 -576
  340. package/dist/Schedule.d.ts.map +1 -1
  341. package/dist/Schedule.js +260 -246
  342. package/dist/Schedule.js.map +1 -1
  343. package/dist/Scheduler.d.ts +43 -6
  344. package/dist/Scheduler.d.ts.map +1 -1
  345. package/dist/Scheduler.js +33 -4
  346. package/dist/Scheduler.js.map +1 -1
  347. package/dist/Schema.d.ts +803 -282
  348. package/dist/Schema.d.ts.map +1 -1
  349. package/dist/Schema.js +281 -189
  350. package/dist/Schema.js.map +1 -1
  351. package/dist/SchemaAST.d.ts +24 -15
  352. package/dist/SchemaAST.d.ts.map +1 -1
  353. package/dist/SchemaAST.js +13 -9
  354. package/dist/SchemaAST.js.map +1 -1
  355. package/dist/SchemaGetter.d.ts +26 -13
  356. package/dist/SchemaGetter.d.ts.map +1 -1
  357. package/dist/SchemaGetter.js +22 -9
  358. package/dist/SchemaGetter.js.map +1 -1
  359. package/dist/SchemaIssue.d.ts +1 -8
  360. package/dist/SchemaIssue.d.ts.map +1 -1
  361. package/dist/SchemaIssue.js.map +1 -1
  362. package/dist/SchemaParser.d.ts +194 -25
  363. package/dist/SchemaParser.d.ts.map +1 -1
  364. package/dist/SchemaParser.js +220 -26
  365. package/dist/SchemaParser.js.map +1 -1
  366. package/dist/SchemaTransformation.d.ts +61 -41
  367. package/dist/SchemaTransformation.d.ts.map +1 -1
  368. package/dist/SchemaTransformation.js +56 -33
  369. package/dist/SchemaTransformation.js.map +1 -1
  370. package/dist/SchemaUtils.d.ts +7 -0
  371. package/dist/SchemaUtils.d.ts.map +1 -1
  372. package/dist/SchemaUtils.js +23 -0
  373. package/dist/SchemaUtils.js.map +1 -1
  374. package/dist/Scope.d.ts +102 -43
  375. package/dist/Scope.d.ts.map +1 -1
  376. package/dist/Scope.js +57 -23
  377. package/dist/Scope.js.map +1 -1
  378. package/dist/ScopedCache.d.ts +138 -46
  379. package/dist/ScopedCache.d.ts.map +1 -1
  380. package/dist/ScopedCache.js +80 -19
  381. package/dist/ScopedCache.js.map +1 -1
  382. package/dist/ScopedRef.d.ts +28 -8
  383. package/dist/ScopedRef.d.ts.map +1 -1
  384. package/dist/ScopedRef.js +25 -5
  385. package/dist/ScopedRef.js.map +1 -1
  386. package/dist/Semaphore.d.ts +64 -28
  387. package/dist/Semaphore.d.ts.map +1 -1
  388. package/dist/Semaphore.js +22 -13
  389. package/dist/Semaphore.js.map +1 -1
  390. package/dist/Sink.d.ts +458 -200
  391. package/dist/Sink.d.ts.map +1 -1
  392. package/dist/Sink.js +240 -89
  393. package/dist/Sink.js.map +1 -1
  394. package/dist/Stdio.d.ts +43 -6
  395. package/dist/Stdio.d.ts.map +1 -1
  396. package/dist/Stdio.js +33 -4
  397. package/dist/Stdio.js.map +1 -1
  398. package/dist/Stream.d.ts +1896 -1183
  399. package/dist/Stream.d.ts.map +1 -1
  400. package/dist/Stream.js +867 -524
  401. package/dist/Stream.js.map +1 -1
  402. package/dist/String.d.ts +171 -95
  403. package/dist/String.d.ts.map +1 -1
  404. package/dist/String.js +125 -67
  405. package/dist/String.js.map +1 -1
  406. package/dist/SubscriptionRef.d.ts +308 -203
  407. package/dist/SubscriptionRef.d.ts.map +1 -1
  408. package/dist/SubscriptionRef.js +125 -76
  409. package/dist/SubscriptionRef.js.map +1 -1
  410. package/dist/Symbol.d.ts +13 -5
  411. package/dist/Symbol.d.ts.map +1 -1
  412. package/dist/Symbol.js +13 -5
  413. package/dist/Symbol.js.map +1 -1
  414. package/dist/SynchronizedRef.d.ts +278 -62
  415. package/dist/SynchronizedRef.d.ts.map +1 -1
  416. package/dist/SynchronizedRef.js +116 -23
  417. package/dist/SynchronizedRef.js.map +1 -1
  418. package/dist/Take.d.ts +26 -2
  419. package/dist/Take.d.ts.map +1 -1
  420. package/dist/Take.js +4 -1
  421. package/dist/Take.js.map +1 -1
  422. package/dist/Terminal.d.ts +39 -7
  423. package/dist/Terminal.d.ts.map +1 -1
  424. package/dist/Terminal.js +10 -4
  425. package/dist/Terminal.js.map +1 -1
  426. package/dist/Tracer.d.ts +229 -55
  427. package/dist/Tracer.d.ts.map +1 -1
  428. package/dist/Tracer.js +94 -18
  429. package/dist/Tracer.js.map +1 -1
  430. package/dist/Trie.d.ts +213 -142
  431. package/dist/Trie.d.ts.map +1 -1
  432. package/dist/Trie.js +88 -60
  433. package/dist/Trie.js.map +1 -1
  434. package/dist/TxChunk.d.ts +182 -146
  435. package/dist/TxChunk.d.ts.map +1 -1
  436. package/dist/TxChunk.js +73 -56
  437. package/dist/TxChunk.js.map +1 -1
  438. package/dist/TxDeferred.d.ts +43 -29
  439. package/dist/TxDeferred.d.ts.map +1 -1
  440. package/dist/TxDeferred.js +22 -15
  441. package/dist/TxDeferred.js.map +1 -1
  442. package/dist/TxHashMap.d.ts +362 -222
  443. package/dist/TxHashMap.d.ts.map +1 -1
  444. package/dist/TxHashMap.js +171 -98
  445. package/dist/TxHashMap.js.map +1 -1
  446. package/dist/TxHashSet.d.ts +178 -104
  447. package/dist/TxHashSet.d.ts.map +1 -1
  448. package/dist/TxHashSet.js +84 -43
  449. package/dist/TxHashSet.js.map +1 -1
  450. package/dist/TxPriorityQueue.d.ts +93 -62
  451. package/dist/TxPriorityQueue.d.ts.map +1 -1
  452. package/dist/TxPriorityQueue.js +54 -36
  453. package/dist/TxPriorityQueue.js.map +1 -1
  454. package/dist/TxPubSub.d.ts +77 -49
  455. package/dist/TxPubSub.d.ts.map +1 -1
  456. package/dist/TxPubSub.js +60 -37
  457. package/dist/TxPubSub.js.map +1 -1
  458. package/dist/TxQueue.d.ts +279 -241
  459. package/dist/TxQueue.d.ts.map +1 -1
  460. package/dist/TxQueue.js +147 -101
  461. package/dist/TxQueue.js.map +1 -1
  462. package/dist/TxReentrantLock.d.ts +69 -46
  463. package/dist/TxReentrantLock.d.ts.map +1 -1
  464. package/dist/TxReentrantLock.js +48 -32
  465. package/dist/TxReentrantLock.js.map +1 -1
  466. package/dist/TxRef.d.ts +69 -40
  467. package/dist/TxRef.d.ts.map +1 -1
  468. package/dist/TxRef.js +34 -19
  469. package/dist/TxRef.js.map +1 -1
  470. package/dist/TxSemaphore.d.ts +101 -54
  471. package/dist/TxSemaphore.d.ts.map +1 -1
  472. package/dist/TxSemaphore.js +76 -34
  473. package/dist/TxSemaphore.js.map +1 -1
  474. package/dist/TxSubscriptionRef.d.ts +72 -48
  475. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  476. package/dist/TxSubscriptionRef.js +33 -22
  477. package/dist/TxSubscriptionRef.js.map +1 -1
  478. package/dist/Types.d.ts +34 -34
  479. package/dist/UndefinedOr.d.ts +48 -25
  480. package/dist/UndefinedOr.d.ts.map +1 -1
  481. package/dist/UndefinedOr.js +28 -25
  482. package/dist/UndefinedOr.js.map +1 -1
  483. package/dist/Unify.d.ts +71 -116
  484. package/dist/Unify.d.ts.map +1 -1
  485. package/dist/Unify.js +20 -6
  486. package/dist/Unify.js.map +1 -1
  487. package/dist/Utils.d.ts +4 -0
  488. package/dist/Utils.d.ts.map +1 -1
  489. package/dist/Utils.js +4 -0
  490. package/dist/Utils.js.map +1 -1
  491. package/dist/index.d.ts +81 -32
  492. package/dist/index.d.ts.map +1 -1
  493. package/dist/index.js +81 -32
  494. package/dist/index.js.map +1 -1
  495. package/dist/internal/schema/schema.js +1 -1
  496. package/dist/internal/schema/schema.js.map +1 -1
  497. package/dist/testing/FastCheck.d.ts +6 -3
  498. package/dist/testing/FastCheck.d.ts.map +1 -1
  499. package/dist/testing/FastCheck.js +6 -3
  500. package/dist/testing/FastCheck.js.map +1 -1
  501. package/dist/testing/TestClock.d.ts +39 -34
  502. package/dist/testing/TestClock.d.ts.map +1 -1
  503. package/dist/testing/TestClock.js +42 -12
  504. package/dist/testing/TestClock.js.map +1 -1
  505. package/dist/testing/TestConsole.d.ts +39 -30
  506. package/dist/testing/TestConsole.d.ts.map +1 -1
  507. package/dist/testing/TestConsole.js +25 -10
  508. package/dist/testing/TestConsole.js.map +1 -1
  509. package/dist/testing/TestSchema.js +7 -7
  510. package/dist/testing/TestSchema.js.map +1 -1
  511. package/dist/unstable/ai/AiError.d.ts +197 -130
  512. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  513. package/dist/unstable/ai/AiError.js +166 -102
  514. package/dist/unstable/ai/AiError.js.map +1 -1
  515. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  516. package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
  517. package/dist/unstable/ai/Chat.d.ts +65 -41
  518. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  519. package/dist/unstable/ai/Chat.js +51 -33
  520. package/dist/unstable/ai/Chat.js.map +1 -1
  521. package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
  522. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
  523. package/dist/unstable/ai/EmbeddingModel.js +9 -8
  524. package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
  525. package/dist/unstable/ai/IdGenerator.d.ts +28 -18
  526. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  527. package/dist/unstable/ai/IdGenerator.js +18 -11
  528. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  529. package/dist/unstable/ai/LanguageModel.d.ts +31 -25
  530. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  531. package/dist/unstable/ai/LanguageModel.js +20 -14
  532. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  533. package/dist/unstable/ai/McpSchema.d.ts +339 -119
  534. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  535. package/dist/unstable/ai/McpSchema.js +264 -98
  536. package/dist/unstable/ai/McpSchema.js.map +1 -1
  537. package/dist/unstable/ai/McpServer.d.ts +53 -19
  538. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  539. package/dist/unstable/ai/McpServer.js +63 -15
  540. package/dist/unstable/ai/McpServer.js.map +1 -1
  541. package/dist/unstable/ai/Model.d.ts +8 -6
  542. package/dist/unstable/ai/Model.d.ts.map +1 -1
  543. package/dist/unstable/ai/Model.js +7 -5
  544. package/dist/unstable/ai/Model.js.map +1 -1
  545. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  546. package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
  547. package/dist/unstable/ai/Prompt.d.ts +194 -168
  548. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  549. package/dist/unstable/ai/Prompt.js +75 -66
  550. package/dist/unstable/ai/Prompt.js.map +1 -1
  551. package/dist/unstable/ai/Response.d.ts +153 -140
  552. package/dist/unstable/ai/Response.d.ts.map +1 -1
  553. package/dist/unstable/ai/Response.js +43 -48
  554. package/dist/unstable/ai/Response.js.map +1 -1
  555. package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
  556. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
  557. package/dist/unstable/ai/ResponseIdTracker.js +27 -2
  558. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  559. package/dist/unstable/ai/Telemetry.d.ts +42 -32
  560. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  561. package/dist/unstable/ai/Telemetry.js +14 -10
  562. package/dist/unstable/ai/Telemetry.js.map +1 -1
  563. package/dist/unstable/ai/Tokenizer.d.ts +13 -8
  564. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  565. package/dist/unstable/ai/Tokenizer.js +10 -6
  566. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  567. package/dist/unstable/ai/Tool.d.ts +153 -84
  568. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  569. package/dist/unstable/ai/Tool.js +97 -44
  570. package/dist/unstable/ai/Tool.js.map +1 -1
  571. package/dist/unstable/ai/Toolkit.d.ts +32 -39
  572. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  573. package/dist/unstable/ai/Toolkit.js +7 -5
  574. package/dist/unstable/ai/Toolkit.js.map +1 -1
  575. package/dist/unstable/ai/index.d.ts +42 -24
  576. package/dist/unstable/ai/index.d.ts.map +1 -1
  577. package/dist/unstable/ai/index.js +42 -24
  578. package/dist/unstable/ai/index.js.map +1 -1
  579. package/dist/unstable/cli/Argument.d.ts +226 -134
  580. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  581. package/dist/unstable/cli/Argument.js +101 -65
  582. package/dist/unstable/cli/Argument.js.map +1 -1
  583. package/dist/unstable/cli/CliError.d.ts +72 -26
  584. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  585. package/dist/unstable/cli/CliError.js +86 -23
  586. package/dist/unstable/cli/CliError.js.map +1 -1
  587. package/dist/unstable/cli/CliOutput.d.ts +43 -13
  588. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  589. package/dist/unstable/cli/CliOutput.js +30 -6
  590. package/dist/unstable/cli/CliOutput.js.map +1 -1
  591. package/dist/unstable/cli/Command.d.ts +194 -113
  592. package/dist/unstable/cli/Command.d.ts.map +1 -1
  593. package/dist/unstable/cli/Command.js +45 -31
  594. package/dist/unstable/cli/Command.js.map +1 -1
  595. package/dist/unstable/cli/Completions.d.ts +7 -7
  596. package/dist/unstable/cli/Completions.js +1 -1
  597. package/dist/unstable/cli/Flag.d.ts +235 -142
  598. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  599. package/dist/unstable/cli/Flag.js +111 -71
  600. package/dist/unstable/cli/Flag.js.map +1 -1
  601. package/dist/unstable/cli/GlobalFlag.d.ts +41 -13
  602. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  603. package/dist/unstable/cli/GlobalFlag.js +30 -7
  604. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  605. package/dist/unstable/cli/HelpDoc.d.ts +35 -10
  606. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  607. package/dist/unstable/cli/HelpDoc.js +21 -0
  608. package/dist/unstable/cli/Param.d.ts +79 -31
  609. package/dist/unstable/cli/Param.d.ts.map +1 -1
  610. package/dist/unstable/cli/Param.js +160 -98
  611. package/dist/unstable/cli/Param.js.map +1 -1
  612. package/dist/unstable/cli/Primitive.d.ts +79 -42
  613. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  614. package/dist/unstable/cli/Primitive.js +66 -35
  615. package/dist/unstable/cli/Primitive.js.map +1 -1
  616. package/dist/unstable/cli/Prompt.d.ts +177 -45
  617. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  618. package/dist/unstable/cli/Prompt.js +103 -21
  619. package/dist/unstable/cli/Prompt.js.map +1 -1
  620. package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
  621. package/dist/unstable/cli/internal/ansi.js +13 -0
  622. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  623. package/dist/unstable/cli/internal/command.d.ts +5 -1
  624. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  625. package/dist/unstable/cli/internal/command.js +5 -1
  626. package/dist/unstable/cli/internal/command.js.map +1 -1
  627. package/dist/unstable/cli/internal/config.d.ts +3 -0
  628. package/dist/unstable/cli/internal/config.d.ts.map +1 -1
  629. package/dist/unstable/cli/internal/config.js.map +1 -1
  630. package/dist/unstable/cli/internal/lexer.js.map +1 -1
  631. package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
  632. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  633. package/dist/unstable/cluster/ClusterCron.js +35 -1
  634. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  635. package/dist/unstable/cluster/ClusterError.d.ts +56 -7
  636. package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
  637. package/dist/unstable/cluster/ClusterError.js +56 -7
  638. package/dist/unstable/cluster/ClusterError.js.map +1 -1
  639. package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
  640. package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
  641. package/dist/unstable/cluster/ClusterMetrics.js +39 -5
  642. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  643. package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
  644. package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
  645. package/dist/unstable/cluster/ClusterSchema.js +61 -8
  646. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  647. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
  648. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  649. package/dist/unstable/cluster/ClusterWorkflowEngine.js +35 -2
  650. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  651. package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
  652. package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
  653. package/dist/unstable/cluster/DeliverAt.js +11 -3
  654. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  655. package/dist/unstable/cluster/Entity.d.ts +75 -16
  656. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  657. package/dist/unstable/cluster/Entity.js +75 -10
  658. package/dist/unstable/cluster/Entity.js.map +1 -1
  659. package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
  660. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  661. package/dist/unstable/cluster/EntityAddress.js +30 -2
  662. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  663. package/dist/unstable/cluster/EntityId.d.ts +18 -3
  664. package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
  665. package/dist/unstable/cluster/EntityId.js +15 -2
  666. package/dist/unstable/cluster/EntityId.js.map +1 -1
  667. package/dist/unstable/cluster/EntityProxy.d.ts +34 -2
  668. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  669. package/dist/unstable/cluster/EntityProxy.js +24 -2
  670. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  671. package/dist/unstable/cluster/EntityProxyServer.d.ts +17 -2
  672. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  673. package/dist/unstable/cluster/EntityProxyServer.js +40 -8
  674. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  675. package/dist/unstable/cluster/EntityResource.d.ts +43 -6
  676. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  677. package/dist/unstable/cluster/EntityResource.js +11 -4
  678. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  679. package/dist/unstable/cluster/EntityType.d.ts +27 -3
  680. package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
  681. package/dist/unstable/cluster/EntityType.js +24 -2
  682. package/dist/unstable/cluster/EntityType.js.map +1 -1
  683. package/dist/unstable/cluster/Envelope.d.ts +105 -23
  684. package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
  685. package/dist/unstable/cluster/Envelope.js +88 -14
  686. package/dist/unstable/cluster/Envelope.js.map +1 -1
  687. package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
  688. package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
  689. package/dist/unstable/cluster/HttpRunner.js +88 -13
  690. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  691. package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
  692. package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
  693. package/dist/unstable/cluster/K8sHttpClient.js +31 -6
  694. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  695. package/dist/unstable/cluster/MachineId.d.ts +24 -3
  696. package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
  697. package/dist/unstable/cluster/MachineId.js +21 -2
  698. package/dist/unstable/cluster/MachineId.js.map +1 -1
  699. package/dist/unstable/cluster/Message.d.ts +102 -13
  700. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  701. package/dist/unstable/cluster/Message.js +86 -10
  702. package/dist/unstable/cluster/Message.js.map +1 -1
  703. package/dist/unstable/cluster/MessageStorage.d.ts +127 -21
  704. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  705. package/dist/unstable/cluster/MessageStorage.js +70 -10
  706. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  707. package/dist/unstable/cluster/Reply.d.ts +101 -12
  708. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  709. package/dist/unstable/cluster/Reply.js +64 -8
  710. package/dist/unstable/cluster/Reply.js.map +1 -1
  711. package/dist/unstable/cluster/Runner.d.ts +47 -17
  712. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  713. package/dist/unstable/cluster/Runner.js +47 -17
  714. package/dist/unstable/cluster/Runner.js.map +1 -1
  715. package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
  716. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  717. package/dist/unstable/cluster/RunnerAddress.js +34 -2
  718. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  719. package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
  720. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  721. package/dist/unstable/cluster/RunnerHealth.js +40 -12
  722. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  723. package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
  724. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  725. package/dist/unstable/cluster/RunnerServer.js +31 -4
  726. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  727. package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
  728. package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
  729. package/dist/unstable/cluster/RunnerStorage.js +38 -4
  730. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  731. package/dist/unstable/cluster/Runners.d.ts +73 -10
  732. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  733. package/dist/unstable/cluster/Runners.js +70 -9
  734. package/dist/unstable/cluster/Runners.js.map +1 -1
  735. package/dist/unstable/cluster/ShardId.d.ts +51 -5
  736. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  737. package/dist/unstable/cluster/ShardId.js +47 -4
  738. package/dist/unstable/cluster/ShardId.js.map +1 -1
  739. package/dist/unstable/cluster/Sharding.d.ts +10 -2
  740. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  741. package/dist/unstable/cluster/Sharding.js +35 -4
  742. package/dist/unstable/cluster/Sharding.js.map +1 -1
  743. package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
  744. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  745. package/dist/unstable/cluster/ShardingConfig.js +66 -9
  746. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  747. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
  748. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
  749. package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
  750. package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
  751. package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
  752. package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
  753. package/dist/unstable/cluster/SingleRunner.js +23 -1
  754. package/dist/unstable/cluster/SingleRunner.js.map +1 -1
  755. package/dist/unstable/cluster/Singleton.d.ts +15 -1
  756. package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
  757. package/dist/unstable/cluster/Singleton.js +15 -1
  758. package/dist/unstable/cluster/Singleton.js.map +1 -1
  759. package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
  760. package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
  761. package/dist/unstable/cluster/SingletonAddress.js +21 -1
  762. package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
  763. package/dist/unstable/cluster/Snowflake.d.ts +89 -19
  764. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  765. package/dist/unstable/cluster/Snowflake.js +48 -13
  766. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  767. package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
  768. package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
  769. package/dist/unstable/cluster/SocketRunner.js +29 -2
  770. package/dist/unstable/cluster/SocketRunner.js.map +1 -1
  771. package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
  772. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  773. package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
  774. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  775. package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
  776. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  777. package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
  778. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  779. package/dist/unstable/cluster/TestRunner.d.ts +18 -1
  780. package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
  781. package/dist/unstable/cluster/TestRunner.js +18 -1
  782. package/dist/unstable/cluster/TestRunner.js.map +1 -1
  783. package/dist/unstable/cluster/internal/hash.js +12 -0
  784. package/dist/unstable/cluster/internal/hash.js.map +1 -1
  785. package/dist/unstable/devtools/DevTools.d.ts +26 -3
  786. package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
  787. package/dist/unstable/devtools/DevTools.js +26 -3
  788. package/dist/unstable/devtools/DevTools.js.map +1 -1
  789. package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
  790. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  791. package/dist/unstable/devtools/DevToolsClient.js +32 -5
  792. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  793. package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
  794. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  795. package/dist/unstable/devtools/DevToolsSchema.js +102 -20
  796. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  797. package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
  798. package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
  799. package/dist/unstable/devtools/DevToolsServer.js +21 -1
  800. package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
  801. package/dist/unstable/encoding/Msgpack.d.ts +81 -12
  802. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  803. package/dist/unstable/encoding/Msgpack.js +75 -9
  804. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  805. package/dist/unstable/encoding/Ndjson.d.ts +149 -21
  806. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  807. package/dist/unstable/encoding/Ndjson.js +97 -13
  808. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  809. package/dist/unstable/encoding/Sse.d.ts +109 -18
  810. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  811. package/dist/unstable/encoding/Sse.js +69 -13
  812. package/dist/unstable/encoding/Sse.js.map +1 -1
  813. package/dist/unstable/eventlog/Event.d.ts +115 -30
  814. package/dist/unstable/eventlog/Event.d.ts.map +1 -1
  815. package/dist/unstable/eventlog/Event.js +22 -2
  816. package/dist/unstable/eventlog/Event.js.map +1 -1
  817. package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
  818. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  819. package/dist/unstable/eventlog/EventGroup.js +24 -6
  820. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  821. package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
  822. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  823. package/dist/unstable/eventlog/EventJournal.js +108 -16
  824. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  825. package/dist/unstable/eventlog/EventLog.d.ts +151 -31
  826. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  827. package/dist/unstable/eventlog/EventLog.js +111 -20
  828. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  829. package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
  830. package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
  831. package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
  832. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  833. package/dist/unstable/eventlog/EventLogMessage.d.ts +92 -18
  834. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
  835. package/dist/unstable/eventlog/EventLogMessage.js +72 -16
  836. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
  837. package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
  838. package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
  839. package/dist/unstable/eventlog/EventLogRemote.js +54 -8
  840. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  841. package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
  842. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  843. package/dist/unstable/eventlog/EventLogServer.js +17 -3
  844. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  845. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
  846. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  847. package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
  848. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  849. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
  850. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  851. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
  852. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  853. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
  854. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
  855. package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
  856. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
  857. package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
  858. package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
  859. package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
  860. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
  861. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
  862. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
  863. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
  864. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
  865. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
  866. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
  867. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
  868. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  869. package/dist/unstable/http/Cookies.d.ts +156 -77
  870. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  871. package/dist/unstable/http/Cookies.js +93 -39
  872. package/dist/unstable/http/Cookies.js.map +1 -1
  873. package/dist/unstable/http/Etag.d.ts +40 -7
  874. package/dist/unstable/http/Etag.d.ts.map +1 -1
  875. package/dist/unstable/http/Etag.js +27 -4
  876. package/dist/unstable/http/Etag.js.map +1 -1
  877. package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
  878. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  879. package/dist/unstable/http/FetchHttpClient.js +33 -4
  880. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  881. package/dist/unstable/http/FindMyWay.d.ts +1 -1
  882. package/dist/unstable/http/FindMyWay.js +1 -1
  883. package/dist/unstable/http/Headers.d.ts +182 -36
  884. package/dist/unstable/http/Headers.d.ts.map +1 -1
  885. package/dist/unstable/http/Headers.js +86 -16
  886. package/dist/unstable/http/Headers.js.map +1 -1
  887. package/dist/unstable/http/HttpBody.d.ts +114 -26
  888. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  889. package/dist/unstable/http/HttpBody.js +98 -20
  890. package/dist/unstable/http/HttpBody.js.map +1 -1
  891. package/dist/unstable/http/HttpClient.d.ts +205 -96
  892. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  893. package/dist/unstable/http/HttpClient.js +84 -38
  894. package/dist/unstable/http/HttpClient.js.map +1 -1
  895. package/dist/unstable/http/HttpClientError.d.ts +68 -12
  896. package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
  897. package/dist/unstable/http/HttpClientError.js +71 -9
  898. package/dist/unstable/http/HttpClientError.js.map +1 -1
  899. package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
  900. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  901. package/dist/unstable/http/HttpClientRequest.js +151 -45
  902. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  903. package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
  904. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  905. package/dist/unstable/http/HttpClientResponse.js +44 -11
  906. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  907. package/dist/unstable/http/HttpEffect.d.ts +42 -16
  908. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  909. package/dist/unstable/http/HttpEffect.js +33 -13
  910. package/dist/unstable/http/HttpEffect.js.map +1 -1
  911. package/dist/unstable/http/HttpIncomingMessage.d.ts +47 -7
  912. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  913. package/dist/unstable/http/HttpIncomingMessage.js +44 -6
  914. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  915. package/dist/unstable/http/HttpMethod.d.ts +35 -5
  916. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  917. package/dist/unstable/http/HttpMethod.js +23 -1
  918. package/dist/unstable/http/HttpMethod.js.map +1 -1
  919. package/dist/unstable/http/HttpMiddleware.d.ts +37 -11
  920. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  921. package/dist/unstable/http/HttpMiddleware.js +52 -10
  922. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  923. package/dist/unstable/http/HttpPlatform.d.ts +34 -3
  924. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  925. package/dist/unstable/http/HttpPlatform.js +34 -3
  926. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  927. package/dist/unstable/http/HttpRouter.d.ts +194 -45
  928. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  929. package/dist/unstable/http/HttpRouter.js +118 -24
  930. package/dist/unstable/http/HttpRouter.js.map +1 -1
  931. package/dist/unstable/http/HttpServer.d.ts +151 -22
  932. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  933. package/dist/unstable/http/HttpServer.js +76 -11
  934. package/dist/unstable/http/HttpServer.js.map +1 -1
  935. package/dist/unstable/http/HttpServerError.d.ts +90 -10
  936. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  937. package/dist/unstable/http/HttpServerError.js +82 -8
  938. package/dist/unstable/http/HttpServerError.js.map +1 -1
  939. package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
  940. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  941. package/dist/unstable/http/HttpServerRequest.js +101 -20
  942. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  943. package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
  944. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  945. package/dist/unstable/http/HttpServerRespondable.js +43 -5
  946. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  947. package/dist/unstable/http/HttpServerResponse.d.ts +390 -67
  948. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  949. package/dist/unstable/http/HttpServerResponse.js +204 -33
  950. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  951. package/dist/unstable/http/HttpStaticServer.d.ts +22 -4
  952. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  953. package/dist/unstable/http/HttpStaticServer.js +22 -4
  954. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  955. package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
  956. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  957. package/dist/unstable/http/HttpTraceContext.js +47 -5
  958. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  959. package/dist/unstable/http/Multipart.d.ts +178 -28
  960. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  961. package/dist/unstable/http/Multipart.js +129 -19
  962. package/dist/unstable/http/Multipart.js.map +1 -1
  963. package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
  964. package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
  965. package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
  966. package/dist/unstable/http/Multipasta/Node.js +1 -1
  967. package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
  968. package/dist/unstable/http/Multipasta/Search.js +1 -1
  969. package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
  970. package/dist/unstable/http/Multipasta/Web.js +1 -1
  971. package/dist/unstable/http/Multipasta.d.ts +1 -1
  972. package/dist/unstable/http/Multipasta.js +1 -1
  973. package/dist/unstable/http/Template.d.ts +53 -0
  974. package/dist/unstable/http/Template.d.ts.map +1 -1
  975. package/dist/unstable/http/Template.js +26 -0
  976. package/dist/unstable/http/Template.js.map +1 -1
  977. package/dist/unstable/http/Url.d.ts +56 -42
  978. package/dist/unstable/http/Url.d.ts.map +1 -1
  979. package/dist/unstable/http/Url.js +29 -15
  980. package/dist/unstable/http/Url.js.map +1 -1
  981. package/dist/unstable/http/UrlParams.d.ts +233 -49
  982. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  983. package/dist/unstable/http/UrlParams.js +116 -23
  984. package/dist/unstable/http/UrlParams.js.map +1 -1
  985. package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
  986. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  987. package/dist/unstable/httpapi/HttpApi.js +14 -8
  988. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  989. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +55 -16
  990. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  991. package/dist/unstable/httpapi/HttpApiBuilder.js +44 -6
  992. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  993. package/dist/unstable/httpapi/HttpApiClient.d.ts +58 -15
  994. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  995. package/dist/unstable/httpapi/HttpApiClient.js +42 -6
  996. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  997. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
  998. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  999. package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
  1000. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  1001. package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
  1002. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  1003. package/dist/unstable/httpapi/HttpApiError.js +98 -1
  1004. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  1005. package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
  1006. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  1007. package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
  1008. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  1009. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +111 -22
  1010. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  1011. package/dist/unstable/httpapi/HttpApiMiddleware.js +47 -5
  1012. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  1013. package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
  1014. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  1015. package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
  1016. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  1017. package/dist/unstable/httpapi/HttpApiSchema.d.ts +67 -30
  1018. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  1019. package/dist/unstable/httpapi/HttpApiSchema.js +48 -27
  1020. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  1021. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +74 -17
  1022. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  1023. package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
  1024. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  1025. package/dist/unstable/httpapi/HttpApiSwagger.d.ts +5 -2
  1026. package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
  1027. package/dist/unstable/httpapi/HttpApiSwagger.js +24 -2
  1028. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  1029. package/dist/unstable/httpapi/HttpApiTest.d.ts +6 -1
  1030. package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
  1031. package/dist/unstable/httpapi/HttpApiTest.js +26 -1
  1032. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  1033. package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
  1034. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  1035. package/dist/unstable/httpapi/OpenApi.js +73 -15
  1036. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  1037. package/dist/unstable/observability/Otlp.d.ts +33 -3
  1038. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  1039. package/dist/unstable/observability/Otlp.js +14 -3
  1040. package/dist/unstable/observability/Otlp.js.map +1 -1
  1041. package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
  1042. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  1043. package/dist/unstable/observability/OtlpExporter.js +32 -1
  1044. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  1045. package/dist/unstable/observability/OtlpLogger.d.ts +14 -2
  1046. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  1047. package/dist/unstable/observability/OtlpLogger.js +29 -2
  1048. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  1049. package/dist/unstable/observability/OtlpMetrics.d.ts +15 -4
  1050. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  1051. package/dist/unstable/observability/OtlpMetrics.js +32 -2
  1052. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  1053. package/dist/unstable/observability/OtlpResource.d.ts +49 -12
  1054. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  1055. package/dist/unstable/observability/OtlpResource.js +47 -5
  1056. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  1057. package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
  1058. package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
  1059. package/dist/unstable/observability/OtlpSerialization.js +28 -3
  1060. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  1061. package/dist/unstable/observability/OtlpTracer.d.ts +16 -2
  1062. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  1063. package/dist/unstable/observability/OtlpTracer.js +32 -2
  1064. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  1065. package/dist/unstable/observability/PrometheusMetrics.d.ts +32 -12
  1066. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  1067. package/dist/unstable/observability/PrometheusMetrics.js +7 -5
  1068. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  1069. package/dist/unstable/observability/index.d.ts +2 -1
  1070. package/dist/unstable/observability/index.d.ts.map +1 -1
  1071. package/dist/unstable/observability/index.js +2 -1
  1072. package/dist/unstable/observability/index.js.map +1 -1
  1073. package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
  1074. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  1075. package/dist/unstable/persistence/KeyValueStore.js +81 -21
  1076. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  1077. package/dist/unstable/persistence/Persistable.d.ts +76 -15
  1078. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  1079. package/dist/unstable/persistence/Persistable.js +22 -5
  1080. package/dist/unstable/persistence/Persistable.js.map +1 -1
  1081. package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
  1082. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  1083. package/dist/unstable/persistence/PersistedCache.js +24 -1
  1084. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  1085. package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
  1086. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  1087. package/dist/unstable/persistence/PersistedQueue.js +60 -13
  1088. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  1089. package/dist/unstable/persistence/Persistence.d.ts +97 -16
  1090. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  1091. package/dist/unstable/persistence/Persistence.js +90 -14
  1092. package/dist/unstable/persistence/Persistence.js.map +1 -1
  1093. package/dist/unstable/persistence/RateLimiter.d.ts +97 -21
  1094. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  1095. package/dist/unstable/persistence/RateLimiter.js +81 -16
  1096. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  1097. package/dist/unstable/persistence/Redis.d.ts +26 -5
  1098. package/dist/unstable/persistence/Redis.d.ts.map +1 -1
  1099. package/dist/unstable/persistence/Redis.js +36 -4
  1100. package/dist/unstable/persistence/Redis.js.map +1 -1
  1101. package/dist/unstable/process/ChildProcess.d.ts +87 -64
  1102. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1103. package/dist/unstable/process/ChildProcess.js +24 -17
  1104. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1105. package/dist/unstable/process/ChildProcessSpawner.d.ts +22 -11
  1106. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1107. package/dist/unstable/process/ChildProcessSpawner.js +11 -6
  1108. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1109. package/dist/unstable/process/index.d.ts +2 -1
  1110. package/dist/unstable/process/index.d.ts.map +1 -1
  1111. package/dist/unstable/process/index.js +2 -1
  1112. package/dist/unstable/process/index.js.map +1 -1
  1113. package/dist/unstable/reactivity/AsyncResult.d.ts +196 -59
  1114. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  1115. package/dist/unstable/reactivity/AsyncResult.js +121 -36
  1116. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1117. package/dist/unstable/reactivity/Atom.d.ts +539 -130
  1118. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1119. package/dist/unstable/reactivity/Atom.js +252 -58
  1120. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1121. package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
  1122. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1123. package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
  1124. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1125. package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
  1126. package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
  1127. package/dist/unstable/reactivity/AtomRef.js +29 -3
  1128. package/dist/unstable/reactivity/AtomRef.js.map +1 -1
  1129. package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
  1130. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  1131. package/dist/unstable/reactivity/AtomRegistry.js +69 -10
  1132. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1133. package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
  1134. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1135. package/dist/unstable/reactivity/AtomRpc.js +29 -1
  1136. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1137. package/dist/unstable/reactivity/Hydration.d.ts +28 -5
  1138. package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
  1139. package/dist/unstable/reactivity/Hydration.js +35 -3
  1140. package/dist/unstable/reactivity/Hydration.js.map +1 -1
  1141. package/dist/unstable/reactivity/Reactivity.d.ts +95 -13
  1142. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  1143. package/dist/unstable/reactivity/Reactivity.js +61 -7
  1144. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1145. package/dist/unstable/rpc/Rpc.d.ts +255 -56
  1146. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1147. package/dist/unstable/rpc/Rpc.js +44 -11
  1148. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1149. package/dist/unstable/rpc/RpcClient.d.ts +81 -19
  1150. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1151. package/dist/unstable/rpc/RpcClient.js +52 -12
  1152. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1153. package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
  1154. package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
  1155. package/dist/unstable/rpc/RpcClientError.js +26 -2
  1156. package/dist/unstable/rpc/RpcClientError.js.map +1 -1
  1157. package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
  1158. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  1159. package/dist/unstable/rpc/RpcGroup.js +3 -1
  1160. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1161. package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
  1162. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  1163. package/dist/unstable/rpc/RpcMessage.js +23 -7
  1164. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  1165. package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
  1166. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  1167. package/dist/unstable/rpc/RpcMiddleware.js +39 -3
  1168. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1169. package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
  1170. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  1171. package/dist/unstable/rpc/RpcSchema.js +34 -3
  1172. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1173. package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
  1174. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1175. package/dist/unstable/rpc/RpcSerialization.js +56 -12
  1176. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1177. package/dist/unstable/rpc/RpcServer.d.ts +73 -23
  1178. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  1179. package/dist/unstable/rpc/RpcServer.js +69 -22
  1180. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1181. package/dist/unstable/rpc/RpcTest.d.ts +20 -1
  1182. package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
  1183. package/dist/unstable/rpc/RpcTest.js +20 -1
  1184. package/dist/unstable/rpc/RpcTest.js.map +1 -1
  1185. package/dist/unstable/rpc/RpcWorker.d.ts +40 -6
  1186. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  1187. package/dist/unstable/rpc/RpcWorker.js +16 -4
  1188. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1189. package/dist/unstable/rpc/Utils.d.ts +8 -0
  1190. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  1191. package/dist/unstable/rpc/Utils.js +8 -0
  1192. package/dist/unstable/rpc/Utils.js.map +1 -1
  1193. package/dist/unstable/schema/Model.d.ts +130 -52
  1194. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1195. package/dist/unstable/schema/Model.js +79 -34
  1196. package/dist/unstable/schema/Model.js.map +1 -1
  1197. package/dist/unstable/schema/VariantSchema.d.ts +104 -24
  1198. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  1199. package/dist/unstable/schema/VariantSchema.js +22 -6
  1200. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1201. package/dist/unstable/socket/Socket.d.ts +167 -34
  1202. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1203. package/dist/unstable/socket/Socket.js +123 -28
  1204. package/dist/unstable/socket/Socket.js.map +1 -1
  1205. package/dist/unstable/socket/SocketServer.d.ts +58 -10
  1206. package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
  1207. package/dist/unstable/socket/SocketServer.js +43 -5
  1208. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1209. package/dist/unstable/sql/Migrator.d.ts +35 -4
  1210. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  1211. package/dist/unstable/sql/Migrator.js +44 -4
  1212. package/dist/unstable/sql/Migrator.js.map +1 -1
  1213. package/dist/unstable/sql/SqlClient.d.ts +34 -2
  1214. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1215. package/dist/unstable/sql/SqlClient.js +38 -1
  1216. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1217. package/dist/unstable/sql/SqlConnection.d.ts +31 -0
  1218. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  1219. package/dist/unstable/sql/SqlConnection.js +22 -0
  1220. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1221. package/dist/unstable/sql/SqlError.d.ts +99 -0
  1222. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  1223. package/dist/unstable/sql/SqlError.js +114 -0
  1224. package/dist/unstable/sql/SqlError.js.map +1 -1
  1225. package/dist/unstable/sql/SqlModel.d.ts +26 -5
  1226. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  1227. package/dist/unstable/sql/SqlModel.js +8 -4
  1228. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1229. package/dist/unstable/sql/SqlResolver.d.ts +56 -13
  1230. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  1231. package/dist/unstable/sql/SqlResolver.js +44 -10
  1232. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1233. package/dist/unstable/sql/SqlSchema.d.ts +29 -8
  1234. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  1235. package/dist/unstable/sql/SqlSchema.js +29 -8
  1236. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1237. package/dist/unstable/sql/SqlStream.d.ts +3 -0
  1238. package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
  1239. package/dist/unstable/sql/SqlStream.js +23 -0
  1240. package/dist/unstable/sql/SqlStream.js.map +1 -1
  1241. package/dist/unstable/sql/Statement.d.ts +124 -0
  1242. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  1243. package/dist/unstable/sql/Statement.js +82 -0
  1244. package/dist/unstable/sql/Statement.js.map +1 -1
  1245. package/dist/unstable/sql/index.d.ts +1 -1
  1246. package/dist/unstable/sql/index.js +1 -1
  1247. package/dist/unstable/workers/Transferable.d.ts +65 -13
  1248. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  1249. package/dist/unstable/workers/Transferable.js +53 -10
  1250. package/dist/unstable/workers/Transferable.js.map +1 -1
  1251. package/dist/unstable/workers/Worker.d.ts +60 -8
  1252. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  1253. package/dist/unstable/workers/Worker.js +43 -4
  1254. package/dist/unstable/workers/Worker.js.map +1 -1
  1255. package/dist/unstable/workers/WorkerError.d.ts +31 -9
  1256. package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
  1257. package/dist/unstable/workers/WorkerError.js +44 -7
  1258. package/dist/unstable/workers/WorkerError.js.map +1 -1
  1259. package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
  1260. package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
  1261. package/dist/unstable/workers/WorkerRunner.js +24 -1
  1262. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1263. package/dist/unstable/workers/index.d.ts +1 -1
  1264. package/dist/unstable/workers/index.js +1 -1
  1265. package/dist/unstable/workflow/Activity.d.ts +61 -10
  1266. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  1267. package/dist/unstable/workflow/Activity.js +20 -5
  1268. package/dist/unstable/workflow/Activity.js.map +1 -1
  1269. package/dist/unstable/workflow/DurableClock.d.ts +12 -3
  1270. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  1271. package/dist/unstable/workflow/DurableClock.js +22 -2
  1272. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1273. package/dist/unstable/workflow/DurableDeferred.d.ts +126 -31
  1274. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  1275. package/dist/unstable/workflow/DurableDeferred.js +76 -13
  1276. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1277. package/dist/unstable/workflow/DurableQueue.d.ts +30 -7
  1278. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  1279. package/dist/unstable/workflow/DurableQueue.js +23 -5
  1280. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  1281. package/dist/unstable/workflow/Workflow.d.ts +100 -31
  1282. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1283. package/dist/unstable/workflow/Workflow.js +75 -19
  1284. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1285. package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
  1286. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  1287. package/dist/unstable/workflow/WorkflowEngine.js +16 -4
  1288. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1289. package/dist/unstable/workflow/WorkflowProxy.d.ts +32 -2
  1290. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  1291. package/dist/unstable/workflow/WorkflowProxy.js +2 -2
  1292. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  1293. package/dist/unstable/workflow/WorkflowProxyServer.d.ts +36 -2
  1294. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  1295. package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
  1296. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1297. package/package.json +11 -11
  1298. package/src/Array.ts +113 -67
  1299. package/src/BigDecimal.ts +404 -337
  1300. package/src/BigInt.ts +167 -97
  1301. package/src/Boolean.ts +62 -31
  1302. package/src/Brand.ts +20 -1
  1303. package/src/Cache.ts +331 -164
  1304. package/src/Cause.ts +74 -62
  1305. package/src/Channel.ts +1585 -607
  1306. package/src/ChannelSchema.ts +137 -12
  1307. package/src/Chunk.ts +549 -380
  1308. package/src/Clock.ts +15 -8
  1309. package/src/Combiner.ts +2 -4
  1310. package/src/Config.ts +4 -2
  1311. package/src/ConfigProvider.ts +1 -1
  1312. package/src/Console.ts +88 -58
  1313. package/src/Context.ts +384 -135
  1314. package/src/Cron.ts +111 -48
  1315. package/src/Data.ts +3 -2
  1316. package/src/DateTime.ts +874 -443
  1317. package/src/Deferred.ts +367 -174
  1318. package/src/Differ.ts +42 -0
  1319. package/src/Duration.ts +329 -185
  1320. package/src/Effect.ts +2127 -1957
  1321. package/src/Effectable.ts +37 -2
  1322. package/src/Encoding.ts +78 -28
  1323. package/src/Equivalence.ts +14 -19
  1324. package/src/ErrorReporter.ts +66 -82
  1325. package/src/ExecutionPlan.ts +94 -9
  1326. package/src/Exit.ts +7 -5
  1327. package/src/Fiber.ts +72 -40
  1328. package/src/FiberHandle.ts +156 -56
  1329. package/src/FiberMap.ts +327 -162
  1330. package/src/FiberSet.ts +129 -51
  1331. package/src/FileSystem.ts +106 -74
  1332. package/src/Filter.ts +166 -88
  1333. package/src/Function.ts +154 -86
  1334. package/src/Graph.ts +682 -365
  1335. package/src/HKT.ts +29 -13
  1336. package/src/Hash.ts +31 -18
  1337. package/src/HashMap.ts +444 -256
  1338. package/src/HashRing.ts +94 -17
  1339. package/src/HashSet.ts +194 -104
  1340. package/src/Inspectable.ts +22 -10
  1341. package/src/Iterable.ts +309 -149
  1342. package/src/JsonPatch.ts +4 -3
  1343. package/src/Latch.ts +98 -15
  1344. package/src/Layer.ts +487 -344
  1345. package/src/LayerMap.ts +95 -21
  1346. package/src/LogLevel.ts +92 -131
  1347. package/src/Logger.ts +357 -288
  1348. package/src/ManagedRuntime.ts +75 -17
  1349. package/src/Match.ts +133 -157
  1350. package/src/Metric.ts +355 -304
  1351. package/src/MutableHashMap.ts +161 -84
  1352. package/src/MutableHashSet.ts +122 -52
  1353. package/src/MutableList.ts +141 -81
  1354. package/src/MutableRef.ts +130 -90
  1355. package/src/Newtype.ts +3 -0
  1356. package/src/NonEmptyIterable.ts +36 -39
  1357. package/src/Number.ts +116 -64
  1358. package/src/Optic.ts +1 -2
  1359. package/src/Option.ts +28 -47
  1360. package/src/Ordering.ts +43 -28
  1361. package/src/PartitionedSemaphore.ts +225 -40
  1362. package/src/Path.ts +77 -13
  1363. package/src/Pipeable.ts +76 -21
  1364. package/src/PlatformError.ts +74 -6
  1365. package/src/Pool.ts +94 -31
  1366. package/src/Predicate.ts +16 -21
  1367. package/src/PrimaryKey.ts +9 -2
  1368. package/src/PubSub.ts +364 -262
  1369. package/src/Pull.ts +94 -25
  1370. package/src/Queue.ts +284 -150
  1371. package/src/Random.ts +54 -35
  1372. package/src/RcMap.ts +151 -141
  1373. package/src/RcRef.ts +69 -32
  1374. package/src/Record.ts +273 -129
  1375. package/src/Redactable.ts +3 -3
  1376. package/src/Redacted.ts +63 -33
  1377. package/src/Ref.ts +161 -104
  1378. package/src/References.ts +73 -31
  1379. package/src/RegExp.ts +11 -5
  1380. package/src/Request.ts +158 -34
  1381. package/src/RequestResolver.ts +277 -119
  1382. package/src/Resource.ts +45 -7
  1383. package/src/Result.ts +18 -16
  1384. package/src/Runtime.ts +45 -19
  1385. package/src/Schedule.ts +574 -599
  1386. package/src/Scheduler.ts +43 -6
  1387. package/src/Schema.ts +819 -295
  1388. package/src/SchemaAST.ts +25 -16
  1389. package/src/SchemaGetter.ts +29 -14
  1390. package/src/SchemaIssue.ts +1 -8
  1391. package/src/SchemaParser.ts +262 -38
  1392. package/src/SchemaTransformation.ts +61 -41
  1393. package/src/SchemaUtils.ts +23 -0
  1394. package/src/Scope.ts +102 -43
  1395. package/src/ScopedCache.ts +192 -56
  1396. package/src/ScopedRef.ts +28 -8
  1397. package/src/Semaphore.ts +64 -28
  1398. package/src/Sink.ts +458 -200
  1399. package/src/Stdio.ts +43 -6
  1400. package/src/Stream.ts +2039 -1252
  1401. package/src/String.ts +171 -95
  1402. package/src/SubscriptionRef.ts +308 -203
  1403. package/src/Symbol.ts +13 -5
  1404. package/src/SynchronizedRef.ts +278 -62
  1405. package/src/Take.ts +26 -2
  1406. package/src/Terminal.ts +40 -7
  1407. package/src/Tracer.ts +229 -55
  1408. package/src/Trie.ts +213 -142
  1409. package/src/TxChunk.ts +182 -146
  1410. package/src/TxDeferred.ts +43 -29
  1411. package/src/TxHashMap.ts +370 -230
  1412. package/src/TxHashSet.ts +250 -152
  1413. package/src/TxPriorityQueue.ts +96 -64
  1414. package/src/TxPubSub.ts +77 -49
  1415. package/src/TxQueue.ts +279 -241
  1416. package/src/TxReentrantLock.ts +70 -47
  1417. package/src/TxRef.ts +69 -40
  1418. package/src/TxSemaphore.ts +101 -54
  1419. package/src/TxSubscriptionRef.ts +72 -48
  1420. package/src/Types.ts +34 -34
  1421. package/src/UndefinedOr.ts +48 -25
  1422. package/src/Unify.ts +71 -116
  1423. package/src/Utils.ts +4 -0
  1424. package/src/index.ts +81 -32
  1425. package/src/internal/schema/schema.ts +1 -1
  1426. package/src/testing/FastCheck.ts +6 -3
  1427. package/src/testing/TestClock.ts +63 -34
  1428. package/src/testing/TestConsole.ts +49 -30
  1429. package/src/testing/TestSchema.ts +8 -8
  1430. package/src/unstable/ai/AiError.ts +187 -120
  1431. package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
  1432. package/src/unstable/ai/Chat.ts +69 -43
  1433. package/src/unstable/ai/EmbeddingModel.ts +12 -11
  1434. package/src/unstable/ai/IdGenerator.ts +28 -18
  1435. package/src/unstable/ai/LanguageModel.ts +35 -27
  1436. package/src/unstable/ai/McpSchema.ts +339 -119
  1437. package/src/unstable/ai/McpServer.ts +76 -19
  1438. package/src/unstable/ai/Model.ts +8 -6
  1439. package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
  1440. package/src/unstable/ai/Prompt.ts +210 -184
  1441. package/src/unstable/ai/Response.ts +159 -147
  1442. package/src/unstable/ai/ResponseIdTracker.ts +43 -4
  1443. package/src/unstable/ai/Telemetry.ts +42 -32
  1444. package/src/unstable/ai/Tokenizer.ts +13 -8
  1445. package/src/unstable/ai/Tool.ts +154 -85
  1446. package/src/unstable/ai/Toolkit.ts +51 -46
  1447. package/src/unstable/ai/index.ts +42 -24
  1448. package/src/unstable/cli/Argument.ts +226 -134
  1449. package/src/unstable/cli/CliError.ts +96 -26
  1450. package/src/unstable/cli/CliOutput.ts +43 -13
  1451. package/src/unstable/cli/Command.ts +194 -113
  1452. package/src/unstable/cli/Completions.ts +7 -7
  1453. package/src/unstable/cli/Flag.ts +235 -142
  1454. package/src/unstable/cli/GlobalFlag.ts +41 -13
  1455. package/src/unstable/cli/HelpDoc.ts +35 -10
  1456. package/src/unstable/cli/Param.ts +327 -189
  1457. package/src/unstable/cli/Primitive.ts +79 -42
  1458. package/src/unstable/cli/Prompt.ts +201 -45
  1459. package/src/unstable/cli/internal/ansi.ts +13 -0
  1460. package/src/unstable/cli/internal/command.ts +5 -1
  1461. package/src/unstable/cli/internal/config.ts +3 -0
  1462. package/src/unstable/cli/internal/lexer.ts +11 -0
  1463. package/src/unstable/cluster/ClusterCron.ts +35 -1
  1464. package/src/unstable/cluster/ClusterError.ts +56 -7
  1465. package/src/unstable/cluster/ClusterMetrics.ts +39 -5
  1466. package/src/unstable/cluster/ClusterSchema.ts +61 -8
  1467. package/src/unstable/cluster/ClusterWorkflowEngine.ts +35 -2
  1468. package/src/unstable/cluster/DeliverAt.ts +39 -4
  1469. package/src/unstable/cluster/Entity.ts +107 -16
  1470. package/src/unstable/cluster/EntityAddress.ts +30 -2
  1471. package/src/unstable/cluster/EntityId.ts +18 -3
  1472. package/src/unstable/cluster/EntityProxy.ts +34 -2
  1473. package/src/unstable/cluster/EntityProxyServer.ts +44 -8
  1474. package/src/unstable/cluster/EntityResource.ts +43 -6
  1475. package/src/unstable/cluster/EntityType.ts +27 -3
  1476. package/src/unstable/cluster/Envelope.ts +128 -23
  1477. package/src/unstable/cluster/HttpRunner.ts +88 -13
  1478. package/src/unstable/cluster/K8sHttpClient.ts +49 -6
  1479. package/src/unstable/cluster/MachineId.ts +24 -3
  1480. package/src/unstable/cluster/Message.ts +102 -13
  1481. package/src/unstable/cluster/MessageStorage.ts +127 -21
  1482. package/src/unstable/cluster/Reply.ts +101 -12
  1483. package/src/unstable/cluster/Runner.ts +47 -17
  1484. package/src/unstable/cluster/RunnerAddress.ts +34 -2
  1485. package/src/unstable/cluster/RunnerHealth.ts +40 -12
  1486. package/src/unstable/cluster/RunnerServer.ts +31 -4
  1487. package/src/unstable/cluster/RunnerStorage.ts +42 -5
  1488. package/src/unstable/cluster/Runners.ts +73 -10
  1489. package/src/unstable/cluster/ShardId.ts +51 -5
  1490. package/src/unstable/cluster/Sharding.ts +35 -4
  1491. package/src/unstable/cluster/ShardingConfig.ts +75 -10
  1492. package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
  1493. package/src/unstable/cluster/SingleRunner.ts +23 -1
  1494. package/src/unstable/cluster/Singleton.ts +15 -1
  1495. package/src/unstable/cluster/SingletonAddress.ts +21 -1
  1496. package/src/unstable/cluster/Snowflake.ts +89 -19
  1497. package/src/unstable/cluster/SocketRunner.ts +29 -2
  1498. package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
  1499. package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
  1500. package/src/unstable/cluster/TestRunner.ts +18 -1
  1501. package/src/unstable/cluster/internal/hash.ts +12 -0
  1502. package/src/unstable/devtools/DevTools.ts +26 -3
  1503. package/src/unstable/devtools/DevToolsClient.ts +32 -5
  1504. package/src/unstable/devtools/DevToolsSchema.ts +201 -44
  1505. package/src/unstable/devtools/DevToolsServer.ts +27 -2
  1506. package/src/unstable/encoding/Msgpack.ts +97 -12
  1507. package/src/unstable/encoding/Ndjson.ts +149 -21
  1508. package/src/unstable/encoding/Sse.ts +109 -18
  1509. package/src/unstable/eventlog/Event.ts +131 -30
  1510. package/src/unstable/eventlog/EventGroup.ts +50 -17
  1511. package/src/unstable/eventlog/EventJournal.ts +120 -20
  1512. package/src/unstable/eventlog/EventLog.ts +151 -31
  1513. package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
  1514. package/src/unstable/eventlog/EventLogMessage.ts +92 -18
  1515. package/src/unstable/eventlog/EventLogRemote.ts +54 -8
  1516. package/src/unstable/eventlog/EventLogServer.ts +33 -3
  1517. package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
  1518. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
  1519. package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
  1520. package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
  1521. package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
  1522. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
  1523. package/src/unstable/http/Cookies.ts +156 -77
  1524. package/src/unstable/http/Etag.ts +40 -7
  1525. package/src/unstable/http/FetchHttpClient.ts +33 -4
  1526. package/src/unstable/http/FindMyWay.ts +1 -1
  1527. package/src/unstable/http/Headers.ts +252 -50
  1528. package/src/unstable/http/HttpBody.ts +128 -26
  1529. package/src/unstable/http/HttpClient.ts +205 -96
  1530. package/src/unstable/http/HttpClientError.ts +80 -12
  1531. package/src/unstable/http/HttpClientRequest.ts +318 -100
  1532. package/src/unstable/http/HttpClientResponse.ts +59 -16
  1533. package/src/unstable/http/HttpEffect.ts +66 -18
  1534. package/src/unstable/http/HttpIncomingMessage.ts +47 -7
  1535. package/src/unstable/http/HttpMethod.ts +35 -5
  1536. package/src/unstable/http/HttpMiddleware.ts +59 -11
  1537. package/src/unstable/http/HttpPlatform.ts +34 -3
  1538. package/src/unstable/http/HttpRouter.ts +217 -52
  1539. package/src/unstable/http/HttpServer.ts +151 -22
  1540. package/src/unstable/http/HttpServerError.ts +90 -10
  1541. package/src/unstable/http/HttpServerRequest.ts +125 -21
  1542. package/src/unstable/http/HttpServerRespondable.ts +49 -6
  1543. package/src/unstable/http/HttpServerResponse.ts +390 -67
  1544. package/src/unstable/http/HttpStaticServer.ts +22 -4
  1545. package/src/unstable/http/HttpTraceContext.ts +53 -6
  1546. package/src/unstable/http/Multipart.ts +178 -28
  1547. package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
  1548. package/src/unstable/http/Multipasta/Node.ts +1 -1
  1549. package/src/unstable/http/Multipasta/Search.ts +1 -1
  1550. package/src/unstable/http/Multipasta/Web.ts +1 -1
  1551. package/src/unstable/http/Multipasta.ts +1 -1
  1552. package/src/unstable/http/Template.ts +53 -0
  1553. package/src/unstable/http/Url.ts +56 -42
  1554. package/src/unstable/http/UrlParams.ts +233 -49
  1555. package/src/unstable/httpapi/HttpApi.ts +49 -14
  1556. package/src/unstable/httpapi/HttpApiBuilder.ts +82 -16
  1557. package/src/unstable/httpapi/HttpApiClient.ts +79 -15
  1558. package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
  1559. package/src/unstable/httpapi/HttpApiError.ts +100 -1
  1560. package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
  1561. package/src/unstable/httpapi/HttpApiMiddleware.ts +111 -22
  1562. package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
  1563. package/src/unstable/httpapi/HttpApiSchema.ts +67 -30
  1564. package/src/unstable/httpapi/HttpApiSecurity.ts +74 -17
  1565. package/src/unstable/httpapi/HttpApiSwagger.ts +24 -2
  1566. package/src/unstable/httpapi/HttpApiTest.ts +26 -1
  1567. package/src/unstable/httpapi/OpenApi.ts +115 -15
  1568. package/src/unstable/observability/Otlp.ts +33 -3
  1569. package/src/unstable/observability/OtlpExporter.ts +32 -1
  1570. package/src/unstable/observability/OtlpLogger.ts +31 -2
  1571. package/src/unstable/observability/OtlpMetrics.ts +37 -4
  1572. package/src/unstable/observability/OtlpResource.ts +68 -12
  1573. package/src/unstable/observability/OtlpSerialization.ts +28 -3
  1574. package/src/unstable/observability/OtlpTracer.ts +38 -2
  1575. package/src/unstable/observability/PrometheusMetrics.ts +32 -12
  1576. package/src/unstable/observability/index.ts +2 -1
  1577. package/src/unstable/persistence/KeyValueStore.ts +108 -28
  1578. package/src/unstable/persistence/Persistable.ts +76 -15
  1579. package/src/unstable/persistence/PersistedCache.ts +27 -2
  1580. package/src/unstable/persistence/PersistedQueue.ts +98 -16
  1581. package/src/unstable/persistence/Persistence.ts +97 -16
  1582. package/src/unstable/persistence/RateLimiter.ts +97 -21
  1583. package/src/unstable/persistence/Redis.ts +42 -5
  1584. package/src/unstable/process/ChildProcess.ts +89 -65
  1585. package/src/unstable/process/ChildProcessSpawner.ts +22 -11
  1586. package/src/unstable/process/index.ts +2 -1
  1587. package/src/unstable/reactivity/AsyncResult.ts +202 -61
  1588. package/src/unstable/reactivity/Atom.ts +593 -139
  1589. package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
  1590. package/src/unstable/reactivity/AtomRef.ts +51 -7
  1591. package/src/unstable/reactivity/AtomRegistry.ts +141 -22
  1592. package/src/unstable/reactivity/AtomRpc.ts +36 -2
  1593. package/src/unstable/reactivity/Hydration.ts +45 -5
  1594. package/src/unstable/reactivity/Reactivity.ts +95 -13
  1595. package/src/unstable/rpc/Rpc.ts +255 -56
  1596. package/src/unstable/rpc/RpcClient.ts +107 -19
  1597. package/src/unstable/rpc/RpcClientError.ts +26 -2
  1598. package/src/unstable/rpc/RpcGroup.ts +51 -8
  1599. package/src/unstable/rpc/RpcMessage.ts +128 -32
  1600. package/src/unstable/rpc/RpcMiddleware.ts +100 -20
  1601. package/src/unstable/rpc/RpcSchema.ts +38 -4
  1602. package/src/unstable/rpc/RpcSerialization.ts +60 -13
  1603. package/src/unstable/rpc/RpcServer.ts +107 -23
  1604. package/src/unstable/rpc/RpcTest.ts +20 -1
  1605. package/src/unstable/rpc/RpcWorker.ts +40 -6
  1606. package/src/unstable/rpc/Utils.ts +31 -0
  1607. package/src/unstable/schema/Model.ts +148 -52
  1608. package/src/unstable/schema/VariantSchema.ts +104 -24
  1609. package/src/unstable/socket/Socket.ts +167 -34
  1610. package/src/unstable/socket/SocketServer.ts +58 -10
  1611. package/src/unstable/sql/Migrator.ts +56 -4
  1612. package/src/unstable/sql/SqlClient.ts +55 -2
  1613. package/src/unstable/sql/SqlConnection.ts +31 -0
  1614. package/src/unstable/sql/SqlError.ts +117 -0
  1615. package/src/unstable/sql/SqlModel.ts +26 -5
  1616. package/src/unstable/sql/SqlResolver.ts +56 -13
  1617. package/src/unstable/sql/SqlSchema.ts +29 -8
  1618. package/src/unstable/sql/SqlStream.ts +23 -0
  1619. package/src/unstable/sql/Statement.ts +141 -0
  1620. package/src/unstable/sql/index.ts +1 -1
  1621. package/src/unstable/workers/Transferable.ts +65 -13
  1622. package/src/unstable/workers/Worker.ts +60 -8
  1623. package/src/unstable/workers/WorkerError.ts +50 -9
  1624. package/src/unstable/workers/WorkerRunner.ts +32 -3
  1625. package/src/unstable/workers/index.ts +1 -1
  1626. package/src/unstable/workflow/Activity.ts +61 -10
  1627. package/src/unstable/workflow/DurableClock.ts +26 -3
  1628. package/src/unstable/workflow/DurableDeferred.ts +146 -31
  1629. package/src/unstable/workflow/DurableQueue.ts +30 -7
  1630. package/src/unstable/workflow/Workflow.ts +121 -31
  1631. package/src/unstable/workflow/WorkflowEngine.ts +40 -5
  1632. package/src/unstable/workflow/WorkflowProxy.ts +32 -2
  1633. package/src/unstable/workflow/WorkflowProxyServer.ts +40 -6
package/src/DateTime.ts CHANGED
@@ -1,4 +1,53 @@
1
1
  /**
2
+ * The `DateTime` module provides immutable data types and utilities for working
3
+ * with instants, UTC date-times, zoned date-times, and time zones. A
4
+ * `DateTime` is always an absolute point in time, represented internally by
5
+ * epoch milliseconds, and may also carry a `TimeZone` for zone-aware calendar
6
+ * parts and formatting.
7
+ *
8
+ * **Mental model**
9
+ *
10
+ * - `DateTime` is a discriminated union: `Utc | Zoned`
11
+ * - `Utc` stores an absolute instant without an associated time zone
12
+ * - `Zoned` stores the same kind of absolute instant plus a `TimeZone`
13
+ * - Time zones can be fixed offsets or named IANA zones such as `"Europe/Rome"`
14
+ * - Comparison and ordering use the instant, so two values in different zones
15
+ * can still be equivalent
16
+ * - Calendar parts and formatted output depend on whether you ask for UTC parts
17
+ * or zone-adjusted parts
18
+ *
19
+ * **Common tasks**
20
+ *
21
+ * - Construct values: {@link make}, {@link makeUnsafe}, {@link makeZoned}, {@link makeZonedUnsafe}
22
+ * - Get the current instant: {@link now}, {@link nowInCurrentZone}
23
+ * - Create time zones: {@link zoneMakeOffset}, {@link zoneMakeNamed}, {@link zoneFromString}
24
+ * - Attach or change zones: {@link setZone}, {@link setZoneNamed}, {@link setZoneCurrent}, {@link toUtc}
25
+ * - Convert to platform values or parts: {@link toDate}, {@link toDateUtc}, {@link toEpochMillis}, {@link toParts}, {@link toPartsUtc}
26
+ * - Compare and bound values: {@link Equivalence}, {@link Order}, {@link distance}, {@link min}, {@link max}, {@link clamp}, {@link between}
27
+ * - Transform values: {@link add}, {@link subtract}, {@link startOf}, {@link endOf}, {@link nearest}, {@link setParts}, {@link mutate}
28
+ * - Format values: {@link format}, {@link formatUtc}, {@link formatLocal}, {@link formatIntl}, {@link formatIso}, {@link formatIsoZoned}
29
+ * - Provide an application time zone: {@link CurrentTimeZone}, {@link withCurrentZone}, {@link layerCurrentZone}
30
+ *
31
+ * **Gotchas**
32
+ *
33
+ * - `make` and `makeZoned` return `Option`; unsafe constructors throw on invalid
34
+ * input
35
+ * - `DateTime` equality is instant-based, not display-time-based
36
+ * - `setZone` changes the zone used for local parts and formatting without
37
+ * changing the represented instant
38
+ * - Use `adjustForTimeZone` with {@link makeZoned} when input parts should be
39
+ * interpreted as wall-clock time in the target zone
40
+ * - Daylight-saving gaps and repeated local times are resolved with
41
+ * `Disambiguation`
42
+ * - Prefer the Clock-backed {@link now} and `CurrentTimeZone` services in
43
+ * Effect workflows; unsafe helpers read from the host environment directly
44
+ *
45
+ * **See also**
46
+ *
47
+ * - {@link DateTime} for the UTC/zoned data model
48
+ * - {@link TimeZone} for offset and named time-zone values
49
+ * - {@link Disambiguation} for daylight-saving ambiguity handling
50
+ *
2
51
  * @since 3.6.0
3
52
  */
4
53
  import type { IllegalArgumentError } from "./Cause.ts"
@@ -22,14 +71,19 @@ const TimeZoneTypeId = Internal.TimeZoneTypeId
22
71
  * A `DateTime` represents a point in time. It can optionally have a time zone
23
72
  * associated with it.
24
73
  *
25
- * @since 3.6.0
26
74
  * @category models
75
+ * @since 3.6.0
27
76
  */
28
77
  export type DateTime = Utc | Zoned
29
78
 
30
79
  /**
31
- * @since 3.6.0
80
+ * Represents a `DateTime` stored as an absolute UTC instant with no associated
81
+ * time zone.
82
+ *
83
+ * Use `DateTime.isUtc` to narrow a `DateTime` to this variant.
84
+ *
32
85
  * @category models
86
+ * @since 3.6.0
33
87
  */
34
88
  export interface Utc extends DateTime.Proto {
35
89
  readonly _tag: "Utc"
@@ -38,8 +92,14 @@ export interface Utc extends DateTime.Proto {
38
92
  }
39
93
 
40
94
  /**
41
- * @since 3.6.0
95
+ * Represents a `DateTime` with an associated `TimeZone`.
96
+ *
97
+ * A zoned value still represents an absolute instant through
98
+ * `epochMilliseconds`, while the time zone is used for wall-clock parts,
99
+ * formatting, and zone-aware transformations.
100
+ *
42
101
  * @category models
102
+ * @since 3.6.0
43
103
  */
44
104
  export interface Zoned extends DateTime.Proto {
45
105
  readonly _tag: "Zoned"
@@ -51,31 +111,55 @@ export interface Zoned extends DateTime.Proto {
51
111
  }
52
112
 
53
113
  /**
54
- * @since 3.6.0
114
+ * Companion namespace containing the public helper types used by `DateTime`
115
+ * constructors, parts APIs, formatting, and date/time arithmetic.
116
+ *
55
117
  * @category models
118
+ * @since 3.6.0
56
119
  */
57
120
  export declare namespace DateTime {
58
121
  /**
59
- * @since 3.6.0
122
+ * Input accepted by `DateTime.make`, `DateTime.makeUnsafe`, and the zoned
123
+ * constructors.
124
+ *
125
+ * Includes existing `DateTime` values, partial date parts, epoch-millisecond
126
+ * objects, epoch milliseconds, JavaScript `Date` instances, and parseable date
127
+ * strings.
128
+ *
60
129
  * @category models
130
+ * @since 3.6.0
61
131
  */
62
132
  export type Input = DateTime | Partial<Parts> | Instant | InstantWithZone | Date | number | string
63
133
 
64
134
  /**
65
- * @since 3.6.0
135
+ * Type-level helper used by constructors to preserve a zoned input.
136
+ *
137
+ * When the input type is `DateTime.Zoned`, the result type is
138
+ * `DateTime.Zoned`; otherwise the result type is `DateTime.Utc`.
139
+ *
66
140
  * @category models
141
+ * @since 3.6.0
67
142
  */
68
143
  export type PreserveZone<A extends DateTime.Input> = A extends Zoned ? Zoned : Utc
69
144
 
70
145
  /**
71
- * @since 3.6.0
146
+ * Date and time unit name accepted by `DateTime` rounding and arithmetic
147
+ * APIs.
148
+ *
149
+ * Includes both singular units, such as `"day"`, and plural units, such as
150
+ * `"days"`.
151
+ *
72
152
  * @category models
153
+ * @since 3.6.0
73
154
  */
74
155
  export type Unit = UnitSingular | UnitPlural
75
156
 
76
157
  /**
77
- * @since 3.6.0
158
+ * Singular date and time unit names used by rounding APIs such as
159
+ * `DateTime.startOf`, `DateTime.endOf`, and `DateTime.nearest`.
160
+ *
78
161
  * @category models
162
+ * @since 3.6.0
79
163
  */
80
164
  export type UnitSingular =
81
165
  | "millisecond"
@@ -88,8 +172,11 @@ export declare namespace DateTime {
88
172
  | "year"
89
173
 
90
174
  /**
91
- * @since 3.6.0
175
+ * Plural date and time unit names used by `DateTime.PartsForMath` for
176
+ * amount-based arithmetic.
177
+ *
92
178
  * @category models
179
+ * @since 3.6.0
93
180
  */
94
181
  export type UnitPlural =
95
182
  | "milliseconds"
@@ -102,8 +189,14 @@ export declare namespace DateTime {
102
189
  | "years"
103
190
 
104
191
  /**
105
- * @since 3.6.0
192
+ * Calendar and time components of a `DateTime`, including the weekday.
193
+ *
194
+ * `month` is one-based (`1` for January through `12` for December), and
195
+ * `weekDay` follows JavaScript `Date#getUTCDay` numbering (`0` for Sunday
196
+ * through `6` for Saturday).
197
+ *
106
198
  * @category models
199
+ * @since 3.6.0
107
200
  */
108
201
  export interface PartsWithWeekday {
109
202
  readonly millisecond: number
@@ -117,8 +210,12 @@ export declare namespace DateTime {
117
210
  }
118
211
 
119
212
  /**
120
- * @since 3.6.0
213
+ * Calendar and time components of a `DateTime`, without weekday information.
214
+ *
215
+ * `month` is one-based (`1` for January through `12` for December).
216
+ *
121
217
  * @category models
218
+ * @since 3.6.0
122
219
  */
123
220
  export interface Parts {
124
221
  readonly millisecond: number
@@ -131,8 +228,12 @@ export declare namespace DateTime {
131
228
  }
132
229
 
133
230
  /**
134
- * @since 3.6.0
231
+ * Plural amount fields accepted by `DateTime.add` and `DateTime.subtract`.
232
+ *
233
+ * Each field represents the number of units to add or subtract for that part.
234
+ *
135
235
  * @category models
236
+ * @since 3.6.0
136
237
  */
137
238
  export interface PartsForMath {
138
239
  readonly milliseconds: number
@@ -146,16 +247,24 @@ export declare namespace DateTime {
146
247
  }
147
248
 
148
249
  /**
149
- * @since 4.0.0
250
+ * Object input representing an absolute instant as milliseconds since the Unix
251
+ * epoch.
252
+ *
150
253
  * @category models
254
+ * @since 4.0.0
151
255
  */
152
256
  export interface Instant {
153
257
  readonly epochMilliseconds: number
154
258
  }
155
259
 
156
260
  /**
157
- * @since 4.0.0
261
+ * Object input representing an absolute instant plus a time zone identifier.
262
+ *
263
+ * `DateTime.makeZoned` and `DateTime.makeZonedUnsafe` use `timeZoneId` when
264
+ * no explicit `timeZone` option is supplied.
265
+ *
158
266
  * @category models
267
+ * @since 4.0.0
159
268
  */
160
269
  export interface InstantWithZone {
161
270
  readonly timeZoneId: string
@@ -163,8 +272,13 @@ export declare namespace DateTime {
163
272
  }
164
273
 
165
274
  /**
166
- * @since 3.6.0
275
+ * Shared protocol implemented by all `DateTime` values.
276
+ *
277
+ * Provides the `DateTime` type identifier along with pipe and inspection
278
+ * support.
279
+ *
167
280
  * @category models
281
+ * @since 3.6.0
168
282
  */
169
283
  export interface Proto extends Pipeable, Inspectable {
170
284
  readonly [TypeId]: typeof TypeId
@@ -172,27 +286,43 @@ export declare namespace DateTime {
172
286
  }
173
287
 
174
288
  /**
175
- * @since 3.6.0
289
+ * Represents a time zone used by `DateTime.Zoned`.
290
+ *
291
+ * A `TimeZone` is either a fixed offset from UTC or a named IANA time zone.
292
+ *
176
293
  * @category models
294
+ * @since 3.6.0
177
295
  */
178
296
  export type TimeZone = TimeZone.Offset | TimeZone.Named
179
297
 
180
298
  /**
181
- * @since 3.6.0
299
+ * Companion namespace containing the public variant and protocol types for
300
+ * `TimeZone`.
301
+ *
182
302
  * @category models
303
+ * @since 3.6.0
183
304
  */
184
305
  export declare namespace TimeZone {
185
306
  /**
186
- * @since 3.6.0
307
+ * Shared protocol implemented by all `TimeZone` values.
308
+ *
309
+ * Provides the `TimeZone` type identifier and inspection support.
310
+ *
187
311
  * @category models
312
+ * @since 3.6.0
188
313
  */
189
314
  export interface Proto extends Inspectable {
190
315
  readonly [TimeZoneTypeId]: typeof TimeZoneTypeId
191
316
  }
192
317
 
193
318
  /**
194
- * @since 3.6.0
319
+ * Fixed-offset time zone.
320
+ *
321
+ * The `offset` is measured in milliseconds from UTC. Positive offsets are
322
+ * ahead of UTC, and negative offsets are behind UTC.
323
+ *
195
324
  * @category models
325
+ * @since 3.6.0
196
326
  */
197
327
  export interface Offset extends Proto {
198
328
  readonly _tag: "Offset"
@@ -200,8 +330,13 @@ export declare namespace TimeZone {
200
330
  }
201
331
 
202
332
  /**
203
- * @since 3.6.0
333
+ * Named IANA time zone.
334
+ *
335
+ * The `id` field contains the resolved time zone identifier, such as
336
+ * `"Europe/London"` or `"America/New_York"`.
337
+ *
204
338
  * @category models
339
+ * @since 3.6.0
205
340
  */
206
341
  export interface Named extends Proto {
207
342
  readonly _tag: "Named"
@@ -228,7 +363,8 @@ export declare namespace TimeZone {
228
363
  *
229
364
  * - `"reject"`: Throw an `RangeError` when encountering ambiguous or non-existent times.
230
365
  *
231
- * @example
366
+ * **Example** (Resolving ambiguous local times)
367
+ *
232
368
  * ```ts
233
369
  * import { DateTime } from "effect"
234
370
  *
@@ -268,8 +404,8 @@ export declare namespace TimeZone {
268
404
  * // Time after gap: 2025-03-09T07:30:00.000Z (03:30 EDT)
269
405
  * ```
270
406
  *
271
- * @since 3.18.0
272
407
  * @category models
408
+ * @since 3.18.0
273
409
  */
274
410
  export type Disambiguation = "compatible" | "earlier" | "later" | "reject"
275
411
 
@@ -278,48 +414,50 @@ export type Disambiguation = "compatible" | "earlier" | "later" | "reject"
278
414
  // =============================================================================
279
415
 
280
416
  /**
281
- * @since 3.6.0
417
+ * Checks whether a value is a `DateTime`.
418
+ *
282
419
  * @category guards
420
+ * @since 3.6.0
283
421
  */
284
422
  export const isDateTime: (u: unknown) => u is DateTime = Internal.isDateTime
285
423
 
286
424
  /**
287
425
  * Checks if a value is a `TimeZone`.
288
426
  *
289
- * @since 3.6.0
290
427
  * @category guards
428
+ * @since 3.6.0
291
429
  */
292
430
  export const isTimeZone: (u: unknown) => u is TimeZone = Internal.isTimeZone
293
431
 
294
432
  /**
295
433
  * Checks if a value is an offset-based `TimeZone`.
296
434
  *
297
- * @since 3.6.0
298
435
  * @category guards
436
+ * @since 3.6.0
299
437
  */
300
438
  export const isTimeZoneOffset: (u: unknown) => u is TimeZone.Offset = Internal.isTimeZoneOffset
301
439
 
302
440
  /**
303
441
  * Checks if a value is a named `TimeZone` (IANA time zone).
304
442
  *
305
- * @since 3.6.0
306
443
  * @category guards
444
+ * @since 3.6.0
307
445
  */
308
446
  export const isTimeZoneNamed: (u: unknown) => u is TimeZone.Named = Internal.isTimeZoneNamed
309
447
 
310
448
  /**
311
449
  * Checks if a `DateTime` is a UTC `DateTime` (no time zone information).
312
450
  *
313
- * @since 3.6.0
314
451
  * @category guards
452
+ * @since 3.6.0
315
453
  */
316
454
  export const isUtc: (self: DateTime) => self is Utc = Internal.isUtc
317
455
 
318
456
  /**
319
457
  * Checks if a `DateTime` is a zoned `DateTime` (has time zone information).
320
458
  *
321
- * @since 3.6.0
322
459
  * @category guards
460
+ * @since 3.6.0
323
461
  */
324
462
  export const isZoned: (self: DateTime) => self is Zoned = Internal.isZoned
325
463
 
@@ -333,7 +471,8 @@ export const isZoned: (self: DateTime) => self is Zoned = Internal.isZoned
333
471
  * Two `DateTime` values are considered equivalent if they represent the same
334
472
  * point in time, regardless of their time zone.
335
473
  *
336
- * @example
474
+ * **Example** (Comparing DateTime values for equivalence)
475
+ *
337
476
  * ```ts
338
477
  * import { DateTime } from "effect"
339
478
  *
@@ -356,7 +495,8 @@ export const Equivalence: Equ.Equivalence<DateTime> = Internal.Equivalence
356
495
  * `DateTime` values are ordered by their epoch milliseconds, so earlier times
357
496
  * come before later times regardless of time zone.
358
497
  *
359
- * @example
498
+ * **Example** (Sorting DateTime values chronologically)
499
+ *
360
500
  * ```ts
361
501
  * import { Array, DateTime } from "effect"
362
502
  *
@@ -382,7 +522,8 @@ export const Order: order.Order<DateTime> = Internal.Order
382
522
  * If the `DateTime` is after the maximum, the maximum is returned.
383
523
  * Otherwise, the original `DateTime` is returned.
384
524
  *
385
- * @example
525
+ * **Example** (Clamping DateTime values)
526
+ *
386
527
  * ```ts
387
528
  * import { DateTime } from "effect"
388
529
  *
@@ -405,7 +546,8 @@ export const clamp: {
405
546
  * If the `DateTime` is after the maximum, the maximum is returned.
406
547
  * Otherwise, the original `DateTime` is returned.
407
548
  *
408
- * @example
549
+ * **Example** (Clamping DateTime values)
550
+ *
409
551
  * ```ts
410
552
  * import { DateTime } from "effect"
411
553
  *
@@ -428,7 +570,8 @@ export const clamp: {
428
570
  * If the `DateTime` is after the maximum, the maximum is returned.
429
571
  * Otherwise, the original `DateTime` is returned.
430
572
  *
431
- * @example
573
+ * **Example** (Clamping DateTime values)
574
+ *
432
575
  * ```ts
433
576
  * import { DateTime } from "effect"
434
577
  *
@@ -455,7 +598,8 @@ export const clamp: {
455
598
  *
456
599
  * If the `Date` is invalid, an `IllegalArgumentError` will be thrown.
457
600
  *
458
- * @example
601
+ * **Example** (Creating DateTime values from Dates)
602
+ *
459
603
  * ```ts
460
604
  * import { DateTime } from "effect"
461
605
  *
@@ -479,21 +623,26 @@ export const fromDateUnsafe: (date: Date) => Utc = Internal.fromDateUnsafe
479
623
  * - An object with the parts of a date
480
624
  * - A `string` that can be parsed by `Date.parse`
481
625
  *
482
- * @since 3.6.0
483
- * @category constructors
484
- * @example
626
+ * **Example** (Creating DateTime values unsafely)
627
+ *
485
628
  * ```ts
486
629
  * import { DateTime } from "effect"
487
630
  *
488
631
  * // from Date
489
- * DateTime.makeUnsafe(new Date())
632
+ * const fromDate = DateTime.makeUnsafe(new Date("2024-01-01T12:00:00Z"))
633
+ * console.log(DateTime.formatIso(fromDate)) // "2024-01-01T12:00:00.000Z"
490
634
  *
491
635
  * // from parts
492
- * DateTime.makeUnsafe({ year: 2024 })
636
+ * const fromParts = DateTime.makeUnsafe({ year: 2024 })
637
+ * console.log(DateTime.formatIso(fromParts)) // "2024-01-01T00:00:00.000Z"
493
638
  *
494
639
  * // from string
495
- * DateTime.makeUnsafe("2024-01-01")
640
+ * const fromString = DateTime.makeUnsafe("2024-01-01")
641
+ * console.log(DateTime.formatIso(fromString)) // "2024-01-01T00:00:00.000Z"
496
642
  * ```
643
+ *
644
+ * @category constructors
645
+ * @since 3.6.0
497
646
  */
498
647
  export const makeUnsafe: <A extends DateTime.Input>(input: A) => DateTime.PreserveZone<A> = Internal.makeUnsafe
499
648
 
@@ -511,14 +660,20 @@ export const makeUnsafe: <A extends DateTime.Input>(input: A) => DateTime.Preser
511
660
  * - `later`: Always choose the later of two possible times
512
661
  * - `reject`: Throw an error when ambiguous times are encountered
513
662
  *
514
- * @since 3.6.0
515
- * @category constructors
516
- * @example
663
+ * **Example** (Creating zoned DateTime values unsafely)
664
+ *
517
665
  * ```ts
518
666
  * import { DateTime } from "effect"
519
667
  *
520
- * DateTime.makeZonedUnsafe(new Date(), { timeZone: "Europe/London" })
668
+ * const zoned = DateTime.makeZonedUnsafe("2024-06-15T14:30:00Z", {
669
+ * timeZone: "Europe/London"
670
+ * })
671
+ *
672
+ * console.log(DateTime.formatIsoZoned(zoned)) // "2024-06-15T15:30:00.000+01:00[Europe/London]"
521
673
  * ```
674
+ *
675
+ * @category constructors
676
+ * @since 3.6.0
522
677
  */
523
678
  export const makeZonedUnsafe: (input: DateTime.Input, options?: {
524
679
  readonly timeZone?: number | string | TimeZone | undefined
@@ -527,29 +682,41 @@ export const makeZonedUnsafe: (input: DateTime.Input, options?: {
527
682
  }) => Zoned = Internal.makeZonedUnsafe
528
683
 
529
684
  /**
530
- * Create a `DateTime.Zoned` using `DateTime.make` and a time zone.
685
+ * Creates a `DateTime.Zoned` from an input and a time zone.
531
686
  *
532
- * The input is treated as UTC and then the time zone is attached, unless
533
- * `adjustForTimeZone` is set to `true`. In that case, the input is treated as
534
- * already in the time zone.
687
+ * By default, the input is interpreted as a UTC instant and the time zone is
688
+ * attached without changing that instant. When `adjustForTimeZone` is `true`,
689
+ * the input is interpreted as wall-clock time in the target zone.
535
690
  *
536
- * When `adjustForTimeZone` is true and ambiguous times occur during DST transitions,
537
- * the `disambiguation` option controls how to resolve the ambiguity:
538
- * - `compatible` (default): Choose earlier time for repeated times, later for gaps
539
- * - `earlier`: Always choose the earlier of two possible times
540
- * - `later`: Always choose the later of two possible times
541
- * - `reject`: Throw an error when ambiguous times are encountered
691
+ * When `adjustForTimeZone` is `true`, `disambiguation` controls
692
+ * daylight-saving gaps and repeated times:
542
693
  *
543
- * If the date time input or time zone is invalid, `None` will be returned.
694
+ * - `"compatible"` (default): chooses the earlier occurrence for repeated
695
+ * times and the later interpretation for gaps
696
+ * - `"earlier"`: chooses the earlier possible instant
697
+ * - `"later"`: chooses the later possible instant
698
+ * - `"reject"`: rejects ambiguous or nonexistent wall-clock times
699
+ *
700
+ * Returns `Some` when construction succeeds, or `None` when the input, time
701
+ * zone, or disambiguation cannot be resolved.
702
+ *
703
+ * **Example** (Creating optional zoned DateTime values)
544
704
  *
545
- * @since 3.6.0
546
- * @category constructors
547
- * @example
548
705
  * ```ts
549
706
  * import { DateTime } from "effect"
550
707
  *
551
- * DateTime.makeZoned(new Date(), { timeZone: "Europe/London" })
708
+ * const result = DateTime.makeZoned("2024-06-15T14:30:00Z", {
709
+ * timeZone: "Europe/London"
710
+ * })
711
+ *
712
+ * console.log(result._tag) // "Some"
713
+ * if (result._tag === "Some") {
714
+ * console.log(DateTime.formatIsoZoned(result.value)) // "2024-06-15T15:30:00.000+01:00[Europe/London]"
715
+ * }
552
716
  * ```
717
+ *
718
+ * @category constructors
719
+ * @since 3.6.0
553
720
  */
554
721
  export const makeZoned: (
555
722
  input: DateTime.Input,
@@ -561,40 +728,54 @@ export const makeZoned: (
561
728
  ) => Option.Option<Zoned> = Internal.makeZoned
562
729
 
563
730
  /**
564
- * Create a `DateTime` from one of the following:
731
+ * Creates a `DateTime` from one of the following:
565
732
  *
566
733
  * - A `DateTime`
567
- * - A `Date` instance (invalid dates will throw an `IllegalArgumentError`)
568
- * - The `number` of milliseconds since the Unix epoch
569
- * - An object with the parts of a date
570
- * - A `string` that can be parsed by `Date.parse`
734
+ * - A JavaScript `Date`
735
+ * - The number of milliseconds since the Unix epoch
736
+ * - An object with date and time parts
737
+ * - A string that can be parsed as a date
571
738
  *
572
- * If the input is invalid, `None` will be returned.
739
+ * Returns `Some` with the constructed `DateTime` when the input is valid, or
740
+ * `None` when construction would fail, including invalid `Date` instances or
741
+ * unparseable strings.
742
+ *
743
+ * **Example** (Creating optional DateTime values)
573
744
  *
574
- * @since 3.6.0
575
- * @category constructors
576
- * @example
577
745
  * ```ts
578
746
  * import { DateTime } from "effect"
579
747
  *
580
748
  * // from Date
581
- * DateTime.make(new Date())
749
+ * const fromDate = DateTime.make(new Date("2024-01-01T12:00:00Z"))
750
+ * console.log(fromDate._tag) // "Some"
582
751
  *
583
752
  * // from parts
584
- * DateTime.make({ year: 2024 })
753
+ * const fromParts = DateTime.make({ year: 2024 })
754
+ * console.log(fromParts._tag) // "Some"
585
755
  *
586
756
  * // from string
587
- * DateTime.make("2024-01-01")
757
+ * const fromString = DateTime.make("2024-01-01")
758
+ * console.log(fromString._tag) // "Some"
759
+ *
760
+ * const invalid = DateTime.make("not a date")
761
+ * console.log(invalid._tag) // "None"
588
762
  * ```
763
+ *
764
+ * @category constructors
765
+ * @since 3.6.0
589
766
  */
590
767
  export const make: <A extends DateTime.Input>(input: A) => Option.Option<DateTime.PreserveZone<A>> = Internal.make
591
768
 
592
769
  /**
593
- * Create a `DateTime.Zoned` from a string.
770
+ * Parses an ISO zoned date-time string into a `DateTime.Zoned`.
594
771
  *
595
- * It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`.
772
+ * Accepts named-zone strings such as
773
+ * `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]` and offset-only strings such as
774
+ * `YYYY-MM-DDTHH:mm:ss.sss+HH:MM`. Returns `None` when the input cannot be
775
+ * parsed.
776
+ *
777
+ * **Example** (Parsing zoned DateTime strings)
596
778
  *
597
- * @example
598
779
  * ```ts
599
780
  * import { DateTime } from "effect"
600
781
  *
@@ -610,33 +791,36 @@ export const make: <A extends DateTime.Input>(input: A) => Option.Option<DateTim
610
791
  * console.log(invalid._tag === "None") // true
611
792
  * ```
612
793
  *
613
- * @since 3.6.0
614
794
  * @category constructors
795
+ * @since 3.6.0
615
796
  */
616
797
  export const makeZonedFromString: (input: string) => Option.Option<Zoned> = Internal.makeZonedFromString
617
798
 
618
799
  /**
619
800
  * Get the current time using the `Clock` service and convert it to a `DateTime`.
620
801
  *
621
- * @since 3.6.0
622
- * @category constructors
623
- * @example
802
+ * **Example** (Getting the current DateTime)
803
+ *
624
804
  * ```ts
625
805
  * import { DateTime, Effect } from "effect"
626
806
  *
627
807
  * Effect.gen(function*() {
628
- * const now = yield* DateTime.now
808
+ * const now = yield* DateTime.nowAsDate
809
+ * console.log(now instanceof Date) // true
629
810
  * })
630
811
  * ```
812
+ *
813
+ * @category constructors
814
+ * @since 3.6.0
631
815
  */
632
816
  export const now: Effect.Effect<Utc> = Internal.now
633
817
 
634
818
  /**
635
- * Get the current time using the `Clock` service and convert it to a `DateTime`.
819
+ * Gets the current time from the `Clock` service and returns it as a
820
+ * JavaScript `Date`.
821
+ *
822
+ * **Example** (Getting the current Date)
636
823
  *
637
- * @since 3.6.0
638
- * @category constructors
639
- * @example
640
824
  * ```ts
641
825
  * import { DateTime, Effect } from "effect"
642
826
  *
@@ -644,6 +828,9 @@ export const now: Effect.Effect<Utc> = Internal.now
644
828
  * const now = yield* DateTime.now
645
829
  * })
646
830
  * ```
831
+ *
832
+ * @category constructors
833
+ * @since 3.6.0
647
834
  */
648
835
  export const nowAsDate: Effect.Effect<Date> = Internal.nowAsDate
649
836
 
@@ -653,7 +840,8 @@ export const nowAsDate: Effect.Effect<Date> = Internal.nowAsDate
653
840
  * This is a synchronous version of `now` that directly uses `Date.now()`
654
841
  * instead of the Effect `Clock` service.
655
842
  *
656
- * @example
843
+ * **Example** (Getting the current DateTime unsafely)
844
+ *
657
845
  * ```ts
658
846
  * import { DateTime } from "effect"
659
847
  *
@@ -673,9 +861,8 @@ export const nowUnsafe: LazyArg<Utc> = Internal.nowUnsafe
673
861
  /**
674
862
  * For a `DateTime` returns a new `DateTime.Utc`.
675
863
  *
676
- * @since 3.13.0
677
- * @category time zones
678
- * @example
864
+ * **Example** (Converting DateTime values to UTC)
865
+ *
679
866
  * ```ts
680
867
  * import { DateTime } from "effect"
681
868
  *
@@ -686,15 +873,17 @@ export const nowUnsafe: LazyArg<Utc> = Internal.nowUnsafe
686
873
  * // set as UTC
687
874
  * const utc: DateTime.Utc = DateTime.toUtc(now)
688
875
  * ```
876
+ *
877
+ * @category time zones
878
+ * @since 3.13.0
689
879
  */
690
880
  export const toUtc: (self: DateTime) => Utc = Internal.toUtc
691
881
 
692
882
  /**
693
883
  * Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`.
694
884
  *
695
- * @since 3.6.0
696
- * @category time zones
697
- * @example
885
+ * **Example** (Setting time zones)
886
+ *
698
887
  * ```ts
699
888
  * import { DateTime, Effect } from "effect"
700
889
  *
@@ -706,14 +895,16 @@ export const toUtc: (self: DateTime) => Utc = Internal.toUtc
706
895
  * const zoned: DateTime.Zoned = DateTime.setZone(now, zone)
707
896
  * })
708
897
  * ```
898
+ *
899
+ * @category time zones
900
+ * @since 3.6.0
709
901
  */
710
902
  export const setZone: {
711
903
  /**
712
904
  * Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`.
713
905
  *
714
- * @since 3.6.0
715
- * @category time zones
716
- * @example
906
+ * **Example** (Setting time zones)
907
+ *
717
908
  * ```ts
718
909
  * import { DateTime, Effect } from "effect"
719
910
  *
@@ -725,6 +916,9 @@ export const setZone: {
725
916
  * const zoned: DateTime.Zoned = DateTime.setZone(now, zone)
726
917
  * })
727
918
  * ```
919
+ *
920
+ * @category time zones
921
+ * @since 3.6.0
728
922
  */
729
923
  (
730
924
  zone: TimeZone,
@@ -736,9 +930,8 @@ export const setZone: {
736
930
  /**
737
931
  * Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`.
738
932
  *
739
- * @since 3.6.0
740
- * @category time zones
741
- * @example
933
+ * **Example** (Setting time zones)
934
+ *
742
935
  * ```ts
743
936
  * import { DateTime, Effect } from "effect"
744
937
  *
@@ -750,6 +943,9 @@ export const setZone: {
750
943
  * const zoned: DateTime.Zoned = DateTime.setZone(now, zone)
751
944
  * })
752
945
  * ```
946
+ *
947
+ * @category time zones
948
+ * @since 3.6.0
753
949
  */
754
950
  (
755
951
  self: DateTime,
@@ -766,9 +962,8 @@ export const setZone: {
766
962
  *
767
963
  * The offset is in milliseconds.
768
964
  *
769
- * @since 3.6.0
770
- * @category time zones
771
- * @example
965
+ * **Example** (Setting fixed-offset time zones)
966
+ *
772
967
  * ```ts
773
968
  * import { DateTime, Effect } from "effect"
774
969
  *
@@ -779,6 +974,9 @@ export const setZone: {
779
974
  * const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000)
780
975
  * })
781
976
  * ```
977
+ *
978
+ * @category time zones
979
+ * @since 3.6.0
782
980
  */
783
981
  export const setZoneOffset: {
784
982
  /**
@@ -786,9 +984,8 @@ export const setZoneOffset: {
786
984
  *
787
985
  * The offset is in milliseconds.
788
986
  *
789
- * @since 3.6.0
790
- * @category time zones
791
- * @example
987
+ * **Example** (Setting fixed-offset time zones)
988
+ *
792
989
  * ```ts
793
990
  * import { DateTime, Effect } from "effect"
794
991
  *
@@ -799,6 +996,9 @@ export const setZoneOffset: {
799
996
  * const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000)
800
997
  * })
801
998
  * ```
999
+ *
1000
+ * @category time zones
1001
+ * @since 3.6.0
802
1002
  */
803
1003
  (
804
1004
  offset: number,
@@ -812,9 +1012,8 @@ export const setZoneOffset: {
812
1012
  *
813
1013
  * The offset is in milliseconds.
814
1014
  *
815
- * @since 3.6.0
816
- * @category time zones
817
- * @example
1015
+ * **Example** (Setting fixed-offset time zones)
1016
+ *
818
1017
  * ```ts
819
1018
  * import { DateTime, Effect } from "effect"
820
1019
  *
@@ -825,6 +1024,9 @@ export const setZoneOffset: {
825
1024
  * const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000)
826
1025
  * })
827
1026
  * ```
1027
+ *
1028
+ * @category time zones
1029
+ * @since 3.6.0
828
1030
  */
829
1031
  (
830
1032
  self: DateTime,
@@ -841,7 +1043,8 @@ export const setZoneOffset: {
841
1043
  *
842
1044
  * If the time zone is invalid, an `IllegalArgumentError` will be thrown.
843
1045
  *
844
- * @example
1046
+ * **Example** (Creating named time zones unsafely)
1047
+ *
845
1048
  * ```ts
846
1049
  * import { DateTime } from "effect"
847
1050
  *
@@ -855,8 +1058,8 @@ export const setZoneOffset: {
855
1058
  * // DateTime.zoneMakeNamedUnsafe("Invalid/Zone")
856
1059
  * ```
857
1060
  *
858
- * @since 3.6.0
859
1061
  * @category time zones
1062
+ * @since 3.6.0
860
1063
  */
861
1064
  export const zoneMakeNamedUnsafe: (zoneId: string) => TimeZone.Named = Internal.zoneMakeNamedUnsafe
862
1065
 
@@ -866,7 +1069,8 @@ export const zoneMakeNamedUnsafe: (zoneId: string) => TimeZone.Named = Internal.
866
1069
  * The offset is specified in milliseconds from UTC. Positive values are
867
1070
  * ahead of UTC, negative values are behind UTC.
868
1071
  *
869
- * @example
1072
+ * **Example** (Creating fixed-offset time zones)
1073
+ *
870
1074
  * ```ts
871
1075
  * import { DateTime } from "effect"
872
1076
  *
@@ -888,7 +1092,8 @@ export const zoneMakeOffset: (offset: number) => TimeZone.Offset = Internal.zone
888
1092
  *
889
1093
  * If the time zone is invalid, `None` will be returned.
890
1094
  *
891
- * @example
1095
+ * **Example** (Creating optional named time zones)
1096
+ *
892
1097
  * ```ts
893
1098
  * import { DateTime } from "effect"
894
1099
  *
@@ -909,7 +1114,8 @@ export const zoneMakeNamed: (zoneId: string) => Option.Option<TimeZone.Named> =
909
1114
  *
910
1115
  * If the time zone is invalid, it will fail with an `IllegalArgumentError`.
911
1116
  *
912
- * @example
1117
+ * **Example** (Creating named time zones effectfully)
1118
+ *
913
1119
  * ```ts
914
1120
  * import { DateTime, Effect } from "effect"
915
1121
  *
@@ -932,15 +1138,13 @@ export const zoneMakeNamedEffect: (zoneId: string) => Effect.Effect<TimeZone.Nam
932
1138
  * This uses the system's configured time zone, which may vary depending
933
1139
  * on the runtime environment.
934
1140
  *
935
- * @example
1141
+ * **Example** (Creating local time zones)
1142
+ *
936
1143
  * ```ts
937
1144
  * import { DateTime } from "effect"
938
1145
  *
939
1146
  * const localZone = DateTime.zoneMakeLocal()
940
- * const now = DateTime.nowUnsafe()
941
- * const localTime = DateTime.setZone(now, localZone)
942
- *
943
- * console.log(DateTime.formatIsoZoned(localTime))
1147
+ * console.log(DateTime.zoneToString(localZone)) // Output depends on system time zone
944
1148
  * ```
945
1149
  *
946
1150
  * @category time zones
@@ -953,7 +1157,8 @@ export const zoneMakeLocal: () => TimeZone.Named = Internal.zoneMakeLocal
953
1157
  *
954
1158
  * Supports both IANA time zone identifiers and offset formats like "+03:00".
955
1159
  *
956
- * @example
1160
+ * **Example** (Parsing time zones)
1161
+ *
957
1162
  * ```ts
958
1163
  * import { DateTime } from "effect"
959
1164
  *
@@ -974,9 +1179,8 @@ export const zoneFromString: (zone: string) => Option.Option<TimeZone> = Interna
974
1179
  /**
975
1180
  * Format a `TimeZone` as a string.
976
1181
  *
977
- * @since 3.6.0
978
- * @category time zones
979
- * @example
1182
+ * **Example** (Formatting time zones)
1183
+ *
980
1184
  * ```ts
981
1185
  * import { DateTime } from "effect"
982
1186
  *
@@ -986,6 +1190,9 @@ export const zoneFromString: (zone: string) => Option.Option<TimeZone> = Interna
986
1190
  * // Outputs "Europe/London"
987
1191
  * DateTime.zoneToString(DateTime.zoneMakeNamedUnsafe("Europe/London"))
988
1192
  * ```
1193
+ *
1194
+ * @category time zones
1195
+ * @since 3.6.0
989
1196
  */
990
1197
  export const zoneToString: (self: TimeZone) => string = Internal.zoneToString
991
1198
 
@@ -993,9 +1200,8 @@ export const zoneToString: (self: TimeZone) => string = Internal.zoneToString
993
1200
  * Set the time zone of a `DateTime` from an IANA time zone identifier. If the
994
1201
  * time zone is invalid, `None` will be returned.
995
1202
  *
996
- * @since 3.6.0
997
- * @category time zones
998
- * @example
1203
+ * **Example** (Setting named time zones safely)
1204
+ *
999
1205
  * ```ts
1000
1206
  * import { DateTime, Effect } from "effect"
1001
1207
  *
@@ -1005,15 +1211,17 @@ export const zoneToString: (self: TimeZone) => string = Internal.zoneToString
1005
1211
  * DateTime.setZoneNamed(now, "Europe/London")
1006
1212
  * })
1007
1213
  * ```
1214
+ *
1215
+ * @category time zones
1216
+ * @since 3.6.0
1008
1217
  */
1009
1218
  export const setZoneNamed: {
1010
1219
  /**
1011
1220
  * Set the time zone of a `DateTime` from an IANA time zone identifier. If the
1012
1221
  * time zone is invalid, `None` will be returned.
1013
1222
  *
1014
- * @since 3.6.0
1015
- * @category time zones
1016
- * @example
1223
+ * **Example** (Setting named time zones safely)
1224
+ *
1017
1225
  * ```ts
1018
1226
  * import { DateTime, Effect } from "effect"
1019
1227
  *
@@ -1023,6 +1231,9 @@ export const setZoneNamed: {
1023
1231
  * DateTime.setZoneNamed(now, "Europe/London")
1024
1232
  * })
1025
1233
  * ```
1234
+ *
1235
+ * @category time zones
1236
+ * @since 3.6.0
1026
1237
  */
1027
1238
  (
1028
1239
  zoneId: string,
@@ -1035,9 +1246,8 @@ export const setZoneNamed: {
1035
1246
  * Set the time zone of a `DateTime` from an IANA time zone identifier. If the
1036
1247
  * time zone is invalid, `None` will be returned.
1037
1248
  *
1038
- * @since 3.6.0
1039
- * @category time zones
1040
- * @example
1249
+ * **Example** (Setting named time zones safely)
1250
+ *
1041
1251
  * ```ts
1042
1252
  * import { DateTime, Effect } from "effect"
1043
1253
  *
@@ -1047,6 +1257,9 @@ export const setZoneNamed: {
1047
1257
  * DateTime.setZoneNamed(now, "Europe/London")
1048
1258
  * })
1049
1259
  * ```
1260
+ *
1261
+ * @category time zones
1262
+ * @since 3.6.0
1050
1263
  */
1051
1264
  (
1052
1265
  self: DateTime,
@@ -1062,9 +1275,8 @@ export const setZoneNamed: {
1062
1275
  * Set the time zone of a `DateTime` from an IANA time zone identifier. If the
1063
1276
  * time zone is invalid, an `IllegalArgumentError` will be thrown.
1064
1277
  *
1065
- * @since 3.6.0
1066
- * @category time zones
1067
- * @example
1278
+ * **Example** (Setting named time zones unsafely)
1279
+ *
1068
1280
  * ```ts
1069
1281
  * import { DateTime, Effect } from "effect"
1070
1282
  *
@@ -1074,15 +1286,17 @@ export const setZoneNamed: {
1074
1286
  * DateTime.setZoneNamedUnsafe(now, "Europe/London")
1075
1287
  * })
1076
1288
  * ```
1289
+ *
1290
+ * @category time zones
1291
+ * @since 3.6.0
1077
1292
  */
1078
1293
  export const setZoneNamedUnsafe: {
1079
1294
  /**
1080
1295
  * Set the time zone of a `DateTime` from an IANA time zone identifier. If the
1081
1296
  * time zone is invalid, an `IllegalArgumentError` will be thrown.
1082
1297
  *
1083
- * @since 3.6.0
1084
- * @category time zones
1085
- * @example
1298
+ * **Example** (Setting named time zones unsafely)
1299
+ *
1086
1300
  * ```ts
1087
1301
  * import { DateTime, Effect } from "effect"
1088
1302
  *
@@ -1092,6 +1306,9 @@ export const setZoneNamedUnsafe: {
1092
1306
  * DateTime.setZoneNamedUnsafe(now, "Europe/London")
1093
1307
  * })
1094
1308
  * ```
1309
+ *
1310
+ * @category time zones
1311
+ * @since 3.6.0
1095
1312
  */
1096
1313
  (
1097
1314
  zoneId: string,
@@ -1104,9 +1321,8 @@ export const setZoneNamedUnsafe: {
1104
1321
  * Set the time zone of a `DateTime` from an IANA time zone identifier. If the
1105
1322
  * time zone is invalid, an `IllegalArgumentError` will be thrown.
1106
1323
  *
1107
- * @since 3.6.0
1108
- * @category time zones
1109
- * @example
1324
+ * **Example** (Setting named time zones unsafely)
1325
+ *
1110
1326
  * ```ts
1111
1327
  * import { DateTime, Effect } from "effect"
1112
1328
  *
@@ -1116,6 +1332,9 @@ export const setZoneNamedUnsafe: {
1116
1332
  * DateTime.setZoneNamedUnsafe(now, "Europe/London")
1117
1333
  * })
1118
1334
  * ```
1335
+ *
1336
+ * @category time zones
1337
+ * @since 3.6.0
1119
1338
  */
1120
1339
  (
1121
1340
  self: DateTime,
@@ -1139,9 +1358,8 @@ export const setZoneNamedUnsafe: {
1139
1358
  * `other` is *before* `self`, the result will be a negative `Duration`. If they
1140
1359
  * are equal, the result will be a `Duration` of zero.
1141
1360
  *
1142
- * @since 3.6.0
1143
- * @category comparisons
1144
- * @example
1361
+ * **Example** (Measuring distance between DateTime values)
1362
+ *
1145
1363
  * ```ts
1146
1364
  * import { DateTime, Effect } from "effect"
1147
1365
  *
@@ -1153,6 +1371,9 @@ export const setZoneNamedUnsafe: {
1153
1371
  * DateTime.distance(now, other)
1154
1372
  * })
1155
1373
  * ```
1374
+ *
1375
+ * @category comparisons
1376
+ * @since 3.6.0
1156
1377
  */
1157
1378
  export const distance: {
1158
1379
  // =============================================================================
@@ -1167,9 +1388,8 @@ export const distance: {
1167
1388
  * `other` is *before* `self`, the result will be a negative `Duration`. If they
1168
1389
  * are equal, the result will be a `Duration` of zero.
1169
1390
  *
1170
- * @since 3.6.0
1171
- * @category comparisons
1172
- * @example
1391
+ * **Example** (Measuring distance between DateTime values)
1392
+ *
1173
1393
  * ```ts
1174
1394
  * import { DateTime, Effect } from "effect"
1175
1395
  *
@@ -1181,6 +1401,9 @@ export const distance: {
1181
1401
  * DateTime.distance(now, other)
1182
1402
  * })
1183
1403
  * ```
1404
+ *
1405
+ * @category comparisons
1406
+ * @since 3.6.0
1184
1407
  */
1185
1408
  (other: DateTime): (self: DateTime) => Duration.Duration
1186
1409
  // =============================================================================
@@ -1195,9 +1418,8 @@ export const distance: {
1195
1418
  * `other` is *before* `self`, the result will be a negative `Duration`. If they
1196
1419
  * are equal, the result will be a `Duration` of zero.
1197
1420
  *
1198
- * @since 3.6.0
1199
- * @category comparisons
1200
- * @example
1421
+ * **Example** (Measuring distance between DateTime values)
1422
+ *
1201
1423
  * ```ts
1202
1424
  * import { DateTime, Effect } from "effect"
1203
1425
  *
@@ -1209,6 +1431,9 @@ export const distance: {
1209
1431
  * DateTime.distance(now, other)
1210
1432
  * })
1211
1433
  * ```
1434
+ *
1435
+ * @category comparisons
1436
+ * @since 3.6.0
1212
1437
  */
1213
1438
  (self: DateTime, other: DateTime): Duration.Duration
1214
1439
  } = Internal.distance
@@ -1216,7 +1441,8 @@ export const distance: {
1216
1441
  /**
1217
1442
  * Returns the earlier of two `DateTime` values.
1218
1443
  *
1219
- * @example
1444
+ * **Example** (Selecting the earlier DateTime)
1445
+ *
1220
1446
  * ```ts
1221
1447
  * import { DateTime } from "effect"
1222
1448
  *
@@ -1234,7 +1460,8 @@ export const min: {
1234
1460
  /**
1235
1461
  * Returns the earlier of two `DateTime` values.
1236
1462
  *
1237
- * @example
1463
+ * **Example** (Selecting the earlier DateTime)
1464
+ *
1238
1465
  * ```ts
1239
1466
  * import { DateTime } from "effect"
1240
1467
  *
@@ -1252,7 +1479,8 @@ export const min: {
1252
1479
  /**
1253
1480
  * Returns the earlier of two `DateTime` values.
1254
1481
  *
1255
- * @example
1482
+ * **Example** (Selecting the earlier DateTime)
1483
+ *
1256
1484
  * ```ts
1257
1485
  * import { DateTime } from "effect"
1258
1486
  *
@@ -1272,7 +1500,8 @@ export const min: {
1272
1500
  /**
1273
1501
  * Returns the later of two `DateTime` values.
1274
1502
  *
1275
- * @example
1503
+ * **Example** (Selecting the later DateTime)
1504
+ *
1276
1505
  * ```ts
1277
1506
  * import { DateTime } from "effect"
1278
1507
  *
@@ -1290,7 +1519,8 @@ export const max: {
1290
1519
  /**
1291
1520
  * Returns the later of two `DateTime` values.
1292
1521
  *
1293
- * @example
1522
+ * **Example** (Selecting the later DateTime)
1523
+ *
1294
1524
  * ```ts
1295
1525
  * import { DateTime } from "effect"
1296
1526
  *
@@ -1308,7 +1538,8 @@ export const max: {
1308
1538
  /**
1309
1539
  * Returns the later of two `DateTime` values.
1310
1540
  *
1311
- * @example
1541
+ * **Example** (Selecting the later DateTime)
1542
+ *
1312
1543
  * ```ts
1313
1544
  * import { DateTime } from "effect"
1314
1545
  *
@@ -1328,7 +1559,8 @@ export const max: {
1328
1559
  /**
1329
1560
  * Checks if the first `DateTime` is after the second `DateTime`.
1330
1561
  *
1331
- * @example
1562
+ * **Example** (Checking whether a DateTime is later)
1563
+ *
1332
1564
  * ```ts
1333
1565
  * import { DateTime } from "effect"
1334
1566
  *
@@ -1346,7 +1578,8 @@ export const isGreaterThan: {
1346
1578
  /**
1347
1579
  * Checks if the first `DateTime` is after the second `DateTime`.
1348
1580
  *
1349
- * @example
1581
+ * **Example** (Checking whether a DateTime is later)
1582
+ *
1350
1583
  * ```ts
1351
1584
  * import { DateTime } from "effect"
1352
1585
  *
@@ -1364,7 +1597,8 @@ export const isGreaterThan: {
1364
1597
  /**
1365
1598
  * Checks if the first `DateTime` is after the second `DateTime`.
1366
1599
  *
1367
- * @example
1600
+ * **Example** (Checking whether a DateTime is later)
1601
+ *
1368
1602
  * ```ts
1369
1603
  * import { DateTime } from "effect"
1370
1604
  *
@@ -1384,7 +1618,8 @@ export const isGreaterThan: {
1384
1618
  /**
1385
1619
  * Checks if the first `DateTime` is after or equal to the second `DateTime`.
1386
1620
  *
1387
- * @example
1621
+ * **Example** (Checking whether a DateTime is later or equal)
1622
+ *
1388
1623
  * ```ts
1389
1624
  * import { DateTime } from "effect"
1390
1625
  *
@@ -1404,7 +1639,8 @@ export const isGreaterThanOrEqualTo: {
1404
1639
  /**
1405
1640
  * Checks if the first `DateTime` is after or equal to the second `DateTime`.
1406
1641
  *
1407
- * @example
1642
+ * **Example** (Checking whether a DateTime is later or equal)
1643
+ *
1408
1644
  * ```ts
1409
1645
  * import { DateTime } from "effect"
1410
1646
  *
@@ -1424,7 +1660,8 @@ export const isGreaterThanOrEqualTo: {
1424
1660
  /**
1425
1661
  * Checks if the first `DateTime` is after or equal to the second `DateTime`.
1426
1662
  *
1427
- * @example
1663
+ * **Example** (Checking whether a DateTime is later or equal)
1664
+ *
1428
1665
  * ```ts
1429
1666
  * import { DateTime } from "effect"
1430
1667
  *
@@ -1446,7 +1683,8 @@ export const isGreaterThanOrEqualTo: {
1446
1683
  /**
1447
1684
  * Checks if the first `DateTime` is before the second `DateTime`.
1448
1685
  *
1449
- * @example
1686
+ * **Example** (Checking whether a DateTime is earlier)
1687
+ *
1450
1688
  * ```ts
1451
1689
  * import { DateTime } from "effect"
1452
1690
  *
@@ -1464,7 +1702,8 @@ export const isLessThan: {
1464
1702
  /**
1465
1703
  * Checks if the first `DateTime` is before the second `DateTime`.
1466
1704
  *
1467
- * @example
1705
+ * **Example** (Checking whether a DateTime is earlier)
1706
+ *
1468
1707
  * ```ts
1469
1708
  * import { DateTime } from "effect"
1470
1709
  *
@@ -1482,7 +1721,8 @@ export const isLessThan: {
1482
1721
  /**
1483
1722
  * Checks if the first `DateTime` is before the second `DateTime`.
1484
1723
  *
1485
- * @example
1724
+ * **Example** (Checking whether a DateTime is earlier)
1725
+ *
1486
1726
  * ```ts
1487
1727
  * import { DateTime } from "effect"
1488
1728
  *
@@ -1502,7 +1742,8 @@ export const isLessThan: {
1502
1742
  /**
1503
1743
  * Checks if the first `DateTime` is before or equal to the second `DateTime`.
1504
1744
  *
1505
- * @example
1745
+ * **Example** (Checking whether a DateTime is earlier or equal)
1746
+ *
1506
1747
  * ```ts
1507
1748
  * import { DateTime } from "effect"
1508
1749
  *
@@ -1522,7 +1763,8 @@ export const isLessThanOrEqualTo: {
1522
1763
  /**
1523
1764
  * Checks if the first `DateTime` is before or equal to the second `DateTime`.
1524
1765
  *
1525
- * @example
1766
+ * **Example** (Checking whether a DateTime is earlier or equal)
1767
+ *
1526
1768
  * ```ts
1527
1769
  * import { DateTime } from "effect"
1528
1770
  *
@@ -1542,7 +1784,8 @@ export const isLessThanOrEqualTo: {
1542
1784
  /**
1543
1785
  * Checks if the first `DateTime` is before or equal to the second `DateTime`.
1544
1786
  *
1545
- * @example
1787
+ * **Example** (Checking whether a DateTime is earlier or equal)
1788
+ *
1546
1789
  * ```ts
1547
1790
  * import { DateTime } from "effect"
1548
1791
  *
@@ -1564,7 +1807,8 @@ export const isLessThanOrEqualTo: {
1564
1807
  /**
1565
1808
  * Checks if a `DateTime` is between two other `DateTime` values (inclusive).
1566
1809
  *
1567
- * @example
1810
+ * **Example** (Checking whether a DateTime is within bounds)
1811
+ *
1568
1812
  * ```ts
1569
1813
  * import { DateTime } from "effect"
1570
1814
  *
@@ -1582,7 +1826,8 @@ export const between: {
1582
1826
  /**
1583
1827
  * Checks if a `DateTime` is between two other `DateTime` values (inclusive).
1584
1828
  *
1585
- * @example
1829
+ * **Example** (Checking whether a DateTime is within bounds)
1830
+ *
1586
1831
  * ```ts
1587
1832
  * import { DateTime } from "effect"
1588
1833
  *
@@ -1600,7 +1845,8 @@ export const between: {
1600
1845
  /**
1601
1846
  * Checks if a `DateTime` is between two other `DateTime` values (inclusive).
1602
1847
  *
1603
- * @example
1848
+ * **Example** (Checking whether a DateTime is within bounds)
1849
+ *
1604
1850
  * ```ts
1605
1851
  * import { DateTime } from "effect"
1606
1852
  *
@@ -1622,7 +1868,8 @@ export const between: {
1622
1868
  *
1623
1869
  * This is an effectful operation that uses the current time from the `Clock` service.
1624
1870
  *
1625
- * @example
1871
+ * **Example** (Checking future DateTime values effectfully)
1872
+ *
1626
1873
  * ```ts
1627
1874
  * import { DateTime, Effect } from "effect"
1628
1875
  *
@@ -1643,7 +1890,8 @@ export const isFuture: (self: DateTime) => Effect.Effect<boolean> = Internal.isF
1643
1890
  *
1644
1891
  * This is a synchronous version that uses `Date.now()` directly.
1645
1892
  *
1646
- * @example
1893
+ * **Example** (Checking future DateTime values unsafely)
1894
+ *
1647
1895
  * ```ts
1648
1896
  * import { DateTime } from "effect"
1649
1897
  *
@@ -1664,7 +1912,8 @@ export const isFutureUnsafe: (self: DateTime) => boolean = Internal.isFutureUnsa
1664
1912
  *
1665
1913
  * This is an effectful operation that uses the current time from the `Clock` service.
1666
1914
  *
1667
- * @example
1915
+ * **Example** (Checking past DateTime values effectfully)
1916
+ *
1668
1917
  * ```ts
1669
1918
  * import { DateTime, Effect } from "effect"
1670
1919
  *
@@ -1685,7 +1934,8 @@ export const isPast: (self: DateTime) => Effect.Effect<boolean> = Internal.isPas
1685
1934
  *
1686
1935
  * This is a synchronous version that uses `Date.now()` directly.
1687
1936
  *
1688
- * @example
1937
+ * **Example** (Checking past DateTime values unsafely)
1938
+ *
1689
1939
  * ```ts
1690
1940
  * import { DateTime } from "effect"
1691
1941
  *
@@ -1710,7 +1960,8 @@ export const isPastUnsafe: (self: DateTime) => boolean = Internal.isPastUnsafe
1710
1960
  *
1711
1961
  * This always returns the UTC representation, ignoring any time zone information.
1712
1962
  *
1713
- * @example
1963
+ * **Example** (Converting DateTime values to UTC Dates)
1964
+ *
1714
1965
  * ```ts
1715
1966
  * import { DateTime } from "effect"
1716
1967
  *
@@ -1733,7 +1984,8 @@ export const toDateUtc: (self: DateTime) => Date = Internal.toDateUtc
1733
1984
  * For `DateTime.Zoned`, this adjusts for the time zone before converting.
1734
1985
  * For `DateTime.Utc`, this is equivalent to `toDateUtc`.
1735
1986
  *
1736
- * @example
1987
+ * **Example** (Converting DateTime values to Dates)
1988
+ *
1737
1989
  * ```ts
1738
1990
  * import { DateTime } from "effect"
1739
1991
  *
@@ -1757,7 +2009,8 @@ export const toDate: (self: DateTime) => Date = Internal.toDate
1757
2009
  * Returns the offset from UTC in milliseconds. Positive values indicate
1758
2010
  * time zones ahead of UTC, negative values indicate time zones behind UTC.
1759
2011
  *
1760
- * @example
2012
+ * **Example** (Reading zoned offsets)
2013
+ *
1761
2014
  * ```ts
1762
2015
  * import { DateTime } from "effect"
1763
2016
  *
@@ -1779,7 +2032,8 @@ export const zonedOffset: (self: Zoned) => number = Internal.zonedOffset
1779
2032
  *
1780
2033
  * The offset is formatted as "±HH:MM".
1781
2034
  *
1782
- * @example
2035
+ * **Example** (Formatting zoned offsets)
2036
+ *
1783
2037
  * ```ts
1784
2038
  * import { DateTime } from "effect"
1785
2039
  *
@@ -1801,7 +2055,8 @@ export const zonedOffsetIso: (self: Zoned) => string = Internal.zonedOffsetIso
1801
2055
  *
1802
2056
  * This returns the UTC timestamp regardless of any time zone information.
1803
2057
  *
1804
- * @example
2058
+ * **Example** (Reading epoch milliseconds)
2059
+ *
1805
2060
  * ```ts
1806
2061
  * import { DateTime } from "effect"
1807
2062
  *
@@ -1809,7 +2064,6 @@ export const zonedOffsetIso: (self: Zoned) => string = Internal.zonedOffsetIso
1809
2064
  * const epochMillis = DateTime.toEpochMillis(dt)
1810
2065
  *
1811
2066
  * console.log(epochMillis) // 1704067200000
1812
- * console.log(new Date(epochMillis).toISOString()) // "2024-01-01T00:00:00.000Z"
1813
2067
  * ```
1814
2068
  *
1815
2069
  * @category conversions
@@ -1821,9 +2075,8 @@ export const toEpochMillis: (self: DateTime) => number = Internal.toEpochMillis
1821
2075
  * Remove the time aspect of a `DateTime`, first adjusting for the time
1822
2076
  * zone. It will return a `DateTime.Utc` only containing the date.
1823
2077
  *
1824
- * @since 3.6.0
1825
- * @category conversions
1826
- * @example
2078
+ * **Example** (Removing time components)
2079
+ *
1827
2080
  * ```ts
1828
2081
  * import { DateTime } from "effect"
1829
2082
  *
@@ -1836,6 +2089,9 @@ export const toEpochMillis: (self: DateTime) => number = Internal.toEpochMillis
1836
2089
  * DateTime.formatIso
1837
2090
  * )
1838
2091
  * ```
2092
+ *
2093
+ * @category conversions
2094
+ * @since 3.6.0
1839
2095
  */
1840
2096
  export const removeTime: (self: DateTime) => Utc = Internal.removeTime
1841
2097
 
@@ -1848,7 +2104,8 @@ export const removeTime: (self: DateTime) => Utc = Internal.removeTime
1848
2104
  *
1849
2105
  * The parts will be time zone adjusted if the `DateTime` is zoned.
1850
2106
  *
1851
- * @example
2107
+ * **Example** (Reading DateTime parts)
2108
+ *
1852
2109
  * ```ts
1853
2110
  * import { DateTime } from "effect"
1854
2111
  *
@@ -1878,7 +2135,8 @@ export const toParts: (self: DateTime) => DateTime.PartsWithWeekday = Internal.t
1878
2135
  *
1879
2136
  * The parts will always be in UTC, ignoring any time zone information.
1880
2137
  *
1881
- * @example
2138
+ * **Example** (Reading UTC DateTime parts)
2139
+ *
1882
2140
  * ```ts
1883
2141
  * import { DateTime } from "effect"
1884
2142
  *
@@ -1901,17 +2159,18 @@ export const toPartsUtc: (self: DateTime) => DateTime.PartsWithWeekday = Interna
1901
2159
  *
1902
2160
  * The part will be in the UTC time zone.
1903
2161
  *
1904
- * @since 3.6.0
1905
- * @category parts
1906
- * @example
2162
+ * **Example** (Reading UTC DateTime parts by key)
2163
+ *
1907
2164
  * ```ts
1908
2165
  * import { DateTime } from "effect"
1909
- * import * as assert from "node:assert"
1910
2166
  *
1911
- * const now = DateTime.makeUnsafe({ year: 2024 })
1912
- * const year = DateTime.getPartUtc(now, "year")
1913
- * assert.strictEqual(year, 2024)
2167
+ * const dateTime = DateTime.makeUnsafe({ year: 2024 })
2168
+ * const year = DateTime.getPartUtc(dateTime, "year")
2169
+ * console.log(year) // 2024
1914
2170
  * ```
2171
+ *
2172
+ * @category parts
2173
+ * @since 3.6.0
1915
2174
  */
1916
2175
  export const getPartUtc: {
1917
2176
  /**
@@ -1919,17 +2178,18 @@ export const getPartUtc: {
1919
2178
  *
1920
2179
  * The part will be in the UTC time zone.
1921
2180
  *
1922
- * @since 3.6.0
1923
- * @category parts
1924
- * @example
2181
+ * **Example** (Reading UTC DateTime parts by key)
2182
+ *
1925
2183
  * ```ts
1926
2184
  * import { DateTime } from "effect"
1927
- * import * as assert from "node:assert"
1928
2185
  *
1929
- * const now = DateTime.makeUnsafe({ year: 2024 })
1930
- * const year = DateTime.getPartUtc(now, "year")
1931
- * assert.strictEqual(year, 2024)
2186
+ * const dateTime = DateTime.makeUnsafe({ year: 2024 })
2187
+ * const year = DateTime.getPartUtc(dateTime, "year")
2188
+ * console.log(year) // 2024
1932
2189
  * ```
2190
+ *
2191
+ * @category parts
2192
+ * @since 3.6.0
1933
2193
  */
1934
2194
  (part: keyof DateTime.PartsWithWeekday): (self: DateTime) => number
1935
2195
  /**
@@ -1937,17 +2197,18 @@ export const getPartUtc: {
1937
2197
  *
1938
2198
  * The part will be in the UTC time zone.
1939
2199
  *
1940
- * @since 3.6.0
1941
- * @category parts
1942
- * @example
2200
+ * **Example** (Reading UTC DateTime parts by key)
2201
+ *
1943
2202
  * ```ts
1944
2203
  * import { DateTime } from "effect"
1945
- * import * as assert from "node:assert"
1946
2204
  *
1947
- * const now = DateTime.makeUnsafe({ year: 2024 })
1948
- * const year = DateTime.getPartUtc(now, "year")
1949
- * assert.strictEqual(year, 2024)
2205
+ * const dateTime = DateTime.makeUnsafe({ year: 2024 })
2206
+ * const year = DateTime.getPartUtc(dateTime, "year")
2207
+ * console.log(year) // 2024
1950
2208
  * ```
2209
+ *
2210
+ * @category parts
2211
+ * @since 3.6.0
1951
2212
  */
1952
2213
  (self: DateTime, part: keyof DateTime.PartsWithWeekday): number
1953
2214
  } = Internal.getPartUtc
@@ -1957,19 +2218,20 @@ export const getPartUtc: {
1957
2218
  *
1958
2219
  * The part will be time zone adjusted.
1959
2220
  *
1960
- * @since 3.6.0
1961
- * @category parts
1962
- * @example
2221
+ * **Example** (Reading DateTime parts by key)
2222
+ *
1963
2223
  * ```ts
1964
2224
  * import { DateTime } from "effect"
1965
- * import * as assert from "node:assert"
1966
2225
  *
1967
- * const now = DateTime.makeZonedUnsafe({ year: 2024 }, {
2226
+ * const dateTime = DateTime.makeZonedUnsafe({ year: 2024 }, {
1968
2227
  * timeZone: "Europe/London"
1969
2228
  * })
1970
- * const year = DateTime.getPart(now, "year")
1971
- * assert.strictEqual(year, 2024)
2229
+ * const year = DateTime.getPart(dateTime, "year")
2230
+ * console.log(year) // 2024
1972
2231
  * ```
2232
+ *
2233
+ * @category parts
2234
+ * @since 3.6.0
1973
2235
  */
1974
2236
  export const getPart: {
1975
2237
  /**
@@ -1977,19 +2239,20 @@ export const getPart: {
1977
2239
  *
1978
2240
  * The part will be time zone adjusted.
1979
2241
  *
1980
- * @since 3.6.0
1981
- * @category parts
1982
- * @example
2242
+ * **Example** (Reading DateTime parts by key)
2243
+ *
1983
2244
  * ```ts
1984
2245
  * import { DateTime } from "effect"
1985
- * import * as assert from "node:assert"
1986
2246
  *
1987
- * const now = DateTime.makeZonedUnsafe({ year: 2024 }, {
2247
+ * const dateTime = DateTime.makeZonedUnsafe({ year: 2024 }, {
1988
2248
  * timeZone: "Europe/London"
1989
2249
  * })
1990
- * const year = DateTime.getPart(now, "year")
1991
- * assert.strictEqual(year, 2024)
2250
+ * const year = DateTime.getPart(dateTime, "year")
2251
+ * console.log(year) // 2024
1992
2252
  * ```
2253
+ *
2254
+ * @category parts
2255
+ * @since 3.6.0
1993
2256
  */
1994
2257
  (part: keyof DateTime.PartsWithWeekday): (self: DateTime) => number
1995
2258
  /**
@@ -1997,19 +2260,20 @@ export const getPart: {
1997
2260
  *
1998
2261
  * The part will be time zone adjusted.
1999
2262
  *
2000
- * @since 3.6.0
2001
- * @category parts
2002
- * @example
2263
+ * **Example** (Reading DateTime parts by key)
2264
+ *
2003
2265
  * ```ts
2004
2266
  * import { DateTime } from "effect"
2005
- * import * as assert from "node:assert"
2006
2267
  *
2007
- * const now = DateTime.makeZonedUnsafe({ year: 2024 }, {
2268
+ * const dateTime = DateTime.makeZonedUnsafe({ year: 2024 }, {
2008
2269
  * timeZone: "Europe/London"
2009
2270
  * })
2010
- * const year = DateTime.getPart(now, "year")
2011
- * assert.strictEqual(year, 2024)
2271
+ * const year = DateTime.getPart(dateTime, "year")
2272
+ * console.log(year) // 2024
2012
2273
  * ```
2274
+ *
2275
+ * @category parts
2276
+ * @since 3.6.0
2013
2277
  */
2014
2278
  (self: DateTime, part: keyof DateTime.PartsWithWeekday): number
2015
2279
  } = Internal.getPart
@@ -2019,7 +2283,8 @@ export const getPart: {
2019
2283
  *
2020
2284
  * The date will be time zone adjusted for `DateTime.Zoned`.
2021
2285
  *
2022
- * @example
2286
+ * **Example** (Updating DateTime parts)
2287
+ *
2023
2288
  * ```ts
2024
2289
  * import { DateTime } from "effect"
2025
2290
  *
@@ -2042,7 +2307,8 @@ export const setParts: {
2042
2307
  *
2043
2308
  * The date will be time zone adjusted for `DateTime.Zoned`.
2044
2309
  *
2045
- * @example
2310
+ * **Example** (Updating DateTime parts)
2311
+ *
2046
2312
  * ```ts
2047
2313
  * import { DateTime } from "effect"
2048
2314
  *
@@ -2065,7 +2331,8 @@ export const setParts: {
2065
2331
  *
2066
2332
  * The date will be time zone adjusted for `DateTime.Zoned`.
2067
2333
  *
2068
- * @example
2334
+ * **Example** (Updating DateTime parts)
2335
+ *
2069
2336
  * ```ts
2070
2337
  * import { DateTime } from "effect"
2071
2338
  *
@@ -2090,7 +2357,8 @@ export const setParts: {
2090
2357
  *
2091
2358
  * The parts are always interpreted as UTC, ignoring any time zone information.
2092
2359
  *
2093
- * @example
2360
+ * **Example** (Updating UTC DateTime parts)
2361
+ *
2094
2362
  * ```ts
2095
2363
  * import { DateTime } from "effect"
2096
2364
  *
@@ -2112,7 +2380,8 @@ export const setPartsUtc: {
2112
2380
  *
2113
2381
  * The parts are always interpreted as UTC, ignoring any time zone information.
2114
2382
  *
2115
- * @example
2383
+ * **Example** (Updating UTC DateTime parts)
2384
+ *
2116
2385
  * ```ts
2117
2386
  * import { DateTime } from "effect"
2118
2387
  *
@@ -2134,7 +2403,8 @@ export const setPartsUtc: {
2134
2403
  *
2135
2404
  * The parts are always interpreted as UTC, ignoring any time zone information.
2136
2405
  *
2137
- * @example
2406
+ * **Example** (Updating UTC DateTime parts)
2407
+ *
2138
2408
  * ```ts
2139
2409
  * import { DateTime } from "effect"
2140
2410
  *
@@ -2158,7 +2428,15 @@ export const setPartsUtc: {
2158
2428
  // =============================================================================
2159
2429
 
2160
2430
  /**
2161
- * @example
2431
+ * Context service that supplies the ambient `TimeZone` for APIs that work in
2432
+ * the current zone, such as `DateTime.setZoneCurrent` and
2433
+ * `DateTime.nowInCurrentZone`.
2434
+ *
2435
+ * Provide it with `DateTime.withCurrentZone`, one of the `withCurrentZone*`
2436
+ * helpers, or one of the `layerCurrentZone*` layers.
2437
+ *
2438
+ * **Example** (Accessing the current time zone service)
2439
+ *
2162
2440
  * ```ts
2163
2441
  * import { DateTime, Effect } from "effect"
2164
2442
  *
@@ -2173,8 +2451,8 @@ export const setPartsUtc: {
2173
2451
  * Effect.provide(program, layer)
2174
2452
  * ```
2175
2453
  *
2176
- * @since 3.11.0
2177
2454
  * @category current time zone
2455
+ * @since 3.11.0
2178
2456
  */
2179
2457
  export class CurrentTimeZone extends Context.Service<CurrentTimeZone, TimeZone>()(
2180
2458
  "effect/DateTime/CurrentTimeZone"
@@ -2184,9 +2462,8 @@ export class CurrentTimeZone extends Context.Service<CurrentTimeZone, TimeZone>(
2184
2462
  * Set the time zone of a `DateTime` to the current time zone, which is
2185
2463
  * determined by the `CurrentTimeZone` service.
2186
2464
  *
2187
- * @since 3.6.0
2188
- * @category current time zone
2189
- * @example
2465
+ * **Example** (Setting the current time zone)
2466
+ *
2190
2467
  * ```ts
2191
2468
  * import { DateTime, Effect } from "effect"
2192
2469
  *
@@ -2197,6 +2474,9 @@ export class CurrentTimeZone extends Context.Service<CurrentTimeZone, TimeZone>(
2197
2474
  * const zoned = yield* DateTime.setZoneCurrent(now)
2198
2475
  * }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
2199
2476
  * ```
2477
+ *
2478
+ * @category current time zone
2479
+ * @since 3.6.0
2200
2480
  */
2201
2481
  export const setZoneCurrent = (self: DateTime): Effect.Effect<Zoned, never, CurrentTimeZone> =>
2202
2482
  Effect.map(CurrentTimeZone, (zone) => setZone(self, zone))
@@ -2204,9 +2484,8 @@ export const setZoneCurrent = (self: DateTime): Effect.Effect<Zoned, never, Curr
2204
2484
  /**
2205
2485
  * Provide the `CurrentTimeZone` to an effect.
2206
2486
  *
2207
- * @since 3.6.0
2208
- * @category current time zone
2209
- * @example
2487
+ * **Example** (Providing the current time zone)
2488
+ *
2210
2489
  * ```ts
2211
2490
  * import { DateTime, Effect } from "effect"
2212
2491
  *
@@ -2216,14 +2495,16 @@ export const setZoneCurrent = (self: DateTime): Effect.Effect<Zoned, never, Curr
2216
2495
  * const now = yield* DateTime.nowInCurrentZone
2217
2496
  * }).pipe(DateTime.withCurrentZone(zone))
2218
2497
  * ```
2498
+ *
2499
+ * @category current time zone
2500
+ * @since 3.6.0
2219
2501
  */
2220
2502
  export const withCurrentZone: {
2221
2503
  /**
2222
2504
  * Provide the `CurrentTimeZone` to an effect.
2223
2505
  *
2224
- * @since 3.6.0
2225
- * @category current time zone
2226
- * @example
2506
+ * **Example** (Providing the current time zone)
2507
+ *
2227
2508
  * ```ts
2228
2509
  * import { DateTime, Effect } from "effect"
2229
2510
  *
@@ -2233,14 +2514,16 @@ export const withCurrentZone: {
2233
2514
  * const now = yield* DateTime.nowInCurrentZone
2234
2515
  * }).pipe(DateTime.withCurrentZone(zone))
2235
2516
  * ```
2517
+ *
2518
+ * @category current time zone
2519
+ * @since 3.6.0
2236
2520
  */
2237
2521
  (value: TimeZone): <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>
2238
2522
  /**
2239
2523
  * Provide the `CurrentTimeZone` to an effect.
2240
2524
  *
2241
- * @since 3.6.0
2242
- * @category current time zone
2243
- * @example
2525
+ * **Example** (Providing the current time zone)
2526
+ *
2244
2527
  * ```ts
2245
2528
  * import { DateTime, Effect } from "effect"
2246
2529
  *
@@ -2250,6 +2533,9 @@ export const withCurrentZone: {
2250
2533
  * const now = yield* DateTime.nowInCurrentZone
2251
2534
  * }).pipe(DateTime.withCurrentZone(zone))
2252
2535
  * ```
2536
+ *
2537
+ * @category current time zone
2538
+ * @since 3.6.0
2253
2539
  */
2254
2540
  <A, E, R>(self: Effect.Effect<A, E, R>, value: TimeZone): Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>
2255
2541
  } = provideService(CurrentTimeZone)
@@ -2258,9 +2544,8 @@ export const withCurrentZone: {
2258
2544
  * Provide the `CurrentTimeZone` to an effect, using the system's local time
2259
2545
  * zone.
2260
2546
  *
2261
- * @since 3.6.0
2262
- * @category current time zone
2263
- * @example
2547
+ * **Example** (Providing the local time zone)
2548
+ *
2264
2549
  * ```ts
2265
2550
  * import { DateTime, Effect } from "effect"
2266
2551
  *
@@ -2269,6 +2554,9 @@ export const withCurrentZone: {
2269
2554
  * const now = yield* DateTime.nowInCurrentZone
2270
2555
  * }).pipe(DateTime.withCurrentZoneLocal)
2271
2556
  * ```
2557
+ *
2558
+ * @category current time zone
2559
+ * @since 3.6.0
2272
2560
  */
2273
2561
  export const withCurrentZoneLocal = <A, E, R>(
2274
2562
  effect: Effect.Effect<A, E, R>
@@ -2278,33 +2566,37 @@ export const withCurrentZoneLocal = <A, E, R>(
2278
2566
  /**
2279
2567
  * Provide the `CurrentTimeZone` to an effect, using a offset.
2280
2568
  *
2281
- * @since 3.6.0
2282
- * @category current time zone
2283
- * @example
2569
+ * **Example** (Providing a fixed-offset time zone)
2570
+ *
2284
2571
  * ```ts
2285
2572
  * import { DateTime, Effect } from "effect"
2286
2573
  *
2287
2574
  * Effect.gen(function*() {
2288
- * // will use the system's local time zone
2289
- * const now = yield* DateTime.nowInCurrentZone
2575
+ * const zone = yield* DateTime.CurrentTimeZone
2576
+ * console.log(DateTime.zoneToString(zone)) // "+03:00"
2290
2577
  * }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000))
2291
2578
  * ```
2579
+ *
2580
+ * @category current time zone
2581
+ * @since 3.6.0
2292
2582
  */
2293
2583
  export const withCurrentZoneOffset: {
2294
2584
  /**
2295
2585
  * Provide the `CurrentTimeZone` to an effect, using a offset.
2296
2586
  *
2297
- * @since 3.6.0
2298
- * @category current time zone
2299
- * @example
2587
+ * **Example** (Providing a fixed-offset time zone)
2588
+ *
2300
2589
  * ```ts
2301
2590
  * import { DateTime, Effect } from "effect"
2302
2591
  *
2303
2592
  * Effect.gen(function*() {
2304
- * // will use the system's local time zone
2305
- * const now = yield* DateTime.nowInCurrentZone
2593
+ * const zone = yield* DateTime.CurrentTimeZone
2594
+ * console.log(DateTime.zoneToString(zone)) // "+03:00"
2306
2595
  * }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000))
2307
2596
  * ```
2597
+ *
2598
+ * @category current time zone
2599
+ * @since 3.6.0
2308
2600
  */
2309
2601
  (offset: number): <A, E, R>(
2310
2602
  effect: Effect.Effect<A, E, R>
@@ -2312,17 +2604,19 @@ export const withCurrentZoneOffset: {
2312
2604
  /**
2313
2605
  * Provide the `CurrentTimeZone` to an effect, using a offset.
2314
2606
  *
2315
- * @since 3.6.0
2316
- * @category current time zone
2317
- * @example
2607
+ * **Example** (Providing a fixed-offset time zone)
2608
+ *
2318
2609
  * ```ts
2319
2610
  * import { DateTime, Effect } from "effect"
2320
2611
  *
2321
2612
  * Effect.gen(function*() {
2322
- * // will use the system's local time zone
2323
- * const now = yield* DateTime.nowInCurrentZone
2613
+ * const zone = yield* DateTime.CurrentTimeZone
2614
+ * console.log(DateTime.zoneToString(zone)) // "+03:00"
2324
2615
  * }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000))
2325
2616
  * ```
2617
+ *
2618
+ * @category current time zone
2619
+ * @since 3.6.0
2326
2620
  */
2327
2621
  <A, E, R>(effect: Effect.Effect<A, E, R>, offset: number): Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>
2328
2622
  } = dual(
@@ -2337,9 +2631,8 @@ export const withCurrentZoneOffset: {
2337
2631
  *
2338
2632
  * If the time zone is invalid, it will fail with an `IllegalArgumentError`.
2339
2633
  *
2340
- * @since 3.6.0
2341
- * @category current time zone
2342
- * @example
2634
+ * **Example** (Providing a named time zone)
2635
+ *
2343
2636
  * ```ts
2344
2637
  * import { DateTime, Effect } from "effect"
2345
2638
  *
@@ -2348,6 +2641,9 @@ export const withCurrentZoneOffset: {
2348
2641
  * const now = yield* DateTime.nowInCurrentZone
2349
2642
  * }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
2350
2643
  * ```
2644
+ *
2645
+ * @category current time zone
2646
+ * @since 3.6.0
2351
2647
  */
2352
2648
  export const withCurrentZoneNamed: {
2353
2649
  /**
@@ -2356,9 +2652,8 @@ export const withCurrentZoneNamed: {
2356
2652
  *
2357
2653
  * If the time zone is invalid, it will fail with an `IllegalArgumentError`.
2358
2654
  *
2359
- * @since 3.6.0
2360
- * @category current time zone
2361
- * @example
2655
+ * **Example** (Providing a named time zone)
2656
+ *
2362
2657
  * ```ts
2363
2658
  * import { DateTime, Effect } from "effect"
2364
2659
  *
@@ -2367,6 +2662,9 @@ export const withCurrentZoneNamed: {
2367
2662
  * const now = yield* DateTime.nowInCurrentZone
2368
2663
  * }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
2369
2664
  * ```
2665
+ *
2666
+ * @category current time zone
2667
+ * @since 3.6.0
2370
2668
  */
2371
2669
  (zone: string): <A, E, R>(
2372
2670
  effect: Effect.Effect<A, E, R>
@@ -2377,9 +2675,8 @@ export const withCurrentZoneNamed: {
2377
2675
  *
2378
2676
  * If the time zone is invalid, it will fail with an `IllegalArgumentError`.
2379
2677
  *
2380
- * @since 3.6.0
2381
- * @category current time zone
2382
- * @example
2678
+ * **Example** (Providing a named time zone)
2679
+ *
2383
2680
  * ```ts
2384
2681
  * import { DateTime, Effect } from "effect"
2385
2682
  *
@@ -2388,6 +2685,9 @@ export const withCurrentZoneNamed: {
2388
2685
  * const now = yield* DateTime.nowInCurrentZone
2389
2686
  * }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
2390
2687
  * ```
2688
+ *
2689
+ * @category current time zone
2690
+ * @since 3.6.0
2391
2691
  */
2392
2692
  <A, E, R>(effect: Effect.Effect<A, E, R>, zone: string): Effect.Effect<A, E | IllegalArgumentError, Exclude<R, CurrentTimeZone>>
2393
2693
  } = dual(
@@ -2402,9 +2702,8 @@ export const withCurrentZoneNamed: {
2402
2702
  /**
2403
2703
  * Get the current time as a `DateTime.Zoned`, using the `CurrentTimeZone`.
2404
2704
  *
2405
- * @since 3.6.0
2406
- * @category current time zone
2407
- * @example
2705
+ * **Example** (Getting the current time in the current zone)
2706
+ *
2408
2707
  * ```ts
2409
2708
  * import { DateTime, Effect } from "effect"
2410
2709
  *
@@ -2413,6 +2712,9 @@ export const withCurrentZoneNamed: {
2413
2712
  * const now = yield* DateTime.nowInCurrentZone
2414
2713
  * }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
2415
2714
  * ```
2715
+ *
2716
+ * @category current time zone
2717
+ * @since 3.6.0
2416
2718
  */
2417
2719
  export const nowInCurrentZone: Effect.Effect<Zoned, never, CurrentTimeZone> = Effect.flatMap(now, setZoneCurrent)
2418
2720
 
@@ -2428,7 +2730,8 @@ export const nowInCurrentZone: Effect.Effect<Zoned, never, CurrentTimeZone> = Ef
2428
2730
  *
2429
2731
  * Supports `disambiguation` when the new wall clock time is ambiguous.
2430
2732
  *
2431
- * @example
2733
+ * **Example** (Mutating DateTime values with Dates)
2734
+ *
2432
2735
  * ```ts
2433
2736
  * import { DateTime } from "effect"
2434
2737
  *
@@ -2442,8 +2745,8 @@ export const nowInCurrentZone: Effect.Effect<Zoned, never, CurrentTimeZone> = Ef
2442
2745
  * console.log(DateTime.formatIso(modified)) // "2024-01-01T15:30:00.000Z"
2443
2746
  * ```
2444
2747
  *
2445
- * @since 3.6.0
2446
2748
  * @category mapping
2749
+ * @since 3.6.0
2447
2750
  */
2448
2751
  export const mutate: {
2449
2752
  // =============================================================================
@@ -2458,7 +2761,8 @@ export const mutate: {
2458
2761
  *
2459
2762
  * Supports `disambiguation` when the new wall clock time is ambiguous.
2460
2763
  *
2461
- * @example
2764
+ * **Example** (Mutating DateTime values with Dates)
2765
+ *
2462
2766
  * ```ts
2463
2767
  * import { DateTime } from "effect"
2464
2768
  *
@@ -2472,8 +2776,8 @@ export const mutate: {
2472
2776
  * console.log(DateTime.formatIso(modified)) // "2024-01-01T15:30:00.000Z"
2473
2777
  * ```
2474
2778
  *
2475
- * @since 3.6.0
2476
2779
  * @category mapping
2780
+ * @since 3.6.0
2477
2781
  */
2478
2782
  (
2479
2783
  f: (date: Date) => void,
@@ -2493,7 +2797,8 @@ export const mutate: {
2493
2797
  *
2494
2798
  * Supports `disambiguation` when the new wall clock time is ambiguous.
2495
2799
  *
2496
- * @example
2800
+ * **Example** (Mutating DateTime values with Dates)
2801
+ *
2497
2802
  * ```ts
2498
2803
  * import { DateTime } from "effect"
2499
2804
  *
@@ -2507,8 +2812,8 @@ export const mutate: {
2507
2812
  * console.log(DateTime.formatIso(modified)) // "2024-01-01T15:30:00.000Z"
2508
2813
  * ```
2509
2814
  *
2510
- * @since 3.6.0
2511
2815
  * @category mapping
2816
+ * @since 3.6.0
2512
2817
  */
2513
2818
  <A extends DateTime>(
2514
2819
  self: A,
@@ -2522,7 +2827,8 @@ export const mutate: {
2522
2827
  /**
2523
2828
  * Modify a `DateTime` by applying a function to a cloned UTC `Date` instance.
2524
2829
  *
2525
- * @example
2830
+ * **Example** (Mutating DateTime values with UTC Dates)
2831
+ *
2526
2832
  * ```ts
2527
2833
  * import { DateTime } from "effect"
2528
2834
  *
@@ -2537,14 +2843,15 @@ export const mutate: {
2537
2843
  * console.log(DateTime.formatIso(modified)) // "2024-01-01T18:00:00.000Z"
2538
2844
  * ```
2539
2845
  *
2540
- * @since 3.6.0
2541
2846
  * @category mapping
2847
+ * @since 3.6.0
2542
2848
  */
2543
2849
  export const mutateUtc: {
2544
2850
  /**
2545
2851
  * Modify a `DateTime` by applying a function to a cloned UTC `Date` instance.
2546
2852
  *
2547
- * @example
2853
+ * **Example** (Mutating DateTime values with UTC Dates)
2854
+ *
2548
2855
  * ```ts
2549
2856
  * import { DateTime } from "effect"
2550
2857
  *
@@ -2559,14 +2866,15 @@ export const mutateUtc: {
2559
2866
  * console.log(DateTime.formatIso(modified)) // "2024-01-01T18:00:00.000Z"
2560
2867
  * ```
2561
2868
  *
2562
- * @since 3.6.0
2563
2869
  * @category mapping
2870
+ * @since 3.6.0
2564
2871
  */
2565
2872
  (f: (date: Date) => void): <A extends DateTime>(self: A) => A
2566
2873
  /**
2567
2874
  * Modify a `DateTime` by applying a function to a cloned UTC `Date` instance.
2568
2875
  *
2569
- * @example
2876
+ * **Example** (Mutating DateTime values with UTC Dates)
2877
+ *
2570
2878
  * ```ts
2571
2879
  * import { DateTime } from "effect"
2572
2880
  *
@@ -2581,8 +2889,8 @@ export const mutateUtc: {
2581
2889
  * console.log(DateTime.formatIso(modified)) // "2024-01-01T18:00:00.000Z"
2582
2890
  * ```
2583
2891
  *
2584
- * @since 3.6.0
2585
2892
  * @category mapping
2893
+ * @since 3.6.0
2586
2894
  */
2587
2895
  <A extends DateTime>(self: A, f: (date: Date) => void): A
2588
2896
  } = Internal.mutateUtc
@@ -2591,9 +2899,8 @@ export const mutateUtc: {
2591
2899
  * Transform a `DateTime` by applying a function to the number of milliseconds
2592
2900
  * since the Unix epoch.
2593
2901
  *
2594
- * @since 3.6.0
2595
- * @category mapping
2596
- * @example
2902
+ * **Example** (Mapping epoch milliseconds)
2903
+ *
2597
2904
  * ```ts
2598
2905
  * import { DateTime } from "effect"
2599
2906
  *
@@ -2602,15 +2909,17 @@ export const mutateUtc: {
2602
2909
  * DateTime.mapEpochMillis((millis) => millis + 10)
2603
2910
  * )
2604
2911
  * ```
2912
+ *
2913
+ * @category mapping
2914
+ * @since 3.6.0
2605
2915
  */
2606
2916
  export const mapEpochMillis: {
2607
2917
  /**
2608
2918
  * Transform a `DateTime` by applying a function to the number of milliseconds
2609
2919
  * since the Unix epoch.
2610
2920
  *
2611
- * @since 3.6.0
2612
- * @category mapping
2613
- * @example
2921
+ * **Example** (Mapping epoch milliseconds)
2922
+ *
2614
2923
  * ```ts
2615
2924
  * import { DateTime } from "effect"
2616
2925
  *
@@ -2619,15 +2928,17 @@ export const mapEpochMillis: {
2619
2928
  * DateTime.mapEpochMillis((millis) => millis + 10)
2620
2929
  * )
2621
2930
  * ```
2931
+ *
2932
+ * @category mapping
2933
+ * @since 3.6.0
2622
2934
  */
2623
2935
  (f: (millis: number) => number): <A extends DateTime>(self: A) => A
2624
2936
  /**
2625
2937
  * Transform a `DateTime` by applying a function to the number of milliseconds
2626
2938
  * since the Unix epoch.
2627
2939
  *
2628
- * @since 3.6.0
2629
- * @category mapping
2630
- * @example
2940
+ * **Example** (Mapping epoch milliseconds)
2941
+ *
2631
2942
  * ```ts
2632
2943
  * import { DateTime } from "effect"
2633
2944
  *
@@ -2636,17 +2947,22 @@ export const mapEpochMillis: {
2636
2947
  * DateTime.mapEpochMillis((millis) => millis + 10)
2637
2948
  * )
2638
2949
  * ```
2950
+ *
2951
+ * @category mapping
2952
+ * @since 3.6.0
2639
2953
  */
2640
2954
  <A extends DateTime>(self: A, f: (millis: number) => number): A
2641
2955
  } = Internal.mapEpochMillis
2642
2956
 
2643
2957
  /**
2644
- * Using the time zone adjusted `Date`, apply a function to the `Date` and
2645
- * return the result.
2958
+ * Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
2959
+ * instant and returns the function's result.
2960
+ *
2961
+ * This ignores any associated time zone. Use `DateTime.withDate` when the
2962
+ * callback should receive the time-zone-adjusted wall-clock date.
2963
+ *
2964
+ * **Example** (Using time zone adjusted Dates)
2646
2965
  *
2647
- * @since 3.6.0
2648
- * @category mapping
2649
- * @example
2650
2966
  * ```ts
2651
2967
  * import { DateTime } from "effect"
2652
2968
  *
@@ -2655,15 +2971,20 @@ export const mapEpochMillis: {
2655
2971
  * DateTime.withDate((date) => date.getTime())
2656
2972
  * )
2657
2973
  * ```
2974
+ *
2975
+ * @category mapping
2976
+ * @since 3.6.0
2658
2977
  */
2659
2978
  export const withDate: {
2660
2979
  /**
2661
- * Using the time zone adjusted `Date`, apply a function to the `Date` and
2662
- * return the result.
2980
+ * Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
2981
+ * instant and returns the function's result.
2982
+ *
2983
+ * This ignores any associated time zone. Use `DateTime.withDate` when the
2984
+ * callback should receive the time-zone-adjusted wall-clock date.
2985
+ *
2986
+ * **Example** (Using time zone adjusted Dates)
2663
2987
  *
2664
- * @since 3.6.0
2665
- * @category mapping
2666
- * @example
2667
2988
  * ```ts
2668
2989
  * import { DateTime } from "effect"
2669
2990
  *
@@ -2672,15 +2993,20 @@ export const withDate: {
2672
2993
  * DateTime.withDate((date) => date.getTime())
2673
2994
  * )
2674
2995
  * ```
2996
+ *
2997
+ * @category mapping
2998
+ * @since 3.6.0
2675
2999
  */
2676
3000
  <A>(f: (date: Date) => A): (self: DateTime) => A
2677
3001
  /**
2678
- * Using the time zone adjusted `Date`, apply a function to the `Date` and
2679
- * return the result.
3002
+ * Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
3003
+ * instant and returns the function's result.
3004
+ *
3005
+ * This ignores any associated time zone. Use `DateTime.withDate` when the
3006
+ * callback should receive the time-zone-adjusted wall-clock date.
3007
+ *
3008
+ * **Example** (Using time zone adjusted Dates)
2680
3009
  *
2681
- * @since 3.6.0
2682
- * @category mapping
2683
- * @example
2684
3010
  * ```ts
2685
3011
  * import { DateTime } from "effect"
2686
3012
  *
@@ -2689,17 +3015,22 @@ export const withDate: {
2689
3015
  * DateTime.withDate((date) => date.getTime())
2690
3016
  * )
2691
3017
  * ```
3018
+ *
3019
+ * @category mapping
3020
+ * @since 3.6.0
2692
3021
  */
2693
3022
  <A>(self: DateTime, f: (date: Date) => A): A
2694
3023
  } = Internal.withDate
2695
3024
 
2696
3025
  /**
2697
- * Using the time zone adjusted `Date`, apply a function to the `Date` and
2698
- * return the result.
3026
+ * Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
3027
+ * instant and returns the function's result.
3028
+ *
3029
+ * This ignores any associated time zone. Use `DateTime.withDate` when the
3030
+ * callback should receive the time-zone-adjusted wall-clock date.
3031
+ *
3032
+ * **Example** (Using UTC Dates)
2699
3033
  *
2700
- * @since 3.6.0
2701
- * @category mapping
2702
- * @example
2703
3034
  * ```ts
2704
3035
  * import { DateTime } from "effect"
2705
3036
  *
@@ -2708,15 +3039,20 @@ export const withDate: {
2708
3039
  * DateTime.withDateUtc((date) => date.getTime())
2709
3040
  * )
2710
3041
  * ```
3042
+ *
3043
+ * @category mapping
3044
+ * @since 3.6.0
2711
3045
  */
2712
3046
  export const withDateUtc: {
2713
3047
  /**
2714
- * Using the time zone adjusted `Date`, apply a function to the `Date` and
2715
- * return the result.
3048
+ * Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
3049
+ * instant and returns the function's result.
3050
+ *
3051
+ * This ignores any associated time zone. Use `DateTime.withDate` when the
3052
+ * callback should receive the time-zone-adjusted wall-clock date.
3053
+ *
3054
+ * **Example** (Using UTC Dates)
2716
3055
  *
2717
- * @since 3.6.0
2718
- * @category mapping
2719
- * @example
2720
3056
  * ```ts
2721
3057
  * import { DateTime } from "effect"
2722
3058
  *
@@ -2725,15 +3061,20 @@ export const withDateUtc: {
2725
3061
  * DateTime.withDateUtc((date) => date.getTime())
2726
3062
  * )
2727
3063
  * ```
3064
+ *
3065
+ * @category mapping
3066
+ * @since 3.6.0
2728
3067
  */
2729
3068
  <A>(f: (date: Date) => A): (self: DateTime) => A
2730
3069
  /**
2731
- * Using the time zone adjusted `Date`, apply a function to the `Date` and
2732
- * return the result.
3070
+ * Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
3071
+ * instant and returns the function's result.
3072
+ *
3073
+ * This ignores any associated time zone. Use `DateTime.withDate` when the
3074
+ * callback should receive the time-zone-adjusted wall-clock date.
3075
+ *
3076
+ * **Example** (Using UTC Dates)
2733
3077
  *
2734
- * @since 3.6.0
2735
- * @category mapping
2736
- * @example
2737
3078
  * ```ts
2738
3079
  * import { DateTime } from "effect"
2739
3080
  *
@@ -2742,6 +3083,9 @@ export const withDateUtc: {
2742
3083
  * DateTime.withDateUtc((date) => date.getTime())
2743
3084
  * )
2744
3085
  * ```
3086
+ *
3087
+ * @category mapping
3088
+ * @since 3.6.0
2745
3089
  */
2746
3090
  <A>(self: DateTime, f: (date: Date) => A): A
2747
3091
  } = Internal.withDateUtc
@@ -2749,12 +3093,15 @@ export const withDateUtc: {
2749
3093
  /**
2750
3094
  * Pattern match on a `DateTime` to handle `Utc` and `Zoned` cases differently.
2751
3095
  *
2752
- * @example
3096
+ * **Example** (Pattern matching DateTime variants)
3097
+ *
2753
3098
  * ```ts
2754
3099
  * import { DateTime } from "effect"
2755
3100
  *
2756
- * const dt1 = DateTime.nowUnsafe() // Utc
2757
- * const dt2 = DateTime.makeZonedUnsafe(new Date(), { timeZone: "Europe/London" }) // Zoned
3101
+ * const dt1 = DateTime.makeUnsafe("2024-01-01T12:00:00Z") // Utc
3102
+ * const dt2 = DateTime.makeZonedUnsafe("2024-06-15T14:30:00Z", {
3103
+ * timeZone: "Europe/London"
3104
+ * }) // Zoned
2758
3105
  *
2759
3106
  * const result1 = DateTime.match(dt1, {
2760
3107
  * onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
@@ -2765,6 +3112,9 @@ export const withDateUtc: {
2765
3112
  * onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
2766
3113
  * onZoned: (zoned) => `Zoned: ${DateTime.formatIsoZoned(zoned)}`
2767
3114
  * })
3115
+ *
3116
+ * console.log(result1) // "UTC: 2024-01-01T12:00:00.000Z"
3117
+ * console.log(result2) // "Zoned: 2024-06-15T15:30:00.000+01:00[Europe/London]"
2768
3118
  * ```
2769
3119
  *
2770
3120
  * @category mapping
@@ -2774,12 +3124,15 @@ export const match: {
2774
3124
  /**
2775
3125
  * Pattern match on a `DateTime` to handle `Utc` and `Zoned` cases differently.
2776
3126
  *
2777
- * @example
3127
+ * **Example** (Pattern matching DateTime variants)
3128
+ *
2778
3129
  * ```ts
2779
3130
  * import { DateTime } from "effect"
2780
3131
  *
2781
- * const dt1 = DateTime.nowUnsafe() // Utc
2782
- * const dt2 = DateTime.makeZonedUnsafe(new Date(), { timeZone: "Europe/London" }) // Zoned
3132
+ * const dt1 = DateTime.makeUnsafe("2024-01-01T12:00:00Z") // Utc
3133
+ * const dt2 = DateTime.makeZonedUnsafe("2024-06-15T14:30:00Z", {
3134
+ * timeZone: "Europe/London"
3135
+ * }) // Zoned
2783
3136
  *
2784
3137
  * const result1 = DateTime.match(dt1, {
2785
3138
  * onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
@@ -2790,6 +3143,9 @@ export const match: {
2790
3143
  * onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
2791
3144
  * onZoned: (zoned) => `Zoned: ${DateTime.formatIsoZoned(zoned)}`
2792
3145
  * })
3146
+ *
3147
+ * console.log(result1) // "UTC: 2024-01-01T12:00:00.000Z"
3148
+ * console.log(result2) // "Zoned: 2024-06-15T15:30:00.000+01:00[Europe/London]"
2793
3149
  * ```
2794
3150
  *
2795
3151
  * @category mapping
@@ -2804,12 +3160,15 @@ export const match: {
2804
3160
  /**
2805
3161
  * Pattern match on a `DateTime` to handle `Utc` and `Zoned` cases differently.
2806
3162
  *
2807
- * @example
3163
+ * **Example** (Pattern matching DateTime variants)
3164
+ *
2808
3165
  * ```ts
2809
3166
  * import { DateTime } from "effect"
2810
3167
  *
2811
- * const dt1 = DateTime.nowUnsafe() // Utc
2812
- * const dt2 = DateTime.makeZonedUnsafe(new Date(), { timeZone: "Europe/London" }) // Zoned
3168
+ * const dt1 = DateTime.makeUnsafe("2024-01-01T12:00:00Z") // Utc
3169
+ * const dt2 = DateTime.makeZonedUnsafe("2024-06-15T14:30:00Z", {
3170
+ * timeZone: "Europe/London"
3171
+ * }) // Zoned
2813
3172
  *
2814
3173
  * const result1 = DateTime.match(dt1, {
2815
3174
  * onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
@@ -2820,6 +3179,9 @@ export const match: {
2820
3179
  * onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
2821
3180
  * onZoned: (zoned) => `Zoned: ${DateTime.formatIsoZoned(zoned)}`
2822
3181
  * })
3182
+ *
3183
+ * console.log(result1) // "UTC: 2024-01-01T12:00:00.000Z"
3184
+ * console.log(result2) // "Zoned: 2024-06-15T15:30:00.000+01:00[Europe/London]"
2823
3185
  * ```
2824
3186
  *
2825
3187
  * @category mapping
@@ -2841,9 +3203,8 @@ export const match: {
2841
3203
  /**
2842
3204
  * Add the given `Duration` to a `DateTime`.
2843
3205
  *
2844
- * @since 3.6.0
2845
- * @category math
2846
- * @example
3206
+ * **Example** (Adding durations)
3207
+ *
2847
3208
  * ```ts
2848
3209
  * import { DateTime } from "effect"
2849
3210
  *
@@ -2852,6 +3213,9 @@ export const match: {
2852
3213
  * DateTime.addDuration("5 minutes")
2853
3214
  * )
2854
3215
  * ```
3216
+ *
3217
+ * @category math
3218
+ * @since 3.6.0
2855
3219
  */
2856
3220
  export const addDuration: {
2857
3221
  // =============================================================================
@@ -2861,9 +3225,8 @@ export const addDuration: {
2861
3225
  /**
2862
3226
  * Add the given `Duration` to a `DateTime`.
2863
3227
  *
2864
- * @since 3.6.0
2865
- * @category math
2866
- * @example
3228
+ * **Example** (Adding durations)
3229
+ *
2867
3230
  * ```ts
2868
3231
  * import { DateTime } from "effect"
2869
3232
  *
@@ -2872,6 +3235,9 @@ export const addDuration: {
2872
3235
  * DateTime.addDuration("5 minutes")
2873
3236
  * )
2874
3237
  * ```
3238
+ *
3239
+ * @category math
3240
+ * @since 3.6.0
2875
3241
  */
2876
3242
  (duration: Duration.Input): <A extends DateTime>(self: A) => A
2877
3243
  // =============================================================================
@@ -2881,9 +3247,8 @@ export const addDuration: {
2881
3247
  /**
2882
3248
  * Add the given `Duration` to a `DateTime`.
2883
3249
  *
2884
- * @since 3.6.0
2885
- * @category math
2886
- * @example
3250
+ * **Example** (Adding durations)
3251
+ *
2887
3252
  * ```ts
2888
3253
  * import { DateTime } from "effect"
2889
3254
  *
@@ -2892,6 +3257,9 @@ export const addDuration: {
2892
3257
  * DateTime.addDuration("5 minutes")
2893
3258
  * )
2894
3259
  * ```
3260
+ *
3261
+ * @category math
3262
+ * @since 3.6.0
2895
3263
  */
2896
3264
  <A extends DateTime>(self: A, duration: Duration.Input): A
2897
3265
  } = Internal.addDuration
@@ -2899,9 +3267,8 @@ export const addDuration: {
2899
3267
  /**
2900
3268
  * Subtract the given `Duration` from a `DateTime`.
2901
3269
  *
2902
- * @since 3.6.0
2903
- * @category math
2904
- * @example
3270
+ * **Example** (Subtracting durations)
3271
+ *
2905
3272
  * ```ts
2906
3273
  * import { DateTime } from "effect"
2907
3274
  *
@@ -2910,14 +3277,16 @@ export const addDuration: {
2910
3277
  * DateTime.subtractDuration("5 minutes")
2911
3278
  * )
2912
3279
  * ```
3280
+ *
3281
+ * @category math
3282
+ * @since 3.6.0
2913
3283
  */
2914
3284
  export const subtractDuration: {
2915
3285
  /**
2916
3286
  * Subtract the given `Duration` from a `DateTime`.
2917
3287
  *
2918
- * @since 3.6.0
2919
- * @category math
2920
- * @example
3288
+ * **Example** (Subtracting durations)
3289
+ *
2921
3290
  * ```ts
2922
3291
  * import { DateTime } from "effect"
2923
3292
  *
@@ -2926,14 +3295,16 @@ export const subtractDuration: {
2926
3295
  * DateTime.subtractDuration("5 minutes")
2927
3296
  * )
2928
3297
  * ```
3298
+ *
3299
+ * @category math
3300
+ * @since 3.6.0
2929
3301
  */
2930
3302
  (duration: Duration.Input): <A extends DateTime>(self: A) => A
2931
3303
  /**
2932
3304
  * Subtract the given `Duration` from a `DateTime`.
2933
3305
  *
2934
- * @since 3.6.0
2935
- * @category math
2936
- * @example
3306
+ * **Example** (Subtracting durations)
3307
+ *
2937
3308
  * ```ts
2938
3309
  * import { DateTime } from "effect"
2939
3310
  *
@@ -2942,6 +3313,9 @@ export const subtractDuration: {
2942
3313
  * DateTime.subtractDuration("5 minutes")
2943
3314
  * )
2944
3315
  * ```
3316
+ *
3317
+ * @category math
3318
+ * @since 3.6.0
2945
3319
  */
2946
3320
  <A extends DateTime>(self: A, duration: Duration.Input): A
2947
3321
  } = Internal.subtractDuration
@@ -2952,9 +3326,8 @@ export const subtractDuration: {
2952
3326
  * The time zone is taken into account when adding days, weeks, months, and
2953
3327
  * years.
2954
3328
  *
2955
- * @since 3.6.0
2956
- * @category math
2957
- * @example
3329
+ * **Example** (Adding date and time parts)
3330
+ *
2958
3331
  * ```ts
2959
3332
  * import { DateTime } from "effect"
2960
3333
  *
@@ -2963,6 +3336,9 @@ export const subtractDuration: {
2963
3336
  * DateTime.add({ minutes: 5 })
2964
3337
  * )
2965
3338
  * ```
3339
+ *
3340
+ * @category math
3341
+ * @since 3.6.0
2966
3342
  */
2967
3343
  export const add: {
2968
3344
  /**
@@ -2971,9 +3347,8 @@ export const add: {
2971
3347
  * The time zone is taken into account when adding days, weeks, months, and
2972
3348
  * years.
2973
3349
  *
2974
- * @since 3.6.0
2975
- * @category math
2976
- * @example
3350
+ * **Example** (Adding date and time parts)
3351
+ *
2977
3352
  * ```ts
2978
3353
  * import { DateTime } from "effect"
2979
3354
  *
@@ -2982,6 +3357,9 @@ export const add: {
2982
3357
  * DateTime.add({ minutes: 5 })
2983
3358
  * )
2984
3359
  * ```
3360
+ *
3361
+ * @category math
3362
+ * @since 3.6.0
2985
3363
  */
2986
3364
  (parts: Partial<DateTime.PartsForMath>): <A extends DateTime>(self: A) => A
2987
3365
  /**
@@ -2990,9 +3368,8 @@ export const add: {
2990
3368
  * The time zone is taken into account when adding days, weeks, months, and
2991
3369
  * years.
2992
3370
  *
2993
- * @since 3.6.0
2994
- * @category math
2995
- * @example
3371
+ * **Example** (Adding date and time parts)
3372
+ *
2996
3373
  * ```ts
2997
3374
  * import { DateTime } from "effect"
2998
3375
  *
@@ -3001,6 +3378,9 @@ export const add: {
3001
3378
  * DateTime.add({ minutes: 5 })
3002
3379
  * )
3003
3380
  * ```
3381
+ *
3382
+ * @category math
3383
+ * @since 3.6.0
3004
3384
  */
3005
3385
  <A extends DateTime>(self: A, parts: Partial<DateTime.PartsForMath>): A
3006
3386
  } = Internal.add
@@ -3008,9 +3388,8 @@ export const add: {
3008
3388
  /**
3009
3389
  * Subtract the given `amount` of `unit`'s from a `DateTime`.
3010
3390
  *
3011
- * @since 3.6.0
3012
- * @category math
3013
- * @example
3391
+ * **Example** (Subtracting date and time parts)
3392
+ *
3014
3393
  * ```ts
3015
3394
  * import { DateTime } from "effect"
3016
3395
  *
@@ -3019,14 +3398,16 @@ export const add: {
3019
3398
  * DateTime.subtract({ minutes: 5 })
3020
3399
  * )
3021
3400
  * ```
3401
+ *
3402
+ * @category math
3403
+ * @since 3.6.0
3022
3404
  */
3023
3405
  export const subtract: {
3024
3406
  /**
3025
3407
  * Subtract the given `amount` of `unit`'s from a `DateTime`.
3026
3408
  *
3027
- * @since 3.6.0
3028
- * @category math
3029
- * @example
3409
+ * **Example** (Subtracting date and time parts)
3410
+ *
3030
3411
  * ```ts
3031
3412
  * import { DateTime } from "effect"
3032
3413
  *
@@ -3035,14 +3416,16 @@ export const subtract: {
3035
3416
  * DateTime.subtract({ minutes: 5 })
3036
3417
  * )
3037
3418
  * ```
3419
+ *
3420
+ * @category math
3421
+ * @since 3.6.0
3038
3422
  */
3039
3423
  (parts: Partial<DateTime.PartsForMath>): <A extends DateTime>(self: A) => A
3040
3424
  /**
3041
3425
  * Subtract the given `amount` of `unit`'s from a `DateTime`.
3042
3426
  *
3043
- * @since 3.6.0
3044
- * @category math
3045
- * @example
3427
+ * **Example** (Subtracting date and time parts)
3428
+ *
3046
3429
  * ```ts
3047
3430
  * import { DateTime } from "effect"
3048
3431
  *
@@ -3051,6 +3434,9 @@ export const subtract: {
3051
3434
  * DateTime.subtract({ minutes: 5 })
3052
3435
  * )
3053
3436
  * ```
3437
+ *
3438
+ * @category math
3439
+ * @since 3.6.0
3054
3440
  */
3055
3441
  <A extends DateTime>(self: A, parts: Partial<DateTime.PartsForMath>): A
3056
3442
  } = Internal.subtract
@@ -3061,9 +3447,8 @@ export const subtract: {
3061
3447
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3062
3448
  * day of the week that the week starts on. The default is 0 (Sunday).
3063
3449
  *
3064
- * @since 3.6.0
3065
- * @category math
3066
- * @example
3450
+ * **Example** (Rounding down DateTime values)
3451
+ *
3067
3452
  * ```ts
3068
3453
  * import { DateTime } from "effect"
3069
3454
  *
@@ -3073,6 +3458,9 @@ export const subtract: {
3073
3458
  * DateTime.formatIso
3074
3459
  * )
3075
3460
  * ```
3461
+ *
3462
+ * @category math
3463
+ * @since 3.6.0
3076
3464
  */
3077
3465
  export const startOf: {
3078
3466
  /**
@@ -3081,9 +3469,8 @@ export const startOf: {
3081
3469
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3082
3470
  * day of the week that the week starts on. The default is 0 (Sunday).
3083
3471
  *
3084
- * @since 3.6.0
3085
- * @category math
3086
- * @example
3472
+ * **Example** (Rounding down DateTime values)
3473
+ *
3087
3474
  * ```ts
3088
3475
  * import { DateTime } from "effect"
3089
3476
  *
@@ -3093,6 +3480,9 @@ export const startOf: {
3093
3480
  * DateTime.formatIso
3094
3481
  * )
3095
3482
  * ```
3483
+ *
3484
+ * @category math
3485
+ * @since 3.6.0
3096
3486
  */
3097
3487
  (
3098
3488
  part: DateTime.UnitSingular,
@@ -3104,9 +3494,8 @@ export const startOf: {
3104
3494
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3105
3495
  * day of the week that the week starts on. The default is 0 (Sunday).
3106
3496
  *
3107
- * @since 3.6.0
3108
- * @category math
3109
- * @example
3497
+ * **Example** (Rounding down DateTime values)
3498
+ *
3110
3499
  * ```ts
3111
3500
  * import { DateTime } from "effect"
3112
3501
  *
@@ -3116,6 +3505,9 @@ export const startOf: {
3116
3505
  * DateTime.formatIso
3117
3506
  * )
3118
3507
  * ```
3508
+ *
3509
+ * @category math
3510
+ * @since 3.6.0
3119
3511
  */
3120
3512
  <A extends DateTime>(
3121
3513
  self: A,
@@ -3130,9 +3522,8 @@ export const startOf: {
3130
3522
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3131
3523
  * day of the week that the week starts on. The default is 0 (Sunday).
3132
3524
  *
3133
- * @since 3.6.0
3134
- * @category math
3135
- * @example
3525
+ * **Example** (Rounding up DateTime values)
3526
+ *
3136
3527
  * ```ts
3137
3528
  * import { DateTime } from "effect"
3138
3529
  *
@@ -3142,6 +3533,9 @@ export const startOf: {
3142
3533
  * DateTime.formatIso
3143
3534
  * )
3144
3535
  * ```
3536
+ *
3537
+ * @category math
3538
+ * @since 3.6.0
3145
3539
  */
3146
3540
  export const endOf: {
3147
3541
  /**
@@ -3150,9 +3544,8 @@ export const endOf: {
3150
3544
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3151
3545
  * day of the week that the week starts on. The default is 0 (Sunday).
3152
3546
  *
3153
- * @since 3.6.0
3154
- * @category math
3155
- * @example
3547
+ * **Example** (Rounding up DateTime values)
3548
+ *
3156
3549
  * ```ts
3157
3550
  * import { DateTime } from "effect"
3158
3551
  *
@@ -3162,6 +3555,9 @@ export const endOf: {
3162
3555
  * DateTime.formatIso
3163
3556
  * )
3164
3557
  * ```
3558
+ *
3559
+ * @category math
3560
+ * @since 3.6.0
3165
3561
  */
3166
3562
  (
3167
3563
  part: DateTime.UnitSingular,
@@ -3173,9 +3569,8 @@ export const endOf: {
3173
3569
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3174
3570
  * day of the week that the week starts on. The default is 0 (Sunday).
3175
3571
  *
3176
- * @since 3.6.0
3177
- * @category math
3178
- * @example
3572
+ * **Example** (Rounding up DateTime values)
3573
+ *
3179
3574
  * ```ts
3180
3575
  * import { DateTime } from "effect"
3181
3576
  *
@@ -3185,6 +3580,9 @@ export const endOf: {
3185
3580
  * DateTime.formatIso
3186
3581
  * )
3187
3582
  * ```
3583
+ *
3584
+ * @category math
3585
+ * @since 3.6.0
3188
3586
  */
3189
3587
  <A extends DateTime>(
3190
3588
  self: A,
@@ -3199,9 +3597,8 @@ export const endOf: {
3199
3597
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3200
3598
  * day of the week that the week starts on. The default is 0 (Sunday).
3201
3599
  *
3202
- * @since 3.6.0
3203
- * @category math
3204
- * @example
3600
+ * **Example** (Rounding DateTime values to nearest units)
3601
+ *
3205
3602
  * ```ts
3206
3603
  * import { DateTime } from "effect"
3207
3604
  *
@@ -3211,6 +3608,9 @@ export const endOf: {
3211
3608
  * DateTime.formatIso
3212
3609
  * )
3213
3610
  * ```
3611
+ *
3612
+ * @category math
3613
+ * @since 3.6.0
3214
3614
  */
3215
3615
  export const nearest: {
3216
3616
  /**
@@ -3219,9 +3619,8 @@ export const nearest: {
3219
3619
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3220
3620
  * day of the week that the week starts on. The default is 0 (Sunday).
3221
3621
  *
3222
- * @since 3.6.0
3223
- * @category math
3224
- * @example
3622
+ * **Example** (Rounding DateTime values to nearest units)
3623
+ *
3225
3624
  * ```ts
3226
3625
  * import { DateTime } from "effect"
3227
3626
  *
@@ -3231,6 +3630,9 @@ export const nearest: {
3231
3630
  * DateTime.formatIso
3232
3631
  * )
3233
3632
  * ```
3633
+ *
3634
+ * @category math
3635
+ * @since 3.6.0
3234
3636
  */
3235
3637
  (
3236
3638
  part: DateTime.UnitSingular,
@@ -3242,9 +3644,8 @@ export const nearest: {
3242
3644
  * If the part is `week`, the `weekStartsOn` option can be used to specify the
3243
3645
  * day of the week that the week starts on. The default is 0 (Sunday).
3244
3646
  *
3245
- * @since 3.6.0
3246
- * @category math
3247
- * @example
3647
+ * **Example** (Rounding DateTime values to nearest units)
3648
+ *
3248
3649
  * ```ts
3249
3650
  * import { DateTime } from "effect"
3250
3651
  *
@@ -3254,6 +3655,9 @@ export const nearest: {
3254
3655
  * DateTime.formatIso
3255
3656
  * )
3256
3657
  * ```
3658
+ *
3659
+ * @category math
3660
+ * @since 3.6.0
3257
3661
  */
3258
3662
  <A extends DateTime>(
3259
3663
  self: A,
@@ -3267,14 +3671,17 @@ export const nearest: {
3267
3671
  // =============================================================================
3268
3672
 
3269
3673
  /**
3270
- * Format a `DateTime` as a string using the `DateTimeFormat` API.
3674
+ * Formats a `DateTime` with `Intl.DateTimeFormat`.
3675
+ *
3676
+ * Unless a `timeZone` option is supplied, UTC values are formatted in UTC and
3677
+ * zoned values are formatted in their named zone or fixed-offset zone.
3271
3678
  *
3272
- * The `timeZone` option is set to the offset of the time zone.
3679
+ * Fixed-offset zones depend on runtime support for offset `timeZone`
3680
+ * identifiers. When unsupported, formatting falls back to UTC with the
3681
+ * `DateTime` adjusted to the offset.
3273
3682
  *
3274
- * Note: On Node versions < 22, fixed "Offset" zones will set the time zone to
3275
- * "UTC" and use the adjusted `Date`.
3683
+ * **Example** (Formatting DateTime values with Intl options)
3276
3684
  *
3277
- * @example
3278
3685
  * ```ts
3279
3686
  * import { DateTime } from "effect"
3280
3687
  *
@@ -3291,8 +3698,8 @@ export const nearest: {
3291
3698
  * console.log(formatted) // "Saturday, June 15, 2024 at 3:30 PM"
3292
3699
  * ```
3293
3700
  *
3294
- * @since 3.6.0
3295
3701
  * @category formatting
3702
+ * @since 3.6.0
3296
3703
  */
3297
3704
  export const format: {
3298
3705
  // =============================================================================
@@ -3300,14 +3707,17 @@ export const format: {
3300
3707
  // =============================================================================
3301
3708
 
3302
3709
  /**
3303
- * Format a `DateTime` as a string using the `DateTimeFormat` API.
3710
+ * Formats a `DateTime` with `Intl.DateTimeFormat`.
3711
+ *
3712
+ * Unless a `timeZone` option is supplied, UTC values are formatted in UTC and
3713
+ * zoned values are formatted in their named zone or fixed-offset zone.
3304
3714
  *
3305
- * The `timeZone` option is set to the offset of the time zone.
3715
+ * Fixed-offset zones depend on runtime support for offset `timeZone`
3716
+ * identifiers. When unsupported, formatting falls back to UTC with the
3717
+ * `DateTime` adjusted to the offset.
3306
3718
  *
3307
- * Note: On Node versions < 22, fixed "Offset" zones will set the time zone to
3308
- * "UTC" and use the adjusted `Date`.
3719
+ * **Example** (Formatting DateTime values with Intl options)
3309
3720
  *
3310
- * @example
3311
3721
  * ```ts
3312
3722
  * import { DateTime } from "effect"
3313
3723
  *
@@ -3324,8 +3734,8 @@ export const format: {
3324
3734
  * console.log(formatted) // "Saturday, June 15, 2024 at 3:30 PM"
3325
3735
  * ```
3326
3736
  *
3327
- * @since 3.6.0
3328
3737
  * @category formatting
3738
+ * @since 3.6.0
3329
3739
  */
3330
3740
  (
3331
3741
  options?:
@@ -3339,14 +3749,17 @@ export const format: {
3339
3749
  // =============================================================================
3340
3750
 
3341
3751
  /**
3342
- * Format a `DateTime` as a string using the `DateTimeFormat` API.
3752
+ * Formats a `DateTime` with `Intl.DateTimeFormat`.
3753
+ *
3754
+ * Unless a `timeZone` option is supplied, UTC values are formatted in UTC and
3755
+ * zoned values are formatted in their named zone or fixed-offset zone.
3343
3756
  *
3344
- * The `timeZone` option is set to the offset of the time zone.
3757
+ * Fixed-offset zones depend on runtime support for offset `timeZone`
3758
+ * identifiers. When unsupported, formatting falls back to UTC with the
3759
+ * `DateTime` adjusted to the offset.
3345
3760
  *
3346
- * Note: On Node versions < 22, fixed "Offset" zones will set the time zone to
3347
- * "UTC" and use the adjusted `Date`.
3761
+ * **Example** (Formatting DateTime values with Intl options)
3348
3762
  *
3349
- * @example
3350
3763
  * ```ts
3351
3764
  * import { DateTime } from "effect"
3352
3765
  *
@@ -3363,8 +3776,8 @@ export const format: {
3363
3776
  * console.log(formatted) // "Saturday, June 15, 2024 at 3:30 PM"
3364
3777
  * ```
3365
3778
  *
3366
- * @since 3.6.0
3367
3779
  * @category formatting
3780
+ * @since 3.6.0
3368
3781
  */
3369
3782
  (
3370
3783
  self: DateTime,
@@ -3381,7 +3794,8 @@ export const format: {
3381
3794
  *
3382
3795
  * It will use the system's local time zone & locale.
3383
3796
  *
3384
- * @example
3797
+ * **Example** (Formatting DateTime values locally)
3798
+ *
3385
3799
  * ```ts
3386
3800
  * import { DateTime } from "effect"
3387
3801
  *
@@ -3399,8 +3813,8 @@ export const format: {
3399
3813
  * console.log(local) // Output depends on system locale/timezone
3400
3814
  * ```
3401
3815
  *
3402
- * @since 3.6.0
3403
3816
  * @category formatting
3817
+ * @since 3.6.0
3404
3818
  */
3405
3819
  export const formatLocal: {
3406
3820
  /**
@@ -3408,7 +3822,8 @@ export const formatLocal: {
3408
3822
  *
3409
3823
  * It will use the system's local time zone & locale.
3410
3824
  *
3411
- * @example
3825
+ * **Example** (Formatting DateTime values locally)
3826
+ *
3412
3827
  * ```ts
3413
3828
  * import { DateTime } from "effect"
3414
3829
  *
@@ -3426,8 +3841,8 @@ export const formatLocal: {
3426
3841
  * console.log(local) // Output depends on system locale/timezone
3427
3842
  * ```
3428
3843
  *
3429
- * @since 3.6.0
3430
3844
  * @category formatting
3845
+ * @since 3.6.0
3431
3846
  */
3432
3847
  (
3433
3848
  options?:
@@ -3441,7 +3856,8 @@ export const formatLocal: {
3441
3856
  *
3442
3857
  * It will use the system's local time zone & locale.
3443
3858
  *
3444
- * @example
3859
+ * **Example** (Formatting DateTime values locally)
3860
+ *
3445
3861
  * ```ts
3446
3862
  * import { DateTime } from "effect"
3447
3863
  *
@@ -3459,8 +3875,8 @@ export const formatLocal: {
3459
3875
  * console.log(local) // Output depends on system locale/timezone
3460
3876
  * ```
3461
3877
  *
3462
- * @since 3.6.0
3463
3878
  * @category formatting
3879
+ * @since 3.6.0
3464
3880
  */
3465
3881
  (
3466
3882
  self: DateTime,
@@ -3477,7 +3893,8 @@ export const formatLocal: {
3477
3893
  *
3478
3894
  * This forces the time zone to be UTC.
3479
3895
  *
3480
- * @example
3896
+ * **Example** (Formatting DateTime values in UTC)
3897
+ *
3481
3898
  * ```ts
3482
3899
  * import { DateTime } from "effect"
3483
3900
  *
@@ -3498,8 +3915,8 @@ export const formatLocal: {
3498
3915
  * console.log(utcFormatted) // "06/15/2024, 02:30 PM UTC"
3499
3916
  * ```
3500
3917
  *
3501
- * @since 3.6.0
3502
3918
  * @category formatting
3919
+ * @since 3.6.0
3503
3920
  */
3504
3921
  export const formatUtc: {
3505
3922
  /**
@@ -3507,7 +3924,8 @@ export const formatUtc: {
3507
3924
  *
3508
3925
  * This forces the time zone to be UTC.
3509
3926
  *
3510
- * @example
3927
+ * **Example** (Formatting DateTime values in UTC)
3928
+ *
3511
3929
  * ```ts
3512
3930
  * import { DateTime } from "effect"
3513
3931
  *
@@ -3528,8 +3946,8 @@ export const formatUtc: {
3528
3946
  * console.log(utcFormatted) // "06/15/2024, 02:30 PM UTC"
3529
3947
  * ```
3530
3948
  *
3531
- * @since 3.6.0
3532
3949
  * @category formatting
3950
+ * @since 3.6.0
3533
3951
  */
3534
3952
  (
3535
3953
  options?:
@@ -3543,7 +3961,8 @@ export const formatUtc: {
3543
3961
  *
3544
3962
  * This forces the time zone to be UTC.
3545
3963
  *
3546
- * @example
3964
+ * **Example** (Formatting DateTime values in UTC)
3965
+ *
3547
3966
  * ```ts
3548
3967
  * import { DateTime } from "effect"
3549
3968
  *
@@ -3564,8 +3983,8 @@ export const formatUtc: {
3564
3983
  * console.log(utcFormatted) // "06/15/2024, 02:30 PM UTC"
3565
3984
  * ```
3566
3985
  *
3567
- * @since 3.6.0
3568
3986
  * @category formatting
3987
+ * @since 3.6.0
3569
3988
  */
3570
3989
  (
3571
3990
  self: DateTime,
@@ -3580,7 +3999,8 @@ export const formatUtc: {
3580
3999
  /**
3581
4000
  * Format a `DateTime` as a string using the `DateTimeFormat` API.
3582
4001
  *
3583
- * @example
4002
+ * **Example** (Formatting DateTime values with custom formatters)
4003
+ *
3584
4004
  * ```ts
3585
4005
  * import { DateTime } from "effect"
3586
4006
  *
@@ -3600,14 +4020,15 @@ export const formatUtc: {
3600
4020
  * console.log(formatted) // "15. Juni 2024, 16:30"
3601
4021
  * ```
3602
4022
  *
3603
- * @since 3.6.0
3604
4023
  * @category formatting
4024
+ * @since 3.6.0
3605
4025
  */
3606
4026
  export const formatIntl: {
3607
4027
  /**
3608
4028
  * Format a `DateTime` as a string using the `DateTimeFormat` API.
3609
4029
  *
3610
- * @example
4030
+ * **Example** (Formatting DateTime values with custom formatters)
4031
+ *
3611
4032
  * ```ts
3612
4033
  * import { DateTime } from "effect"
3613
4034
  *
@@ -3627,14 +4048,15 @@ export const formatIntl: {
3627
4048
  * console.log(formatted) // "15. Juni 2024, 16:30"
3628
4049
  * ```
3629
4050
  *
3630
- * @since 3.6.0
3631
4051
  * @category formatting
4052
+ * @since 3.6.0
3632
4053
  */
3633
4054
  (format: Intl.DateTimeFormat): (self: DateTime) => string
3634
4055
  /**
3635
4056
  * Format a `DateTime` as a string using the `DateTimeFormat` API.
3636
4057
  *
3637
- * @example
4058
+ * **Example** (Formatting DateTime values with custom formatters)
4059
+ *
3638
4060
  * ```ts
3639
4061
  * import { DateTime } from "effect"
3640
4062
  *
@@ -3654,8 +4076,8 @@ export const formatIntl: {
3654
4076
  * console.log(formatted) // "15. Juni 2024, 16:30"
3655
4077
  * ```
3656
4078
  *
3657
- * @since 3.6.0
3658
4079
  * @category formatting
4080
+ * @since 3.6.0
3659
4081
  */
3660
4082
  (self: DateTime, format: Intl.DateTimeFormat): string
3661
4083
  } = Internal.formatIntl
@@ -3665,7 +4087,8 @@ export const formatIntl: {
3665
4087
  *
3666
4088
  * Always returns the UTC representation in ISO 8601 format, ignoring any time zone.
3667
4089
  *
3668
- * @example
4090
+ * **Example** (Formatting DateTime values as ISO strings)
4091
+ *
3669
4092
  * ```ts
3670
4093
  * import { DateTime } from "effect"
3671
4094
  *
@@ -3688,7 +4111,8 @@ export const formatIso: (self: DateTime) => string = Internal.formatIso
3688
4111
  *
3689
4112
  * Returns only the date part (YYYY-MM-DD) after applying time zone adjustments.
3690
4113
  *
3691
- * @example
4114
+ * **Example** (Formatting DateTime values as ISO dates)
4115
+ *
3692
4116
  * ```ts
3693
4117
  * import { DateTime } from "effect"
3694
4118
  *
@@ -3711,7 +4135,8 @@ export const formatIsoDate: (self: DateTime) => string = Internal.formatIsoDate
3711
4135
  *
3712
4136
  * Returns only the date part (YYYY-MM-DD) in UTC, ignoring any time zone.
3713
4137
  *
3714
- * @example
4138
+ * **Example** (Formatting DateTime values as UTC ISO dates)
4139
+ *
3715
4140
  * ```ts
3716
4141
  * import { DateTime } from "effect"
3717
4142
  *
@@ -3735,7 +4160,8 @@ export const formatIsoDateUtc: (self: DateTime) => string = Internal.formatIsoDa
3735
4160
  * For `DateTime.Utc`, returns the same as `formatIso`. For `DateTime.Zoned`,
3736
4161
  * includes the time zone offset in the format.
3737
4162
  *
3738
- * @example
4163
+ * **Example** (Formatting DateTime values with offsets)
4164
+ *
3739
4165
  * ```ts
3740
4166
  * import { DateTime } from "effect"
3741
4167
  *
@@ -3758,7 +4184,8 @@ export const formatIsoOffset: (self: DateTime) => string = Internal.formatIsoOff
3758
4184
  *
3759
4185
  * It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`.
3760
4186
  *
3761
- * @example
4187
+ * **Example** (Formatting zoned DateTime values)
4188
+ *
3762
4189
  * ```ts
3763
4190
  * import { DateTime } from "effect"
3764
4191
  *
@@ -3777,8 +4204,8 @@ export const formatIsoOffset: (self: DateTime) => string = Internal.formatIsoOff
3777
4204
  * console.log(offsetFormatted) // "2024-06-15T17:30:45.123+03:00"
3778
4205
  * ```
3779
4206
  *
3780
- * @since 3.6.0
3781
4207
  * @category formatting
4208
+ * @since 3.6.0
3782
4209
  */
3783
4210
  export const formatIsoZoned: (self: Zoned) => string = Internal.formatIsoZoned
3784
4211
 
@@ -3787,7 +4214,8 @@ export const formatIsoZoned: (self: Zoned) => string = Internal.formatIsoZoned
3787
4214
  *
3788
4215
  * This layer provides the `CurrentTimeZone` service with the specified time zone.
3789
4216
  *
3790
- * @example
4217
+ * **Example** (Providing current time zone layers)
4218
+ *
3791
4219
  * ```ts
3792
4220
  * import { DateTime, Effect } from "effect"
3793
4221
  *
@@ -3815,7 +4243,8 @@ export const layerCurrentZone: (resource: NoInfer<TimeZone>) => Layer.Layer<Curr
3815
4243
  *
3816
4244
  * This layer provides the `CurrentTimeZone` service with a fixed offset time zone.
3817
4245
  *
3818
- * @example
4246
+ * **Example** (Providing fixed-offset time zone layers)
4247
+ *
3819
4248
  * ```ts
3820
4249
  * import { DateTime, Effect } from "effect"
3821
4250
  *
@@ -3842,7 +4271,8 @@ export const layerCurrentZoneOffset = (offset: number): Layer.Layer<CurrentTimeZ
3842
4271
  * This layer provides the `CurrentTimeZone` service with a named time zone.
3843
4272
  * If the time zone identifier is invalid, the layer will fail.
3844
4273
  *
3845
- * @example
4274
+ * **Example** (Providing named time zone layers)
4275
+ *
3846
4276
  * ```ts
3847
4277
  * import { DateTime, Effect } from "effect"
3848
4278
  *
@@ -3870,7 +4300,8 @@ export const layerCurrentZoneNamed: (zoneId: string) => Layer.Layer<
3870
4300
  * This layer provides the `CurrentTimeZone` service using the system's
3871
4301
  * configured local time zone.
3872
4302
  *
3873
- * @example
4303
+ * **Example** (Providing local time zone layers)
4304
+ *
3874
4305
  * ```ts
3875
4306
  * import { DateTime, Effect } from "effect"
3876
4307
  *