ts-data-forge 3.3.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/dist/array/impl/array-utils-element-access.d.mts +3 -4
  2. package/dist/array/impl/array-utils-element-access.d.mts.map +1 -1
  3. package/dist/array/impl/array-utils-element-access.mjs +8 -8
  4. package/dist/array/impl/array-utils-element-access.mjs.map +1 -1
  5. package/dist/array/impl/array-utils-reducing-value.d.mts +8 -9
  6. package/dist/array/impl/array-utils-reducing-value.d.mts.map +1 -1
  7. package/dist/array/impl/array-utils-reducing-value.mjs +9 -7
  8. package/dist/array/impl/array-utils-reducing-value.mjs.map +1 -1
  9. package/dist/array/impl/array-utils-search.d.mts +0 -1
  10. package/dist/array/impl/array-utils-search.d.mts.map +1 -1
  11. package/dist/array/impl/array-utils-search.mjs +6 -6
  12. package/dist/array/impl/array-utils-search.mjs.map +1 -1
  13. package/dist/array/impl/array-utils-transformation.mjs +2 -4
  14. package/dist/array/impl/array-utils-transformation.mjs.map +1 -1
  15. package/dist/collections/imap-mapped.d.mts +0 -1
  16. package/dist/collections/imap-mapped.d.mts.map +1 -1
  17. package/dist/collections/imap-mapped.mjs +7 -6
  18. package/dist/collections/imap-mapped.mjs.map +1 -1
  19. package/dist/collections/imap.d.mts +0 -1
  20. package/dist/collections/imap.d.mts.map +1 -1
  21. package/dist/collections/imap.mjs +11 -9
  22. package/dist/collections/imap.mjs.map +1 -1
  23. package/dist/collections/queue.d.mts +0 -1
  24. package/dist/collections/queue.d.mts.map +1 -1
  25. package/dist/collections/queue.mjs +4 -4
  26. package/dist/collections/queue.mjs.map +1 -1
  27. package/dist/collections/stack.d.mts +0 -1
  28. package/dist/collections/stack.d.mts.map +1 -1
  29. package/dist/collections/stack.mjs +4 -4
  30. package/dist/collections/stack.mjs.map +1 -1
  31. package/dist/entry-point.d.mts +1 -0
  32. package/dist/entry-point.d.mts.map +1 -1
  33. package/dist/entry-point.mjs +8 -4
  34. package/dist/entry-point.mjs.map +1 -1
  35. package/dist/functional/index.d.mts +3 -2
  36. package/dist/functional/index.d.mts.map +1 -1
  37. package/dist/functional/index.mjs +6 -2
  38. package/dist/functional/index.mjs.map +1 -1
  39. package/dist/functional/optional/impl/index.d.mts +18 -0
  40. package/dist/functional/optional/impl/index.d.mts.map +1 -0
  41. package/dist/functional/optional/impl/index.mjs +17 -0
  42. package/dist/functional/optional/impl/index.mjs.map +1 -0
  43. package/dist/functional/optional/impl/optional-expect-to-be.d.mts +29 -0
  44. package/dist/functional/optional/impl/optional-expect-to-be.d.mts.map +1 -0
  45. package/dist/functional/optional/impl/optional-expect-to-be.mjs +25 -0
  46. package/dist/functional/optional/impl/optional-expect-to-be.mjs.map +1 -0
  47. package/dist/functional/optional/impl/optional-filter.d.mts +29 -0
  48. package/dist/functional/optional/impl/optional-filter.d.mts.map +1 -0
  49. package/dist/functional/optional/impl/optional-filter.mjs +28 -0
  50. package/dist/functional/optional/impl/optional-filter.mjs.map +1 -0
  51. package/dist/functional/optional/impl/optional-flat-map.d.mts +33 -0
  52. package/dist/functional/optional/impl/optional-flat-map.d.mts.map +1 -0
  53. package/dist/functional/optional/impl/optional-flat-map.mjs +21 -0
  54. package/dist/functional/optional/impl/optional-flat-map.mjs.map +1 -0
  55. package/dist/functional/optional/impl/optional-from-nullable.d.mts +24 -0
  56. package/dist/functional/optional/impl/optional-from-nullable.d.mts.map +1 -0
  57. package/dist/functional/optional/impl/optional-from-nullable.mjs +29 -0
  58. package/dist/functional/optional/impl/optional-from-nullable.mjs.map +1 -0
  59. package/dist/functional/optional/impl/optional-is-none.d.mts +22 -0
  60. package/dist/functional/optional/impl/optional-is-none.d.mts.map +1 -0
  61. package/dist/functional/optional/impl/optional-is-none.mjs +25 -0
  62. package/dist/functional/optional/impl/optional-is-none.mjs.map +1 -0
  63. package/dist/functional/optional/impl/optional-is-optional.d.mts +18 -0
  64. package/dist/functional/optional/impl/optional-is-optional.d.mts.map +1 -0
  65. package/dist/functional/optional/impl/optional-is-optional.mjs +27 -0
  66. package/dist/functional/optional/impl/optional-is-optional.mjs.map +1 -0
  67. package/dist/functional/optional/impl/optional-is-some.d.mts +22 -0
  68. package/dist/functional/optional/impl/optional-is-some.d.mts.map +1 -0
  69. package/dist/functional/optional/impl/optional-is-some.mjs +25 -0
  70. package/dist/functional/optional/impl/optional-is-some.mjs.map +1 -0
  71. package/dist/functional/optional/impl/optional-map.d.mts +31 -0
  72. package/dist/functional/optional/impl/optional-map.d.mts.map +1 -0
  73. package/dist/functional/optional/impl/optional-map.mjs +25 -0
  74. package/dist/functional/optional/impl/optional-map.mjs.map +1 -0
  75. package/dist/functional/optional/impl/optional-none.d.mts +16 -0
  76. package/dist/functional/optional/impl/optional-none.d.mts.map +1 -0
  77. package/dist/functional/optional/impl/optional-none.mjs +20 -0
  78. package/dist/functional/optional/impl/optional-none.mjs.map +1 -0
  79. package/dist/functional/optional/impl/optional-or-else.d.mts +35 -0
  80. package/dist/functional/optional/impl/optional-or-else.d.mts.map +1 -0
  81. package/dist/functional/optional/impl/optional-or-else.mjs +19 -0
  82. package/dist/functional/optional/impl/optional-or-else.mjs.map +1 -0
  83. package/dist/functional/optional/impl/optional-some.d.mts +19 -0
  84. package/dist/functional/optional/impl/optional-some.d.mts.map +1 -0
  85. package/dist/functional/optional/impl/optional-some.mjs +26 -0
  86. package/dist/functional/optional/impl/optional-some.mjs.map +1 -0
  87. package/dist/functional/optional/impl/optional-to-nullable.d.mts +27 -0
  88. package/dist/functional/optional/impl/optional-to-nullable.d.mts.map +1 -0
  89. package/dist/functional/optional/impl/optional-to-nullable.mjs +31 -0
  90. package/dist/functional/optional/impl/optional-to-nullable.mjs.map +1 -0
  91. package/dist/functional/optional/impl/optional-unwrap-or.d.mts +33 -0
  92. package/dist/functional/optional/impl/optional-unwrap-or.d.mts.map +1 -0
  93. package/dist/functional/optional/impl/optional-unwrap-or.mjs +19 -0
  94. package/dist/functional/optional/impl/optional-unwrap-or.mjs.map +1 -0
  95. package/dist/functional/optional/impl/optional-unwrap-throw.d.mts +29 -0
  96. package/dist/functional/optional/impl/optional-unwrap-throw.d.mts.map +1 -0
  97. package/dist/functional/optional/impl/optional-unwrap-throw.mjs +38 -0
  98. package/dist/functional/optional/impl/optional-unwrap-throw.mjs.map +1 -0
  99. package/dist/functional/optional/impl/optional-unwrap.d.mts +28 -0
  100. package/dist/functional/optional/impl/optional-unwrap.d.mts.map +1 -0
  101. package/dist/functional/optional/impl/optional-unwrap.mjs +11 -0
  102. package/dist/functional/optional/impl/optional-unwrap.mjs.map +1 -0
  103. package/dist/functional/optional/impl/optional-zip.d.mts +31 -0
  104. package/dist/functional/optional/impl/optional-zip.d.mts.map +1 -0
  105. package/dist/functional/optional/impl/optional-zip.mjs +39 -0
  106. package/dist/functional/optional/impl/optional-zip.mjs.map +1 -0
  107. package/dist/functional/optional/impl/tag.d.mts +5 -0
  108. package/dist/functional/optional/impl/tag.d.mts.map +1 -0
  109. package/dist/functional/optional/impl/tag.mjs +7 -0
  110. package/dist/functional/optional/impl/tag.mjs.map +1 -0
  111. package/dist/functional/optional/impl/types.d.mts +22 -0
  112. package/dist/functional/optional/impl/types.d.mts.map +1 -0
  113. package/dist/functional/optional/impl/types.mjs +2 -0
  114. package/dist/functional/optional/impl/types.mjs.map +1 -0
  115. package/dist/functional/optional/index.d.mts +2 -0
  116. package/dist/functional/optional/index.d.mts.map +1 -0
  117. package/dist/functional/optional/index.mjs +3 -0
  118. package/dist/functional/optional/index.mjs.map +1 -0
  119. package/dist/functional/pipe.d.mts +4 -4
  120. package/dist/functional/pipe.d.mts.map +1 -1
  121. package/dist/functional/pipe.mjs +4 -3
  122. package/dist/functional/pipe.mjs.map +1 -1
  123. package/dist/functional/result/impl/index.d.mts +24 -0
  124. package/dist/functional/result/impl/index.d.mts.map +1 -0
  125. package/dist/functional/result/impl/index.mjs +23 -0
  126. package/dist/functional/result/impl/index.mjs.map +1 -0
  127. package/dist/functional/result/impl/result-err.d.mts +25 -0
  128. package/dist/functional/result/impl/result-err.d.mts.map +1 -0
  129. package/dist/functional/result/impl/result-err.mjs +32 -0
  130. package/dist/functional/result/impl/result-err.mjs.map +1 -0
  131. package/dist/functional/result/impl/result-expect-to-be.d.mts +27 -0
  132. package/dist/functional/result/impl/result-expect-to-be.d.mts.map +1 -0
  133. package/dist/functional/result/impl/result-expect-to-be.mjs +26 -0
  134. package/dist/functional/result/impl/result-expect-to-be.mjs.map +1 -0
  135. package/dist/functional/result/impl/result-flat-map.d.mts +39 -0
  136. package/dist/functional/result/impl/result-flat-map.d.mts.map +1 -0
  137. package/dist/functional/result/impl/result-flat-map.mjs +24 -0
  138. package/dist/functional/result/impl/result-flat-map.mjs.map +1 -0
  139. package/dist/functional/result/impl/result-fold.d.mts +45 -0
  140. package/dist/functional/result/impl/result-fold.d.mts.map +1 -0
  141. package/dist/functional/result/impl/result-fold.mjs +26 -0
  142. package/dist/functional/result/impl/result-fold.mjs.map +1 -0
  143. package/dist/functional/result/impl/result-from-promise.d.mts +32 -0
  144. package/dist/functional/result/impl/result-from-promise.d.mts.map +1 -0
  145. package/dist/functional/result/impl/result-from-promise.mjs +32 -0
  146. package/dist/functional/result/impl/result-from-promise.mjs.map +1 -0
  147. package/dist/functional/result/impl/result-from-throwable.d.mts +29 -0
  148. package/dist/functional/result/impl/result-from-throwable.d.mts.map +1 -0
  149. package/dist/functional/result/impl/result-from-throwable.mjs +46 -0
  150. package/dist/functional/result/impl/result-from-throwable.mjs.map +1 -0
  151. package/dist/functional/result/impl/result-is-err.d.mts +20 -0
  152. package/dist/functional/result/impl/result-is-err.d.mts.map +1 -0
  153. package/dist/functional/result/impl/result-is-err.mjs +23 -0
  154. package/dist/functional/result/impl/result-is-err.mjs.map +1 -0
  155. package/dist/functional/result/impl/result-is-ok.d.mts +20 -0
  156. package/dist/functional/result/impl/result-is-ok.d.mts.map +1 -0
  157. package/dist/functional/result/impl/result-is-ok.mjs +23 -0
  158. package/dist/functional/result/impl/result-is-ok.mjs.map +1 -0
  159. package/dist/functional/result/impl/result-is-result.d.mts +17 -0
  160. package/dist/functional/result/impl/result-is-result.d.mts.map +1 -0
  161. package/dist/functional/result/impl/result-is-result.mjs +26 -0
  162. package/dist/functional/result/impl/result-is-result.mjs.map +1 -0
  163. package/dist/functional/result/impl/result-map-err.d.mts +33 -0
  164. package/dist/functional/result/impl/result-map-err.d.mts.map +1 -0
  165. package/dist/functional/result/impl/result-map-err.mjs +25 -0
  166. package/dist/functional/result/impl/result-map-err.mjs.map +1 -0
  167. package/dist/functional/result/impl/result-map.d.mts +34 -0
  168. package/dist/functional/result/impl/result-map.d.mts.map +1 -0
  169. package/dist/functional/result/impl/result-map.mjs +25 -0
  170. package/dist/functional/result/impl/result-map.mjs.map +1 -0
  171. package/dist/functional/result/impl/result-ok.d.mts +25 -0
  172. package/dist/functional/result/impl/result-ok.d.mts.map +1 -0
  173. package/dist/functional/result/impl/result-ok.mjs +32 -0
  174. package/dist/functional/result/impl/result-ok.mjs.map +1 -0
  175. package/dist/functional/result/impl/result-or-else.d.mts +32 -0
  176. package/dist/functional/result/impl/result-or-else.d.mts.map +1 -0
  177. package/dist/functional/result/impl/result-or-else.mjs +20 -0
  178. package/dist/functional/result/impl/result-or-else.mjs.map +1 -0
  179. package/dist/functional/result/impl/result-swap.d.mts +20 -0
  180. package/dist/functional/result/impl/result-swap.d.mts.map +1 -0
  181. package/dist/functional/result/impl/result-swap.mjs +28 -0
  182. package/dist/functional/result/impl/result-swap.mjs.map +1 -0
  183. package/dist/functional/result/impl/result-to-optional.d.mts +28 -0
  184. package/dist/functional/result/impl/result-to-optional.d.mts.map +1 -0
  185. package/dist/functional/result/impl/result-to-optional.mjs +34 -0
  186. package/dist/functional/result/impl/result-to-optional.mjs.map +1 -0
  187. package/dist/functional/result/impl/result-unwrap-err-or.d.mts +29 -0
  188. package/dist/functional/result/impl/result-unwrap-err-or.d.mts.map +1 -0
  189. package/dist/functional/result/impl/result-unwrap-err-or.mjs +20 -0
  190. package/dist/functional/result/impl/result-unwrap-err-or.mjs.map +1 -0
  191. package/dist/functional/result/impl/result-unwrap-err-throw.d.mts +30 -0
  192. package/dist/functional/result/impl/result-unwrap-err-throw.d.mts.map +1 -0
  193. package/dist/functional/result/impl/result-unwrap-err-throw.mjs +47 -0
  194. package/dist/functional/result/impl/result-unwrap-err-throw.mjs.map +1 -0
  195. package/dist/functional/result/impl/result-unwrap-err.d.mts +31 -0
  196. package/dist/functional/result/impl/result-unwrap-err.d.mts.map +1 -0
  197. package/dist/functional/result/impl/result-unwrap-err.mjs +36 -0
  198. package/dist/functional/result/impl/result-unwrap-err.mjs.map +1 -0
  199. package/dist/functional/result/impl/result-unwrap-ok-or.d.mts +29 -0
  200. package/dist/functional/result/impl/result-unwrap-ok-or.d.mts.map +1 -0
  201. package/dist/functional/result/impl/result-unwrap-ok-or.mjs +20 -0
  202. package/dist/functional/result/impl/result-unwrap-ok-or.mjs.map +1 -0
  203. package/dist/functional/result/impl/result-unwrap-ok.d.mts +23 -0
  204. package/dist/functional/result/impl/result-unwrap-ok.d.mts.map +1 -0
  205. package/dist/functional/result/impl/result-unwrap-ok.mjs +11 -0
  206. package/dist/functional/result/impl/result-unwrap-ok.mjs.map +1 -0
  207. package/dist/functional/result/impl/result-unwrap-throw.d.mts +30 -0
  208. package/dist/functional/result/impl/result-unwrap-throw.d.mts.map +1 -0
  209. package/dist/functional/result/impl/result-unwrap-throw.mjs +41 -0
  210. package/dist/functional/result/impl/result-unwrap-throw.mjs.map +1 -0
  211. package/dist/functional/result/impl/result-zip.d.mts +29 -0
  212. package/dist/functional/result/impl/result-zip.d.mts.map +1 -0
  213. package/dist/functional/result/impl/result-zip.mjs +38 -0
  214. package/dist/functional/result/impl/result-zip.mjs.map +1 -0
  215. package/dist/functional/result/impl/tag.d.mts +5 -0
  216. package/dist/functional/result/impl/tag.d.mts.map +1 -0
  217. package/dist/functional/result/impl/tag.mjs +7 -0
  218. package/dist/functional/result/impl/tag.mjs.map +1 -0
  219. package/dist/functional/result/impl/types.d.mts +29 -0
  220. package/dist/functional/result/impl/types.d.mts.map +1 -0
  221. package/dist/functional/result/impl/types.mjs +2 -0
  222. package/dist/functional/result/impl/types.mjs.map +1 -0
  223. package/dist/functional/result/index.d.mts +2 -0
  224. package/dist/functional/result/index.d.mts.map +1 -0
  225. package/dist/functional/result/index.mjs +3 -0
  226. package/dist/functional/result/index.mjs.map +1 -0
  227. package/dist/functional/ternary-result/impl/index.d.mts +29 -0
  228. package/dist/functional/ternary-result/impl/index.d.mts.map +1 -0
  229. package/dist/functional/ternary-result/impl/index.mjs +28 -0
  230. package/dist/functional/ternary-result/impl/index.mjs.map +1 -0
  231. package/dist/functional/ternary-result/impl/tag.d.mts +7 -0
  232. package/dist/functional/ternary-result/impl/tag.d.mts.map +1 -0
  233. package/dist/functional/ternary-result/impl/tag.mjs +9 -0
  234. package/dist/functional/ternary-result/impl/tag.mjs.map +1 -0
  235. package/dist/functional/ternary-result/impl/ternary-result-err.d.mts +14 -0
  236. package/dist/functional/ternary-result/impl/ternary-result-err.d.mts.map +1 -0
  237. package/dist/functional/ternary-result/impl/ternary-result-err.mjs +21 -0
  238. package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -0
  239. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts +18 -0
  240. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts.map +1 -0
  241. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs +24 -0
  242. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs.map +1 -0
  243. package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts +29 -0
  244. package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts.map +1 -0
  245. package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs +41 -0
  246. package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -0
  247. package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts +27 -0
  248. package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts.map +1 -0
  249. package/dist/functional/ternary-result/impl/ternary-result-fold.mjs +36 -0
  250. package/dist/functional/ternary-result/impl/ternary-result-fold.mjs.map +1 -0
  251. package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts +20 -0
  252. package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts.map +1 -0
  253. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +24 -0
  254. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs.map +1 -0
  255. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts +17 -0
  256. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts.map +1 -0
  257. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +33 -0
  258. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs.map +1 -0
  259. package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts +20 -0
  260. package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts.map +1 -0
  261. package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs +23 -0
  262. package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs.map +1 -0
  263. package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts +21 -0
  264. package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts.map +1 -0
  265. package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs +24 -0
  266. package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs.map +1 -0
  267. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts +17 -0
  268. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts.map +1 -0
  269. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +28 -0
  270. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs.map +1 -0
  271. package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts +21 -0
  272. package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts.map +1 -0
  273. package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs +24 -0
  274. package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs.map +1 -0
  275. package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts +23 -0
  276. package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts.map +1 -0
  277. package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs +26 -0
  278. package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -0
  279. package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts +21 -0
  280. package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts.map +1 -0
  281. package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs +29 -0
  282. package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -0
  283. package/dist/functional/ternary-result/impl/ternary-result-map.d.mts +29 -0
  284. package/dist/functional/ternary-result/impl/ternary-result-map.d.mts.map +1 -0
  285. package/dist/functional/ternary-result/impl/ternary-result-map.mjs +35 -0
  286. package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +1 -0
  287. package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts +16 -0
  288. package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts.map +1 -0
  289. package/dist/functional/ternary-result/impl/ternary-result-ok.mjs +23 -0
  290. package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -0
  291. package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts +26 -0
  292. package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts.map +1 -0
  293. package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs +19 -0
  294. package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs.map +1 -0
  295. package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts +16 -0
  296. package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts.map +1 -0
  297. package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs +25 -0
  298. package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs.map +1 -0
  299. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts +22 -0
  300. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts.map +1 -0
  301. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs +17 -0
  302. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs.map +1 -0
  303. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts +18 -0
  304. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts.map +1 -0
  305. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs +36 -0
  306. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs.map +1 -0
  307. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts +17 -0
  308. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts.map +1 -0
  309. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs +22 -0
  310. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs.map +1 -0
  311. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts +22 -0
  312. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts.map +1 -0
  313. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs +17 -0
  314. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs.map +1 -0
  315. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts +17 -0
  316. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts.map +1 -0
  317. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs +13 -0
  318. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs.map +1 -0
  319. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts +18 -0
  320. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts.map +1 -0
  321. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs +36 -0
  322. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs.map +1 -0
  323. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts +19 -0
  324. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts.map +1 -0
  325. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs +17 -0
  326. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs.map +1 -0
  327. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts +18 -0
  328. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts.map +1 -0
  329. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs +32 -0
  330. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs.map +1 -0
  331. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts +17 -0
  332. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts.map +1 -0
  333. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs +22 -0
  334. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs.map +1 -0
  335. package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts +18 -0
  336. package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts.map +1 -0
  337. package/dist/functional/ternary-result/impl/ternary-result-warn.mjs +26 -0
  338. package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -0
  339. package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts +26 -0
  340. package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -0
  341. package/dist/functional/ternary-result/impl/ternary-result-zip.mjs +48 -0
  342. package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -0
  343. package/dist/functional/ternary-result/impl/types.d.mts +25 -0
  344. package/dist/functional/ternary-result/impl/types.d.mts.map +1 -0
  345. package/dist/functional/ternary-result/impl/types.mjs +2 -0
  346. package/dist/functional/ternary-result/impl/types.mjs.map +1 -0
  347. package/dist/functional/ternary-result/impl/variant-name.d.mts +3 -0
  348. package/dist/functional/ternary-result/impl/variant-name.d.mts.map +1 -0
  349. package/dist/functional/ternary-result/impl/variant-name.mjs +16 -0
  350. package/dist/functional/ternary-result/impl/variant-name.mjs.map +1 -0
  351. package/dist/functional/ternary-result/index.d.mts +2 -0
  352. package/dist/functional/ternary-result/index.d.mts.map +1 -0
  353. package/dist/functional/ternary-result/index.mjs +3 -0
  354. package/dist/functional/ternary-result/index.mjs.map +1 -0
  355. package/dist/globals.d.mts +136 -0
  356. package/dist/index.d.mts +0 -1
  357. package/dist/index.d.mts.map +1 -1
  358. package/dist/index.mjs +0 -4
  359. package/dist/index.mjs.map +1 -1
  360. package/dist/json/json.d.mts +0 -1
  361. package/dist/json/json.d.mts.map +1 -1
  362. package/dist/json/json.mjs +8 -8
  363. package/dist/json/json.mjs.map +1 -1
  364. package/dist/number/branded-types/finite-number.mjs +1 -1
  365. package/dist/number/branded-types/finite-number.mjs.map +1 -1
  366. package/dist/number/branded-types/int.mjs +1 -1
  367. package/dist/number/branded-types/int.mjs.map +1 -1
  368. package/dist/number/branded-types/int16.mjs +1 -1
  369. package/dist/number/branded-types/int16.mjs.map +1 -1
  370. package/dist/number/branded-types/int32.mjs +1 -1
  371. package/dist/number/branded-types/int32.mjs.map +1 -1
  372. package/dist/number/branded-types/non-negative-finite-number.mjs +1 -1
  373. package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
  374. package/dist/number/branded-types/non-negative-int16.mjs +1 -1
  375. package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
  376. package/dist/number/branded-types/non-negative-int32.mjs +1 -1
  377. package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
  378. package/dist/number/branded-types/non-zero-finite-number.mjs +1 -1
  379. package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
  380. package/dist/number/branded-types/non-zero-int.mjs +1 -1
  381. package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
  382. package/dist/number/branded-types/non-zero-int16.mjs +1 -1
  383. package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
  384. package/dist/number/branded-types/non-zero-int32.mjs +1 -1
  385. package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
  386. package/dist/number/branded-types/non-zero-safe-int.mjs +1 -1
  387. package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
  388. package/dist/number/branded-types/non-zero-uint16.mjs +1 -1
  389. package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
  390. package/dist/number/branded-types/non-zero-uint32.mjs +1 -1
  391. package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
  392. package/dist/number/branded-types/positive-finite-number.mjs +1 -1
  393. package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
  394. package/dist/number/branded-types/positive-int.mjs +1 -1
  395. package/dist/number/branded-types/positive-int.mjs.map +1 -1
  396. package/dist/number/branded-types/positive-int16.mjs +1 -1
  397. package/dist/number/branded-types/positive-int16.mjs.map +1 -1
  398. package/dist/number/branded-types/positive-int32.mjs +1 -1
  399. package/dist/number/branded-types/positive-int32.mjs.map +1 -1
  400. package/dist/number/branded-types/positive-safe-int.mjs +1 -1
  401. package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
  402. package/dist/number/branded-types/positive-uint16.mjs +1 -1
  403. package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
  404. package/dist/number/branded-types/positive-uint32.mjs +1 -1
  405. package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
  406. package/dist/number/branded-types/safe-int.mjs +1 -1
  407. package/dist/number/branded-types/safe-int.mjs.map +1 -1
  408. package/dist/number/branded-types/safe-uint.mjs +1 -1
  409. package/dist/number/branded-types/safe-uint.mjs.map +1 -1
  410. package/dist/number/branded-types/uint.mjs +1 -1
  411. package/dist/number/branded-types/uint.mjs.map +1 -1
  412. package/dist/number/branded-types/uint16.mjs +1 -1
  413. package/dist/number/branded-types/uint16.mjs.map +1 -1
  414. package/dist/number/branded-types/uint32.mjs +1 -1
  415. package/dist/number/branded-types/uint32.mjs.map +1 -1
  416. package/dist/number/enum/int8.mjs +1 -1
  417. package/dist/number/enum/int8.mjs.map +1 -1
  418. package/dist/number/enum/uint8.mjs +1 -1
  419. package/dist/number/enum/uint8.mjs.map +1 -1
  420. package/dist/number/refined-number-utils.mjs +0 -2
  421. package/dist/number/refined-number-utils.mjs.map +1 -1
  422. package/dist/promise/promise.d.mts +0 -1
  423. package/dist/promise/promise.d.mts.map +1 -1
  424. package/dist/promise/promise.mjs +2 -3
  425. package/dist/promise/promise.mjs.map +1 -1
  426. package/package.json +27 -21
  427. package/src/array/impl/array-utils-element-access.mts +6 -6
  428. package/src/array/impl/array-utils-element-access.test.mts +6 -6
  429. package/src/array/impl/array-utils-reducing-value.mts +8 -24
  430. package/src/array/impl/array-utils-reducing-value.test.mts +8 -8
  431. package/src/array/impl/array-utils-slice-clamped.test.mts +1 -1
  432. package/src/entry-point.mts +1 -0
  433. package/src/functional/index.mts +3 -2
  434. package/src/functional/optional/impl/index.mts +17 -0
  435. package/src/functional/optional/impl/optional-expect-to-be.mts +65 -0
  436. package/src/functional/optional/impl/optional-filter.mts +71 -0
  437. package/src/functional/optional/impl/optional-flat-map.mts +67 -0
  438. package/src/functional/optional/impl/optional-from-nullable.mts +28 -0
  439. package/src/functional/optional/impl/optional-is-none.mts +25 -0
  440. package/src/functional/optional/impl/optional-is-optional.mts +27 -0
  441. package/src/functional/optional/impl/optional-is-some.mts +25 -0
  442. package/src/functional/optional/impl/optional-map.mts +69 -0
  443. package/src/functional/optional/impl/optional-none.mts +17 -0
  444. package/src/functional/optional/impl/optional-or-else.mts +73 -0
  445. package/src/functional/optional/impl/optional-some.mts +23 -0
  446. package/src/functional/optional/impl/optional-to-nullable.mts +31 -0
  447. package/src/functional/optional/impl/optional-unwrap-or.mts +64 -0
  448. package/src/functional/optional/impl/optional-unwrap-throw.mts +39 -0
  449. package/src/functional/optional/impl/optional-unwrap.mts +41 -0
  450. package/src/functional/optional/impl/optional-zip.mts +40 -0
  451. package/src/functional/optional/impl/tag.mts +6 -0
  452. package/src/functional/optional/impl/types.mts +28 -0
  453. package/src/functional/optional/index.mts +1 -0
  454. package/src/functional/optional.test.mts +7 -8
  455. package/src/functional/pipe.mts +5 -5
  456. package/src/functional/pipe.test.mts +1 -1
  457. package/src/functional/result/impl/index.mts +23 -0
  458. package/src/functional/result/impl/result-err.mts +29 -0
  459. package/src/functional/result/impl/result-expect-to-be.mts +63 -0
  460. package/src/functional/result/impl/result-flat-map.mts +79 -0
  461. package/src/functional/result/impl/result-fold.mts +95 -0
  462. package/src/functional/result/impl/result-from-promise.mts +39 -0
  463. package/src/functional/result/impl/result-from-throwable.mts +42 -0
  464. package/src/functional/result/impl/result-is-err.mts +23 -0
  465. package/src/functional/result/impl/result-is-ok.mts +23 -0
  466. package/src/functional/result/impl/result-is-result.mts +23 -0
  467. package/src/functional/result/impl/result-map-err.mts +72 -0
  468. package/src/functional/result/impl/result-map.mts +73 -0
  469. package/src/functional/result/impl/result-ok.mts +29 -0
  470. package/src/functional/result/impl/result-or-else.mts +63 -0
  471. package/src/functional/result/impl/result-swap.mts +28 -0
  472. package/src/functional/result/impl/result-to-optional.mts +34 -0
  473. package/src/functional/result/impl/result-unwrap-err-or.mts +60 -0
  474. package/src/functional/result/impl/result-unwrap-err-throw.mts +53 -0
  475. package/src/functional/result/impl/result-unwrap-err.mts +36 -0
  476. package/src/functional/result/impl/result-unwrap-ok-or.mts +60 -0
  477. package/src/functional/result/impl/result-unwrap-ok.mts +35 -0
  478. package/src/functional/result/impl/result-unwrap-throw.mts +43 -0
  479. package/src/functional/result/impl/result-zip.mts +39 -0
  480. package/src/functional/result/impl/tag.mts +6 -0
  481. package/src/functional/result/impl/types.mts +35 -0
  482. package/src/functional/result/index.mts +1 -0
  483. package/src/functional/result.test.mts +5 -4
  484. package/src/functional/ternary-result/impl/index.mts +28 -0
  485. package/src/functional/ternary-result/impl/tag.mts +11 -0
  486. package/src/functional/ternary-result/impl/ternary-result-err.mts +18 -0
  487. package/src/functional/ternary-result/impl/ternary-result-expect-to-be.mts +53 -0
  488. package/src/functional/ternary-result/impl/ternary-result-flat-map.mts +95 -0
  489. package/src/functional/ternary-result/impl/ternary-result-fold.mts +93 -0
  490. package/src/functional/ternary-result/impl/ternary-result-from-promise.mts +27 -0
  491. package/src/functional/ternary-result/impl/ternary-result-from-throwable.mts +31 -0
  492. package/src/functional/ternary-result/impl/ternary-result-is-err.mts +23 -0
  493. package/src/functional/ternary-result/impl/ternary-result-is-ok.mts +24 -0
  494. package/src/functional/ternary-result/impl/ternary-result-is-ternary-result.mts +27 -0
  495. package/src/functional/ternary-result/impl/ternary-result-is-warn.mts +24 -0
  496. package/src/functional/ternary-result/impl/ternary-result-map-err.mts +64 -0
  497. package/src/functional/ternary-result/impl/ternary-result-map-warn.mts +66 -0
  498. package/src/functional/ternary-result/impl/ternary-result-map.mts +81 -0
  499. package/src/functional/ternary-result/impl/ternary-result-ok.mts +20 -0
  500. package/src/functional/ternary-result/impl/ternary-result-or-else.mts +66 -0
  501. package/src/functional/ternary-result/impl/ternary-result-to-optional.mts +25 -0
  502. package/src/functional/ternary-result/impl/ternary-result-unwrap-err-or.mts +45 -0
  503. package/src/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mts +40 -0
  504. package/src/functional/ternary-result/impl/ternary-result-unwrap-err.mts +22 -0
  505. package/src/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mts +45 -0
  506. package/src/functional/ternary-result/impl/ternary-result-unwrap-ok.mts +32 -0
  507. package/src/functional/ternary-result/impl/ternary-result-unwrap-throw.mts +45 -0
  508. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mts +42 -0
  509. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mts +38 -0
  510. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn.mts +22 -0
  511. package/src/functional/ternary-result/impl/ternary-result-warn.mts +23 -0
  512. package/src/functional/ternary-result/impl/ternary-result-zip.mts +53 -0
  513. package/src/functional/ternary-result/impl/types.mts +39 -0
  514. package/src/functional/ternary-result/impl/variant-name.mts +17 -0
  515. package/src/functional/ternary-result/index.mts +1 -0
  516. package/src/functional/ternary-result.test.mts +198 -0
  517. package/src/globals.d.mts +136 -0
  518. package/src/guard/is-non-empty-string.test.mts +1 -1
  519. package/src/guard/is-non-null-object.test.mts +3 -3
  520. package/src/guard/is-primitive.test.mts +3 -3
  521. package/src/guard/is-type.test.mts +3 -3
  522. package/src/index.mts +0 -1
  523. package/src/number/branded-types/finite-number.mts +7 -7
  524. package/src/number/branded-types/int.mts +7 -7
  525. package/src/number/branded-types/int16.mts +9 -9
  526. package/src/number/branded-types/int32.mts +9 -9
  527. package/src/number/branded-types/non-negative-finite-number.mts +8 -8
  528. package/src/number/branded-types/non-negative-int16.mts +9 -9
  529. package/src/number/branded-types/non-negative-int32.mts +9 -9
  530. package/src/number/branded-types/non-zero-finite-number.mts +7 -7
  531. package/src/number/branded-types/non-zero-int.mts +7 -7
  532. package/src/number/branded-types/non-zero-int16.mts +9 -9
  533. package/src/number/branded-types/non-zero-int32.mts +9 -9
  534. package/src/number/branded-types/non-zero-safe-int.mts +9 -9
  535. package/src/number/branded-types/non-zero-uint16.mts +9 -9
  536. package/src/number/branded-types/non-zero-uint32.mts +9 -9
  537. package/src/number/branded-types/positive-finite-number.mts +8 -8
  538. package/src/number/branded-types/positive-int.mts +8 -8
  539. package/src/number/branded-types/positive-int16.mts +9 -9
  540. package/src/number/branded-types/positive-int32.mts +9 -9
  541. package/src/number/branded-types/positive-safe-int.mts +9 -9
  542. package/src/number/branded-types/positive-uint16.mts +9 -9
  543. package/src/number/branded-types/positive-uint32.mts +9 -9
  544. package/src/number/branded-types/safe-int.mts +9 -9
  545. package/src/number/branded-types/safe-uint.mts +9 -9
  546. package/src/number/branded-types/uint.mts +8 -8
  547. package/src/number/branded-types/uint16.mts +9 -9
  548. package/src/number/branded-types/uint32.mts +9 -9
  549. package/src/number/enum/int8.mts +3 -3
  550. package/src/number/enum/int8.test.mts +9 -9
  551. package/src/number/enum/uint8.mts +3 -3
  552. package/src/number/enum/uint8.test.mts +8 -8
  553. package/dist/functional/optional.d.mts +0 -482
  554. package/dist/functional/optional.d.mts.map +0 -1
  555. package/dist/functional/optional.mjs +0 -328
  556. package/dist/functional/optional.mjs.map +0 -1
  557. package/dist/functional/result.d.mts +0 -712
  558. package/dist/functional/result.d.mts.map +0 -1
  559. package/dist/functional/result.mjs +0 -539
  560. package/dist/functional/result.mjs.map +0 -1
  561. package/src/functional/optional.mts +0 -713
  562. package/src/functional/result.mts +0 -1087
@@ -1,482 +0,0 @@
1
- /** @internal String literal tag to identify the 'Some' variant of Optional. */
2
- declare const SomeTypeTagName = "ts-data-forge::Optional.some";
3
- /** @internal String literal tag to identify the 'None' variant of Optional. */
4
- declare const NoneTypeTagName = "ts-data-forge::Optional.none";
5
- /**
6
- * @template S The type of the contained value.
7
- * @internal
8
- * Represents the 'Some' variant of an Optional, containing a value.
9
- */
10
- type Some_<S> = Readonly<{
11
- /**
12
- * @internal
13
- * Discriminant property for the 'Some' type.
14
- */
15
- $$tag: typeof SomeTypeTagName;
16
- /** The contained value. */
17
- value: S;
18
- }>;
19
- /**
20
- * @internal
21
- * Represents the 'None' variant of an Optional, indicating the absence of a value.
22
- */
23
- type None_ = Readonly<{
24
- /**
25
- * @internal
26
- * Discriminant property for the 'None' type.
27
- */
28
- $$tag: typeof NoneTypeTagName;
29
- }>;
30
- /**
31
- * Represents an optional value that can either be 'Some' (containing a value)
32
- * or 'None' (empty).
33
- *
34
- * @template S The type of the value that might be present.
35
- */
36
- export type Optional<S> = None_ | Some_<S>;
37
- /**
38
- * Namespace for the {@link Optional} type and related functions. Provides
39
- * utilities to handle values that might be absent, similar to Option types in
40
- * other languages.
41
- */
42
- export declare namespace Optional {
43
- /**
44
- * Checks if the given value is an {@link Optional}.
45
- *
46
- * @example
47
- *
48
- * ```ts
49
- * const maybeOptional = Optional.some('value');
50
- * const notOptional = { $$tag: 'ts-data-forge::Optional.some' };
51
- *
52
- * assert.ok(Optional.isOptional(maybeOptional));
53
- * assert.notOk(Optional.isOptional(notOptional));
54
- * ```
55
- *
56
- * @param maybeOptional The value to check.
57
- * @returns `true` if the value is an {@link Optional}, otherwise `false`.
58
- */
59
- const isOptional: (maybeOptional: unknown) => maybeOptional is Optional<unknown>;
60
- /**
61
- * Represents an {@link Optional} that contains a value.
62
- *
63
- * @template S The type of the contained value.
64
- */
65
- type Some<S> = Some_<S>;
66
- /** Represents an {@link Optional} that does not contain a value (is empty). */
67
- type None = None_;
68
- /**
69
- * Base type for any {@link Optional}, used for generic constraints. Represents
70
- * an {@link Optional} with an unknown value type.
71
- */
72
- type Base = Optional<unknown>;
73
- /**
74
- * Extracts the value type `S` from an {@link Optional.Some}<S>. If the
75
- * {@link Optional} is {@link Optional.None}, resolves to `never`.
76
- *
77
- * @template O The {@link Optional.Base} type to unwrap.
78
- */
79
- type Unwrap<O extends Base> = O extends Some<infer S> ? S : never;
80
- /**
81
- * Narrows an {@link Optional.Base} type to {@link Optional.Some}<S> if it is a
82
- * {@link Optional.Some}. If the {@link Optional} is {@link Optional.None},
83
- * resolves to `never`.
84
- *
85
- * @template O The {@link Optional.Base} type to narrow.
86
- */
87
- type NarrowToSome<O extends Base> = O extends None ? never : O;
88
- /**
89
- * Narrows an {@link Optional.Base} type to {@link Optional.None} if it is a
90
- * {@link Optional.None}. If the {@link Optional} is {@link Optional.Some}<S>,
91
- * resolves to `never`.
92
- *
93
- * @template O The {@link Optional.Base} type to narrow.
94
- */
95
- type NarrowToNone<O extends Base> = O extends None ? O : never;
96
- /**
97
- * Creates an {@link Optional.Some} containing the given value.
98
- *
99
- * @example
100
- *
101
- * ```ts
102
- * const someValue = Optional.some({ id: 1 });
103
- * const noneValue = Optional.none;
104
- *
105
- * assert.ok(Optional.isSome(someValue));
106
- * assert.ok(Optional.isNone(noneValue));
107
- * ```
108
- *
109
- * @template S The type of the value.
110
- * @param value The value to wrap in an {@link Optional.Some}.
111
- * @returns An {@link Optional.Some}<S> containing the value.
112
- */
113
- const some: <S>(value: S) => Some<S>;
114
- /**
115
- * The singleton instance representing {@link Optional.None} (an empty
116
- * Optional).
117
- *
118
- * @example
119
- *
120
- * ```ts
121
- * const someValue = Optional.some({ id: 1 });
122
- * const noneValue = Optional.none;
123
- *
124
- * assert.ok(Optional.isSome(someValue));
125
- * assert.ok(Optional.isNone(noneValue));
126
- * ```
127
- */
128
- const none: None;
129
- /**
130
- * Checks if an {@link Optional} is {@link Optional.Some}. Acts as a type guard.
131
- *
132
- * @example
133
- *
134
- * ```ts
135
- * const optionalNumber = Optional.some(42);
136
- *
137
- * if (Optional.isSome(optionalNumber)) {
138
- * const value: number = optionalNumber.value;
139
- * assert(value === 42);
140
- * }
141
- * ```
142
- *
143
- * @template O The {@link Optional.Base} type to check.
144
- * @param optional The {@link Optional} to check.
145
- * @returns `true` if the {@link Optional} is {@link Optional.Some}, `false`
146
- * otherwise.
147
- */
148
- const isSome: <O extends Base>(optional: O) => optional is NarrowToSome<O>;
149
- /**
150
- * Checks if an {@link Optional} is {@link Optional.None}. Acts as a type guard.
151
- *
152
- * @example
153
- *
154
- * ```ts
155
- * const optionalValue = Optional.none as Optional<number>;
156
- *
157
- * if (Optional.isNone(optionalValue)) {
158
- * // Type narrowed to None
159
- * assert.ok(true); // optionalValue is None
160
- * }
161
- * ```
162
- *
163
- * @template O The {@link Optional.Base} type to check.
164
- * @param optional The {@link Optional} to check.
165
- * @returns `true` if the {@link Optional} is {@link Optional.None}, `false`
166
- * otherwise.
167
- */
168
- const isNone: <O extends Base>(optional: O) => optional is NarrowToNone<O>;
169
- /**
170
- * Unwraps an `Optional`, returning the contained value. Throws an error if
171
- * the `Optional` is `Optional.None`.
172
- *
173
- * This is a safer alternative to direct value access when you know the
174
- * Optional should contain a value. Use this method when an empty Optional
175
- * represents a programming error or unexpected condition.
176
- *
177
- * @example
178
- *
179
- * ```ts
180
- * const present = Optional.some('available');
181
- *
182
- * assert(Optional.unwrapThrow(present) === 'available');
183
- * assert.throws(
184
- * () => Optional.unwrapThrow(Optional.none),
185
- * /has failed because it is `None`/u,
186
- * );
187
- * ```
188
- *
189
- * @template O The `Optional.Base` type to unwrap.
190
- * @param optional The `Optional` to unwrap.
191
- * @returns The contained value if `Optional.Some`.
192
- * @throws {Error} Error with message "`unwrapThrow()` has failed because it
193
- * is `None`" if the `Optional` is `Optional.None`.
194
- */
195
- const unwrapThrow: <O extends Base>(optional: O) => Unwrap<O>;
196
- /**
197
- * Unwraps an `Optional`, returning the contained value or `undefined` if
198
- * empty.
199
- *
200
- * This function provides a safe way to extract values from Optionals without
201
- * throwing exceptions. It has overloaded behavior based on the type:
202
- *
203
- * - For `Optional.Some<T>`: Always returns `T` (guaranteed by type system)
204
- * - For general `Optional<T>`: Returns `T | undefined`
205
- *
206
- * @example
207
- *
208
- * ```ts
209
- * const someString = Optional.some('text');
210
- * const noneString = Optional.none as Optional<string>;
211
- *
212
- * assert(Optional.unwrap(someString) === 'text');
213
- * assert(Optional.unwrap(noneString) === undefined);
214
- * ```
215
- *
216
- * @template O The `Optional.Base` type to unwrap.
217
- * @param optional The `Optional` to unwrap.
218
- * @returns The contained value if `Optional.Some`, otherwise `undefined`.
219
- */
220
- function unwrap<O extends Some<unknown>>(optional: O): Unwrap<O>;
221
- function unwrap<O extends Base>(optional: O): Unwrap<O> | undefined;
222
- /**
223
- * Unwraps an `Optional`, returning the contained value or a default value if
224
- * it's `Optional.None`.
225
- *
226
- * Supports both direct usage and curried form for functional composition.
227
- * This is often preferred over `unwrap()` when you have a sensible fallback
228
- * value.
229
- *
230
- * @example
231
- *
232
- * ```ts
233
- * const withValue = Optional.some(5);
234
- * const withoutValue = Optional.none as Optional<number>;
235
- *
236
- * assert(Optional.unwrapOr(withValue, 0) === 5);
237
- * assert(Optional.unwrapOr(withoutValue, 0) === 0);
238
- *
239
- * const unwrapWithDefault = Optional.unwrapOr(10);
240
- *
241
- * assert(unwrapWithDefault(Optional.some(3)) === 3);
242
- * assert(unwrapWithDefault(Optional.none) === 10);
243
- * ```
244
- *
245
- * @template O The `Optional.Base` type to unwrap.
246
- * @template D The type of the default value.
247
- * @param optional The `Optional` to unwrap.
248
- * @param defaultValue The value to return if `optional` is `Optional.None`.
249
- * @returns The contained value if `Optional.Some`, otherwise `defaultValue`.
250
- */
251
- function unwrapOr<O extends Base, D>(optional: O, defaultValue: D): D | Unwrap<O>;
252
- function unwrapOr<S, D>(defaultValue: D): (optional: Optional<S>) => D | S;
253
- /**
254
- * Returns the `Optional` if it is `Some`, otherwise returns the alternative.
255
- *
256
- * Provides a way to chain Optional operations with fallback values. This is
257
- * particularly useful for implementing default behavior or cascading lookups.
258
- * Supports both direct usage and curried form for functional composition.
259
- *
260
- * @example
261
- *
262
- * ```ts
263
- * const preferred = Optional.some('primary');
264
- * const fallback = Optional.some('secondary');
265
- * const noneValue = Optional.none as Optional<string>;
266
- *
267
- * assert.deepStrictEqual(Optional.orElse(preferred, fallback), preferred);
268
- * assert.deepStrictEqual(Optional.orElse(noneValue, fallback), fallback);
269
- *
270
- * const orElseFallback = Optional.orElse(Optional.some('default'));
271
- *
272
- * assert.deepStrictEqual(orElseFallback(Optional.none), Optional.some('default'));
273
- * assert.deepStrictEqual(
274
- * orElseFallback(Optional.some('value')),
275
- * Optional.some('value'),
276
- * );
277
- * ```
278
- *
279
- * @template O The input `Optional.Base` type.
280
- * @param optional The `Optional` to check.
281
- * @param alternative The alternative `Optional` to return if the first is
282
- * `None`.
283
- * @returns The first `Optional` if `Some`, otherwise the alternative.
284
- */
285
- function orElse<O extends Base, const O2 extends Base>(optional: O, alternative: O2): O | O2;
286
- function orElse<S, S2>(alternative: Optional<S2>): (optional: Optional<S>) => Optional<S> | Optional<S2>;
287
- /**
288
- * Maps an {@link Optional}<S> to {@link Optional}<S2> by applying a function to
289
- * a contained value. If the {@link Optional} is {@link Optional.None}, it
290
- * returns {@link Optional.none}. Otherwise, it applies the `mapFn` to the
291
- * value in `Optional.Some` and returns a new `Optional.Some` with the
292
- * result.
293
- *
294
- * @example
295
- *
296
- * ```ts
297
- * const numberOptional = Optional.some(21);
298
- * const mapped = Optional.map(numberOptional, (value) => value * 2);
299
- *
300
- * assert.deepStrictEqual(mapped, Optional.some(42));
301
- *
302
- * const mapToLength = Optional.map((text: string) => text.length);
303
- *
304
- * assert.deepStrictEqual(mapToLength(Optional.some('abc')), Optional.some(3));
305
- * assert.deepStrictEqual(mapToLength(Optional.none), Optional.none);
306
- * ```
307
- *
308
- * @template O The input `Optional.Base` type.
309
- * @template S2 The type of the value returned by the mapping function.
310
- * @param optional The `Optional` to map.
311
- * @param mapFn The function to apply to the value if it exists.
312
- * @returns A new `Optional<S2>` resulting from the mapping, or
313
- * `Optional.None` if the input was `Optional.None`.
314
- */
315
- function map<O extends Base, S2>(optional: O, mapFn: (value: Unwrap<O>) => S2): Optional<S2>;
316
- function map<S, S2>(mapFn: (value: S) => S2): (optional: Optional<S>) => Optional<S2>;
317
- /**
318
- * Applies a function that returns an `Optional` to the value in an
319
- * `Optional.Some`. If the input is `Optional.None`, returns `Optional.None`.
320
- * This is the monadic bind operation for `Optional`.
321
- *
322
- * @example
323
- *
324
- * ```ts
325
- * const parseNumber = (input: string): Optional<number> => {
326
- * const num = Number.parseInt(input, 10);
327
- * return Number.isNaN(num) ? Optional.none : Optional.some(num);
328
- * };
329
- *
330
- * const parsed = Optional.flatMap(Optional.some('10'), parseNumber);
331
- *
332
- * assert.deepStrictEqual(parsed, Optional.some(10));
333
- *
334
- * const flatMapParse = Optional.flatMap(parseNumber);
335
- *
336
- * assert.deepStrictEqual(flatMapParse(Optional.some('5')), Optional.some(5));
337
- * assert.deepStrictEqual(flatMapParse(Optional.some('invalid')), Optional.none);
338
- * ```
339
- *
340
- * @template O The input `Optional.Base` type.
341
- * @template S2 The value type of the `Optional` returned by the function.
342
- * @param optional The `Optional` to flat map.
343
- * @param flatMapFn The function to apply that returns an `Optional`.
344
- * @returns The result of applying the function, or `Optional.None`.
345
- */
346
- function flatMap<O extends Base, S2>(optional: O, flatMapFn: (value: Unwrap<O>) => Optional<S2>): Optional<S2>;
347
- function flatMap<S, S2>(flatMapFn: (value: S) => Optional<S2>): (optional: Optional<S>) => Optional<S2>;
348
- /**
349
- * Filters an `Optional` based on a predicate. If the `Optional` is `Some` and
350
- * the predicate returns true, returns the original `Optional`. Otherwise
351
- * returns `None`.
352
- *
353
- * @example
354
- *
355
- * ```ts
356
- * const even = Optional.filter(Optional.some(4), (value) => value % 2 === 0);
357
- * const odd = Optional.filter(Optional.some(3), (value) => value % 2 === 0);
358
- *
359
- * assert.deepStrictEqual(even, Optional.some(4));
360
- * assert.deepStrictEqual(odd, Optional.none);
361
- *
362
- * const filterEven = Optional.filter((value: number) => value % 2 === 0);
363
- *
364
- * assert.deepStrictEqual(filterEven(Optional.some(6)), Optional.some(6));
365
- * assert.deepStrictEqual(filterEven(Optional.some(5)), Optional.none);
366
- * ```
367
- *
368
- * @template O The input `Optional.Base` type.
369
- * @param optional The `Optional` to filter.
370
- * @param predicate The predicate function.
371
- * @returns The filtered `Optional`.
372
- */
373
- function filter<O extends Base>(optional: O, predicate: (value: Unwrap<O>) => boolean): Optional<Unwrap<O>>;
374
- function filter<S>(predicate: (value: S) => boolean): (optional: Optional<S>) => Optional<S>;
375
- /**
376
- * Unwraps an `Optional`, returning the contained value or throwing an error
377
- * with the provided message.
378
- *
379
- * @example
380
- *
381
- * ```ts
382
- * const optionalValue = Optional.some('data');
383
- *
384
- * assert(Optional.expectToBe(optionalValue, 'value expected') === 'data');
385
- *
386
- * const expectValue = Optional.expectToBe<string>('missing optional');
387
- *
388
- * assert.throws(() => expectValue(Optional.none), /missing optional/u);
389
- * assert(expectValue(Optional.some('present')) === 'present');
390
- * ```
391
- *
392
- * @template O The `Optional.Base` type to unwrap.
393
- * @param optional The `Optional` to unwrap.
394
- * @param message The error message to throw if the `Optional` is
395
- * `Optional.None`.
396
- * @returns The contained value if `Optional.Some`.
397
- * @throws Error with the provided message if the `Optional` is
398
- * `Optional.None`.
399
- */
400
- function expectToBe<O extends Base>(optional: O, message: string): Unwrap<O>;
401
- function expectToBe<S>(message: string): (optional: Optional<S>) => S;
402
- /**
403
- * Combines two `Optional` values into a single `Optional` containing a tuple.
404
- * If either `Optional` is `None`, returns `None`.
405
- *
406
- * @example
407
- *
408
- * ```ts
409
- * const zipped = Optional.zip(Optional.some('left'), Optional.some(1));
410
- *
411
- * assert.ok(Optional.isSome(zipped));
412
- * if (Optional.isSome(zipped)) {
413
- * const expected: readonly [string, number] = ['left', 1];
414
- * assert.deepStrictEqual(zipped.value, expected);
415
- * }
416
- *
417
- * const missing = Optional.zip(
418
- * Optional.some('value'),
419
- * Optional.none as Optional<number>,
420
- * );
421
- *
422
- * assert.deepStrictEqual(missing, Optional.none);
423
- * ```
424
- *
425
- * @template A The value type of the first `Optional`.
426
- * @template B The value type of the second `Optional`.
427
- * @param optionalA The first `Optional`.
428
- * @param optionalB The second `Optional`.
429
- * @returns An `Optional` containing a tuple of both values, or `None`.
430
- */
431
- const zip: <A, const B>(optionalA: Optional<A>, optionalB: Optional<B>) => Optional<readonly [A, B]>;
432
- /**
433
- * Converts a nullable value to an `Optional`.
434
- *
435
- * This is the primary way to lift nullable values (null or undefined) into
436
- * the Optional type system. The function treats both `null` and `undefined`
437
- * as empty values, converting them to `Optional.None`.
438
- *
439
- * @example
440
- *
441
- * ```ts
442
- * const present = Optional.fromNullable('hello');
443
- * const absent = Optional.fromNullable<string | null>(null);
444
- *
445
- * assert.deepStrictEqual(present, Optional.some('hello'));
446
- * assert.deepStrictEqual(absent, Optional.none);
447
- * ```
448
- *
449
- * @template T The type of the nullable value.
450
- * @param value The nullable value to convert.
451
- * @returns `Optional.Some<NonNullable<T>>` if the value is not null or
452
- * undefined, otherwise `Optional.None`.
453
- */
454
- const fromNullable: <T>(value: T | null | undefined) => Optional<NonNullable<T>>;
455
- /**
456
- * Converts an `Optional` to a nullable value.
457
- *
458
- * This function extracts the value from an Optional, returning `undefined`
459
- * for empty Optionals. This is useful when interfacing with APIs or systems
460
- * that expect nullable values rather than Optional types.
461
- *
462
- * Note: This returns `undefined` (not `null`) for consistency with
463
- * JavaScript's undefined semantics and TypeScript's optional properties.
464
- *
465
- * @example
466
- *
467
- * ```ts
468
- * const someNumber = Optional.some(42);
469
- * const noneNumber = Optional.none as Optional<number>;
470
- *
471
- * assert(Optional.toNullable(someNumber) === 42);
472
- * assert(Optional.toNullable(noneNumber) === undefined);
473
- * ```
474
- *
475
- * @template O The `Optional.Base` type to convert.
476
- * @param optional The `Optional` to convert.
477
- * @returns The contained value if `Some`, otherwise `undefined`.
478
- */
479
- const toNullable: <O extends Base>(optional: O) => Unwrap<O> | undefined;
480
- }
481
- export {};
482
- //# sourceMappingURL=optional.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"optional.d.mts","sourceRoot":"","sources":["../../src/functional/optional.mts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,QAAA,MAAM,eAAe,iCAAiC,CAAC;AAEvD,+EAA+E;AAC/E,QAAA,MAAM,eAAe,iCAAiC,CAAC;AAEvD;;;;GAIG;AACH,KAAK,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC;IACvB;;;OAGG;IACH,KAAK,EAAE,OAAO,eAAe,CAAC;IAE9B,2BAA2B;IAC3B,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,CAAC;AAEH;;;GAGG;AACH,KAAK,KAAK,GAAG,QAAQ,CAAC;IACpB;;;OAGG;IACH,KAAK,EAAE,OAAO,eAAe,CAAC;CAC/B,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAE3C;;;;GAIG;AACH,yBAAiB,QAAQ,CAAC;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