ts-data-forge 6.9.1 → 6.9.3

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 (605) hide show
  1. package/README.md +2 -14
  2. package/dist/array/impl/array-utils-creation.d.mts +2 -0
  3. package/dist/array/impl/array-utils-creation.d.mts.map +1 -1
  4. package/dist/array/impl/array-utils-creation.mjs.map +1 -1
  5. package/dist/array/impl/array-utils-element-access.d.mts +3 -0
  6. package/dist/array/impl/array-utils-element-access.d.mts.map +1 -1
  7. package/dist/array/impl/array-utils-element-access.mjs.map +1 -1
  8. package/dist/array/impl/array-utils-iterators.d.mts +1 -0
  9. package/dist/array/impl/array-utils-iterators.d.mts.map +1 -1
  10. package/dist/array/impl/array-utils-iterators.mjs.map +1 -1
  11. package/dist/array/impl/array-utils-modification.d.mts +2 -0
  12. package/dist/array/impl/array-utils-modification.d.mts.map +1 -1
  13. package/dist/array/impl/array-utils-modification.mjs.map +1 -1
  14. package/dist/array/impl/array-utils-reducing-value.d.mts +3 -0
  15. package/dist/array/impl/array-utils-reducing-value.d.mts.map +1 -1
  16. package/dist/array/impl/array-utils-reducing-value.mjs.map +1 -1
  17. package/dist/array/impl/array-utils-search.d.mts +2 -0
  18. package/dist/array/impl/array-utils-search.d.mts.map +1 -1
  19. package/dist/array/impl/array-utils-search.mjs.map +1 -1
  20. package/dist/array/impl/array-utils-set-op.d.mts +1 -0
  21. package/dist/array/impl/array-utils-set-op.d.mts.map +1 -1
  22. package/dist/array/impl/array-utils-set-op.mjs.map +1 -1
  23. package/dist/array/impl/array-utils-size.d.mts +2 -0
  24. package/dist/array/impl/array-utils-size.d.mts.map +1 -1
  25. package/dist/array/impl/array-utils-size.mjs +0 -19
  26. package/dist/array/impl/array-utils-size.mjs.map +1 -1
  27. package/dist/array/impl/array-utils-slice-clamped.d.mts +1 -0
  28. package/dist/array/impl/array-utils-slice-clamped.d.mts.map +1 -1
  29. package/dist/array/impl/array-utils-slice-clamped.mjs.map +1 -1
  30. package/dist/array/impl/array-utils-slicing.d.mts +2 -0
  31. package/dist/array/impl/array-utils-slicing.d.mts.map +1 -1
  32. package/dist/array/impl/array-utils-slicing.mjs.map +1 -1
  33. package/dist/array/impl/array-utils-transformation.d.mts +2 -0
  34. package/dist/array/impl/array-utils-transformation.d.mts.map +1 -1
  35. package/dist/array/impl/array-utils-transformation.mjs.map +1 -1
  36. package/dist/array/impl/array-utils-validation.d.mts +2 -0
  37. package/dist/array/impl/array-utils-validation.d.mts.map +1 -1
  38. package/dist/array/impl/array-utils-validation.mjs.map +1 -1
  39. package/dist/collections/imap-mapped.d.mts +2 -0
  40. package/dist/collections/imap-mapped.d.mts.map +1 -1
  41. package/dist/collections/imap-mapped.mjs.map +1 -1
  42. package/dist/collections/imap.d.mts +3 -0
  43. package/dist/collections/imap.d.mts.map +1 -1
  44. package/dist/collections/imap.mjs.map +1 -1
  45. package/dist/collections/iset-mapped.d.mts +2 -0
  46. package/dist/collections/iset-mapped.d.mts.map +1 -1
  47. package/dist/collections/iset-mapped.mjs.map +1 -1
  48. package/dist/collections/iset.d.mts +2 -0
  49. package/dist/collections/iset.d.mts.map +1 -1
  50. package/dist/collections/iset.mjs +0 -1
  51. package/dist/collections/iset.mjs.map +1 -1
  52. package/dist/collections/queue.d.mts +2 -0
  53. package/dist/collections/queue.d.mts.map +1 -1
  54. package/dist/collections/queue.mjs.map +1 -1
  55. package/dist/collections/stack.d.mts +2 -0
  56. package/dist/collections/stack.d.mts.map +1 -1
  57. package/dist/collections/stack.mjs.map +1 -1
  58. package/dist/expect-type.d.mts +1 -0
  59. package/dist/expect-type.d.mts.map +1 -1
  60. package/dist/expect-type.mjs.map +1 -1
  61. package/dist/functional/match.d.mts +1 -0
  62. package/dist/functional/match.d.mts.map +1 -1
  63. package/dist/functional/match.mjs.map +1 -1
  64. package/dist/functional/optional/impl/optional-expect-to-be.d.mts +1 -0
  65. package/dist/functional/optional/impl/optional-expect-to-be.d.mts.map +1 -1
  66. package/dist/functional/optional/impl/optional-expect-to-be.mjs.map +1 -1
  67. package/dist/functional/optional/impl/optional-filter.d.mts +1 -0
  68. package/dist/functional/optional/impl/optional-filter.d.mts.map +1 -1
  69. package/dist/functional/optional/impl/optional-filter.mjs.map +1 -1
  70. package/dist/functional/optional/impl/optional-flat-map.d.mts +1 -0
  71. package/dist/functional/optional/impl/optional-flat-map.d.mts.map +1 -1
  72. package/dist/functional/optional/impl/optional-flat-map.mjs.map +1 -1
  73. package/dist/functional/optional/impl/optional-from-nullable.d.mts +1 -0
  74. package/dist/functional/optional/impl/optional-from-nullable.d.mts.map +1 -1
  75. package/dist/functional/optional/impl/optional-from-nullable.mjs.map +1 -1
  76. package/dist/functional/optional/impl/optional-is-none.d.mts +1 -0
  77. package/dist/functional/optional/impl/optional-is-none.d.mts.map +1 -1
  78. package/dist/functional/optional/impl/optional-is-none.mjs.map +1 -1
  79. package/dist/functional/optional/impl/optional-is-optional.d.mts +1 -0
  80. package/dist/functional/optional/impl/optional-is-optional.d.mts.map +1 -1
  81. package/dist/functional/optional/impl/optional-is-optional.mjs.map +1 -1
  82. package/dist/functional/optional/impl/optional-is-some.d.mts +1 -0
  83. package/dist/functional/optional/impl/optional-is-some.d.mts.map +1 -1
  84. package/dist/functional/optional/impl/optional-is-some.mjs.map +1 -1
  85. package/dist/functional/optional/impl/optional-map.d.mts +1 -0
  86. package/dist/functional/optional/impl/optional-map.d.mts.map +1 -1
  87. package/dist/functional/optional/impl/optional-map.mjs.map +1 -1
  88. package/dist/functional/optional/impl/optional-none.d.mts +1 -0
  89. package/dist/functional/optional/impl/optional-none.d.mts.map +1 -1
  90. package/dist/functional/optional/impl/optional-none.mjs.map +1 -1
  91. package/dist/functional/optional/impl/optional-or-else.d.mts +1 -0
  92. package/dist/functional/optional/impl/optional-or-else.d.mts.map +1 -1
  93. package/dist/functional/optional/impl/optional-or-else.mjs.map +1 -1
  94. package/dist/functional/optional/impl/optional-some.d.mts +1 -0
  95. package/dist/functional/optional/impl/optional-some.d.mts.map +1 -1
  96. package/dist/functional/optional/impl/optional-some.mjs.map +1 -1
  97. package/dist/functional/optional/impl/optional-to-nullable.d.mts +1 -0
  98. package/dist/functional/optional/impl/optional-to-nullable.d.mts.map +1 -1
  99. package/dist/functional/optional/impl/optional-to-nullable.mjs.map +1 -1
  100. package/dist/functional/optional/impl/optional-unwrap-or.d.mts +1 -0
  101. package/dist/functional/optional/impl/optional-unwrap-or.d.mts.map +1 -1
  102. package/dist/functional/optional/impl/optional-unwrap-or.mjs.map +1 -1
  103. package/dist/functional/optional/impl/optional-unwrap-throw.d.mts +1 -0
  104. package/dist/functional/optional/impl/optional-unwrap-throw.d.mts.map +1 -1
  105. package/dist/functional/optional/impl/optional-unwrap-throw.mjs.map +1 -1
  106. package/dist/functional/optional/impl/optional-unwrap.d.mts +2 -0
  107. package/dist/functional/optional/impl/optional-unwrap.d.mts.map +1 -1
  108. package/dist/functional/optional/impl/optional-unwrap.mjs.map +1 -1
  109. package/dist/functional/optional/impl/optional-zip.d.mts +2 -0
  110. package/dist/functional/optional/impl/optional-zip.d.mts.map +1 -1
  111. package/dist/functional/optional/impl/optional-zip.mjs +1 -0
  112. package/dist/functional/optional/impl/optional-zip.mjs.map +1 -1
  113. package/dist/functional/optional/impl/tag.d.mts +1 -0
  114. package/dist/functional/optional/impl/tag.d.mts.map +1 -1
  115. package/dist/functional/optional/impl/tag.mjs +0 -1
  116. package/dist/functional/optional/impl/tag.mjs.map +1 -1
  117. package/dist/functional/optional/impl/types.d.mts +2 -0
  118. package/dist/functional/optional/impl/types.d.mts.map +1 -1
  119. package/dist/functional/optional/index.d.mts +1 -1
  120. package/dist/functional/optional/index.d.mts.map +1 -1
  121. package/dist/functional/optional/optional.d.mts +16 -0
  122. package/dist/functional/optional/optional.d.mts.map +1 -0
  123. package/dist/functional/optional/optional.mjs +3 -0
  124. package/dist/functional/optional/optional.mjs.map +1 -0
  125. package/dist/functional/pipe.d.mts +2 -1
  126. package/dist/functional/pipe.d.mts.map +1 -1
  127. package/dist/functional/pipe.mjs.map +1 -1
  128. package/dist/functional/result/impl/result-err.d.mts +1 -0
  129. package/dist/functional/result/impl/result-err.d.mts.map +1 -1
  130. package/dist/functional/result/impl/result-err.mjs.map +1 -1
  131. package/dist/functional/result/impl/result-expect-to-be.d.mts +1 -0
  132. package/dist/functional/result/impl/result-expect-to-be.d.mts.map +1 -1
  133. package/dist/functional/result/impl/result-expect-to-be.mjs.map +1 -1
  134. package/dist/functional/result/impl/result-flat-map.d.mts +1 -0
  135. package/dist/functional/result/impl/result-flat-map.d.mts.map +1 -1
  136. package/dist/functional/result/impl/result-flat-map.mjs.map +1 -1
  137. package/dist/functional/result/impl/result-fold.d.mts +1 -0
  138. package/dist/functional/result/impl/result-fold.d.mts.map +1 -1
  139. package/dist/functional/result/impl/result-fold.mjs.map +1 -1
  140. package/dist/functional/result/impl/result-from-promise.d.mts +1 -0
  141. package/dist/functional/result/impl/result-from-promise.d.mts.map +1 -1
  142. package/dist/functional/result/impl/result-from-promise.mjs.map +1 -1
  143. package/dist/functional/result/impl/result-from-throwable.d.mts +1 -0
  144. package/dist/functional/result/impl/result-from-throwable.d.mts.map +1 -1
  145. package/dist/functional/result/impl/result-from-throwable.mjs.map +1 -1
  146. package/dist/functional/result/impl/result-is-err.d.mts +1 -0
  147. package/dist/functional/result/impl/result-is-err.d.mts.map +1 -1
  148. package/dist/functional/result/impl/result-is-err.mjs.map +1 -1
  149. package/dist/functional/result/impl/result-is-ok.d.mts +1 -0
  150. package/dist/functional/result/impl/result-is-ok.d.mts.map +1 -1
  151. package/dist/functional/result/impl/result-is-ok.mjs.map +1 -1
  152. package/dist/functional/result/impl/result-is-result.d.mts +1 -0
  153. package/dist/functional/result/impl/result-is-result.d.mts.map +1 -1
  154. package/dist/functional/result/impl/result-is-result.mjs.map +1 -1
  155. package/dist/functional/result/impl/result-map-err.d.mts +1 -0
  156. package/dist/functional/result/impl/result-map-err.d.mts.map +1 -1
  157. package/dist/functional/result/impl/result-map-err.mjs.map +1 -1
  158. package/dist/functional/result/impl/result-map.d.mts +1 -0
  159. package/dist/functional/result/impl/result-map.d.mts.map +1 -1
  160. package/dist/functional/result/impl/result-map.mjs.map +1 -1
  161. package/dist/functional/result/impl/result-ok.d.mts +1 -0
  162. package/dist/functional/result/impl/result-ok.d.mts.map +1 -1
  163. package/dist/functional/result/impl/result-ok.mjs.map +1 -1
  164. package/dist/functional/result/impl/result-or-else.d.mts +1 -0
  165. package/dist/functional/result/impl/result-or-else.d.mts.map +1 -1
  166. package/dist/functional/result/impl/result-or-else.mjs.map +1 -1
  167. package/dist/functional/result/impl/result-swap.d.mts +1 -0
  168. package/dist/functional/result/impl/result-swap.d.mts.map +1 -1
  169. package/dist/functional/result/impl/result-swap.mjs.map +1 -1
  170. package/dist/functional/result/impl/result-to-optional.d.mts +2 -0
  171. package/dist/functional/result/impl/result-to-optional.d.mts.map +1 -1
  172. package/dist/functional/result/impl/result-to-optional.mjs.map +1 -1
  173. package/dist/functional/result/impl/result-unwrap-err-or.d.mts +1 -0
  174. package/dist/functional/result/impl/result-unwrap-err-or.d.mts.map +1 -1
  175. package/dist/functional/result/impl/result-unwrap-err-or.mjs.map +1 -1
  176. package/dist/functional/result/impl/result-unwrap-err-throw.d.mts +1 -0
  177. package/dist/functional/result/impl/result-unwrap-err-throw.d.mts.map +1 -1
  178. package/dist/functional/result/impl/result-unwrap-err-throw.mjs.map +1 -1
  179. package/dist/functional/result/impl/result-unwrap-err.d.mts +1 -0
  180. package/dist/functional/result/impl/result-unwrap-err.d.mts.map +1 -1
  181. package/dist/functional/result/impl/result-unwrap-err.mjs.map +1 -1
  182. package/dist/functional/result/impl/result-unwrap-ok-or.d.mts +1 -0
  183. package/dist/functional/result/impl/result-unwrap-ok-or.d.mts.map +1 -1
  184. package/dist/functional/result/impl/result-unwrap-ok-or.mjs.map +1 -1
  185. package/dist/functional/result/impl/result-unwrap-ok.d.mts +2 -0
  186. package/dist/functional/result/impl/result-unwrap-ok.d.mts.map +1 -1
  187. package/dist/functional/result/impl/result-unwrap-ok.mjs.map +1 -1
  188. package/dist/functional/result/impl/result-unwrap-throw.d.mts +1 -0
  189. package/dist/functional/result/impl/result-unwrap-throw.d.mts.map +1 -1
  190. package/dist/functional/result/impl/result-unwrap-throw.mjs.map +1 -1
  191. package/dist/functional/result/impl/result-zip.d.mts +1 -0
  192. package/dist/functional/result/impl/result-zip.d.mts.map +1 -1
  193. package/dist/functional/result/impl/result-zip.mjs.map +1 -1
  194. package/dist/functional/result/impl/tag.d.mts +1 -0
  195. package/dist/functional/result/impl/tag.d.mts.map +1 -1
  196. package/dist/functional/result/impl/tag.mjs +0 -1
  197. package/dist/functional/result/impl/tag.mjs.map +1 -1
  198. package/dist/functional/result/impl/types.d.mts +2 -0
  199. package/dist/functional/result/impl/types.d.mts.map +1 -1
  200. package/dist/functional/result/index.d.mts +1 -1
  201. package/dist/functional/result/index.d.mts.map +1 -1
  202. package/dist/functional/result/result.d.mts +16 -0
  203. package/dist/functional/result/result.d.mts.map +1 -0
  204. package/dist/functional/result/result.mjs +3 -0
  205. package/dist/functional/result/result.mjs.map +1 -0
  206. package/dist/functional/ternary-result/impl/tag.d.mts +1 -0
  207. package/dist/functional/ternary-result/impl/tag.d.mts.map +1 -1
  208. package/dist/functional/ternary-result/impl/tag.mjs +0 -1
  209. package/dist/functional/ternary-result/impl/tag.mjs.map +1 -1
  210. package/dist/functional/ternary-result/impl/ternary-result-err.d.mts +1 -0
  211. package/dist/functional/ternary-result/impl/ternary-result-err.d.mts.map +1 -1
  212. package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -1
  213. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts +1 -0
  214. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts.map +1 -1
  215. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs.map +1 -1
  216. package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts +1 -0
  217. package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts.map +1 -1
  218. package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -1
  219. package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts +1 -0
  220. package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts.map +1 -1
  221. package/dist/functional/ternary-result/impl/ternary-result-fold.mjs.map +1 -1
  222. package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts +1 -0
  223. package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts.map +1 -1
  224. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs.map +1 -1
  225. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts +1 -0
  226. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts.map +1 -1
  227. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs.map +1 -1
  228. package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts +1 -0
  229. package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts.map +1 -1
  230. package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs.map +1 -1
  231. package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts +1 -0
  232. package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts.map +1 -1
  233. package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs.map +1 -1
  234. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts +1 -0
  235. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts.map +1 -1
  236. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs.map +1 -1
  237. package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts +1 -0
  238. package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts.map +1 -1
  239. package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs.map +1 -1
  240. package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts +1 -0
  241. package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts.map +1 -1
  242. package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -1
  243. package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts +1 -0
  244. package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts.map +1 -1
  245. package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -1
  246. package/dist/functional/ternary-result/impl/ternary-result-map.d.mts +1 -0
  247. package/dist/functional/ternary-result/impl/ternary-result-map.d.mts.map +1 -1
  248. package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +1 -1
  249. package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts +1 -0
  250. package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts.map +1 -1
  251. package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -1
  252. package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts +1 -0
  253. package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts.map +1 -1
  254. package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs.map +1 -1
  255. package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts +2 -0
  256. package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts.map +1 -1
  257. package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs.map +1 -1
  258. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts +1 -0
  259. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts.map +1 -1
  260. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs.map +1 -1
  261. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts +1 -0
  262. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts.map +1 -1
  263. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs.map +1 -1
  264. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts +1 -0
  265. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts.map +1 -1
  266. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs.map +1 -1
  267. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts +1 -0
  268. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts.map +1 -1
  269. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs.map +1 -1
  270. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts +1 -0
  271. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts.map +1 -1
  272. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs.map +1 -1
  273. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts +1 -0
  274. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts.map +1 -1
  275. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs.map +1 -1
  276. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts +1 -0
  277. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts.map +1 -1
  278. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs.map +1 -1
  279. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts +1 -0
  280. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts.map +1 -1
  281. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs.map +1 -1
  282. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts +1 -0
  283. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts.map +1 -1
  284. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs.map +1 -1
  285. package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts +1 -0
  286. package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts.map +1 -1
  287. package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -1
  288. package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts +1 -0
  289. package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -1
  290. package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -1
  291. package/dist/functional/ternary-result/impl/types.d.mts +1 -0
  292. package/dist/functional/ternary-result/impl/types.d.mts.map +1 -1
  293. package/dist/functional/ternary-result/impl/variant-name.d.mts +1 -0
  294. package/dist/functional/ternary-result/impl/variant-name.d.mts.map +1 -1
  295. package/dist/functional/ternary-result/impl/variant-name.mjs.map +1 -1
  296. package/dist/functional/ternary-result/index.d.mts +1 -1
  297. package/dist/functional/ternary-result/index.d.mts.map +1 -1
  298. package/dist/functional/ternary-result/ternary-result.d.mts +40 -0
  299. package/dist/functional/ternary-result/ternary-result.d.mts.map +1 -0
  300. package/dist/functional/ternary-result/ternary-result.mjs +3 -0
  301. package/dist/functional/ternary-result/ternary-result.mjs.map +1 -0
  302. package/dist/guard/has-key.d.mts +1 -0
  303. package/dist/guard/has-key.d.mts.map +1 -1
  304. package/dist/guard/has-key.mjs.map +1 -1
  305. package/dist/guard/is-non-empty-string.d.mts +1 -0
  306. package/dist/guard/is-non-empty-string.d.mts.map +1 -1
  307. package/dist/guard/is-non-empty-string.mjs.map +1 -1
  308. package/dist/guard/is-primitive.d.mts +1 -0
  309. package/dist/guard/is-primitive.d.mts.map +1 -1
  310. package/dist/guard/is-primitive.mjs.map +1 -1
  311. package/dist/guard/is-record.d.mts +1 -0
  312. package/dist/guard/is-record.d.mts.map +1 -1
  313. package/dist/guard/is-record.mjs.map +1 -1
  314. package/dist/guard/is-type.d.mts +1 -0
  315. package/dist/guard/is-type.d.mts.map +1 -1
  316. package/dist/guard/is-type.mjs.map +1 -1
  317. package/dist/guard/key-is-in.d.mts +1 -0
  318. package/dist/guard/key-is-in.d.mts.map +1 -1
  319. package/dist/guard/key-is-in.mjs.map +1 -1
  320. package/dist/iterator/range.d.mts +2 -0
  321. package/dist/iterator/range.d.mts.map +1 -1
  322. package/dist/iterator/range.mjs.map +1 -1
  323. package/dist/json/json.d.mts +2 -0
  324. package/dist/json/json.d.mts.map +1 -1
  325. package/dist/json/json.mjs.map +1 -1
  326. package/dist/number/branded-types/finite-number.d.mts +15 -13
  327. package/dist/number/branded-types/finite-number.d.mts.map +1 -1
  328. package/dist/number/branded-types/finite-number.mjs.map +1 -1
  329. package/dist/number/branded-types/int.d.mts +15 -13
  330. package/dist/number/branded-types/int.d.mts.map +1 -1
  331. package/dist/number/branded-types/int.mjs.map +1 -1
  332. package/dist/number/branded-types/int16.d.mts +19 -17
  333. package/dist/number/branded-types/int16.d.mts.map +1 -1
  334. package/dist/number/branded-types/int16.mjs.map +1 -1
  335. package/dist/number/branded-types/int32.d.mts +19 -17
  336. package/dist/number/branded-types/int32.d.mts.map +1 -1
  337. package/dist/number/branded-types/int32.mjs.map +1 -1
  338. package/dist/number/branded-types/non-negative-finite-number.d.mts +16 -14
  339. package/dist/number/branded-types/non-negative-finite-number.d.mts.map +1 -1
  340. package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
  341. package/dist/number/branded-types/non-negative-int16.d.mts +18 -16
  342. package/dist/number/branded-types/non-negative-int16.d.mts.map +1 -1
  343. package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
  344. package/dist/number/branded-types/non-negative-int32.d.mts +18 -16
  345. package/dist/number/branded-types/non-negative-int32.d.mts.map +1 -1
  346. package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
  347. package/dist/number/branded-types/non-zero-finite-number.d.mts +16 -14
  348. package/dist/number/branded-types/non-zero-finite-number.d.mts.map +1 -1
  349. package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
  350. package/dist/number/branded-types/non-zero-int.d.mts +16 -14
  351. package/dist/number/branded-types/non-zero-int.d.mts.map +1 -1
  352. package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
  353. package/dist/number/branded-types/non-zero-int16.d.mts +19 -17
  354. package/dist/number/branded-types/non-zero-int16.d.mts.map +1 -1
  355. package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
  356. package/dist/number/branded-types/non-zero-int32.d.mts +19 -17
  357. package/dist/number/branded-types/non-zero-int32.d.mts.map +1 -1
  358. package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
  359. package/dist/number/branded-types/non-zero-safe-int.d.mts +17 -15
  360. package/dist/number/branded-types/non-zero-safe-int.d.mts.map +1 -1
  361. package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
  362. package/dist/number/branded-types/non-zero-uint16.d.mts +18 -16
  363. package/dist/number/branded-types/non-zero-uint16.d.mts.map +1 -1
  364. package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
  365. package/dist/number/branded-types/non-zero-uint32.d.mts +18 -16
  366. package/dist/number/branded-types/non-zero-uint32.d.mts.map +1 -1
  367. package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
  368. package/dist/number/branded-types/positive-finite-number.d.mts +16 -14
  369. package/dist/number/branded-types/positive-finite-number.d.mts.map +1 -1
  370. package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
  371. package/dist/number/branded-types/positive-int.d.mts +18 -16
  372. package/dist/number/branded-types/positive-int.d.mts.map +1 -1
  373. package/dist/number/branded-types/positive-int.mjs.map +1 -1
  374. package/dist/number/branded-types/positive-int16.d.mts +18 -16
  375. package/dist/number/branded-types/positive-int16.d.mts.map +1 -1
  376. package/dist/number/branded-types/positive-int16.mjs.map +1 -1
  377. package/dist/number/branded-types/positive-int32.d.mts +18 -16
  378. package/dist/number/branded-types/positive-int32.d.mts.map +1 -1
  379. package/dist/number/branded-types/positive-int32.mjs.map +1 -1
  380. package/dist/number/branded-types/positive-safe-int.d.mts +18 -16
  381. package/dist/number/branded-types/positive-safe-int.d.mts.map +1 -1
  382. package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
  383. package/dist/number/branded-types/positive-uint16.d.mts +18 -16
  384. package/dist/number/branded-types/positive-uint16.d.mts.map +1 -1
  385. package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
  386. package/dist/number/branded-types/positive-uint32.d.mts +18 -16
  387. package/dist/number/branded-types/positive-uint32.d.mts.map +1 -1
  388. package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
  389. package/dist/number/branded-types/safe-int.d.mts +17 -15
  390. package/dist/number/branded-types/safe-int.d.mts.map +1 -1
  391. package/dist/number/branded-types/safe-int.mjs.map +1 -1
  392. package/dist/number/branded-types/safe-uint.d.mts +19 -17
  393. package/dist/number/branded-types/safe-uint.d.mts.map +1 -1
  394. package/dist/number/branded-types/safe-uint.mjs.map +1 -1
  395. package/dist/number/branded-types/uint.d.mts +18 -16
  396. package/dist/number/branded-types/uint.d.mts.map +1 -1
  397. package/dist/number/branded-types/uint.mjs.map +1 -1
  398. package/dist/number/branded-types/uint16.d.mts +18 -16
  399. package/dist/number/branded-types/uint16.d.mts.map +1 -1
  400. package/dist/number/branded-types/uint16.mjs.map +1 -1
  401. package/dist/number/branded-types/uint32.d.mts +18 -16
  402. package/dist/number/branded-types/uint32.d.mts.map +1 -1
  403. package/dist/number/branded-types/uint32.mjs.map +1 -1
  404. package/dist/number/enum/int8.d.mts +2 -0
  405. package/dist/number/enum/int8.d.mts.map +1 -1
  406. package/dist/number/enum/int8.mjs.map +1 -1
  407. package/dist/number/enum/uint8.d.mts +2 -0
  408. package/dist/number/enum/uint8.d.mts.map +1 -1
  409. package/dist/number/enum/uint8.mjs.map +1 -1
  410. package/dist/number/num.d.mts +2 -0
  411. package/dist/number/num.d.mts.map +1 -1
  412. package/dist/number/num.mjs.map +1 -1
  413. package/dist/number/refined-number-utils.d.mts +1 -0
  414. package/dist/number/refined-number-utils.d.mts.map +1 -1
  415. package/dist/number/refined-number-utils.mjs.map +1 -1
  416. package/dist/object/object.d.mts +1 -0
  417. package/dist/object/object.d.mts.map +1 -1
  418. package/dist/object/object.mjs.map +1 -1
  419. package/dist/others/cast-mutable.d.mts +1 -0
  420. package/dist/others/cast-mutable.d.mts.map +1 -1
  421. package/dist/others/cast-mutable.mjs +3 -1
  422. package/dist/others/cast-mutable.mjs.map +1 -1
  423. package/dist/others/cast-readonly.d.mts +1 -0
  424. package/dist/others/cast-readonly.d.mts.map +1 -1
  425. package/dist/others/cast-readonly.mjs +3 -1
  426. package/dist/others/cast-readonly.mjs.map +1 -1
  427. package/dist/others/memoize-function.d.mts +1 -0
  428. package/dist/others/memoize-function.d.mts.map +1 -1
  429. package/dist/others/memoize-function.mjs.map +1 -1
  430. package/dist/promise/promise.d.mts +1 -0
  431. package/dist/promise/promise.d.mts.map +1 -1
  432. package/dist/types.d.mts +1 -2
  433. package/dist/types.d.mts.map +1 -0
  434. package/dist/types.mjs +2 -0
  435. package/dist/types.mjs.map +1 -0
  436. package/package.json +21 -21
  437. package/src/array/impl/array-utils-creation.mts +19 -0
  438. package/src/array/impl/array-utils-creation.test.mts +2 -0
  439. package/src/array/impl/array-utils-element-access.mts +7 -0
  440. package/src/array/impl/array-utils-element-access.test.mts +2 -0
  441. package/src/array/impl/array-utils-iterators.mts +1 -0
  442. package/src/array/impl/array-utils-iterators.test.mts +1 -0
  443. package/src/array/impl/array-utils-modification.mts +11 -0
  444. package/src/array/impl/array-utils-modification.test.mts +1 -0
  445. package/src/array/impl/array-utils-overload-type-error.test.mts +1 -0
  446. package/src/array/impl/array-utils-reducing-value.mts +7 -0
  447. package/src/array/impl/array-utils-reducing-value.test.mts +2 -0
  448. package/src/array/impl/array-utils-search.mts +5 -0
  449. package/src/array/impl/array-utils-search.test.mts +1 -0
  450. package/src/array/impl/array-utils-set-op.mts +2 -0
  451. package/src/array/impl/array-utils-size.mts +7 -0
  452. package/src/array/impl/array-utils-slice-clamped.mts +1 -0
  453. package/src/array/impl/array-utils-slicing.mts +2 -0
  454. package/src/array/impl/array-utils-transformation.mts +17 -0
  455. package/src/array/impl/array-utils-transformation.test.mts +1 -0
  456. package/src/array/impl/array-utils-validation.mts +8 -0
  457. package/src/array/impl/array-utils-validation.test.mts +1 -0
  458. package/src/collections/imap-mapped.mts +1 -0
  459. package/src/collections/imap-mapped.test.mts +1 -0
  460. package/src/collections/imap.mts +2 -0
  461. package/src/collections/iset-mapped.mts +2 -0
  462. package/src/collections/iset.mts +2 -1
  463. package/src/collections/iset.test.mts +4 -2
  464. package/src/collections/queue.mts +1 -0
  465. package/src/collections/stack.mts +1 -0
  466. package/src/collections/stack.test.mts +1 -0
  467. package/src/expect-type.mts +2 -0
  468. package/src/functional/match.mts +7 -0
  469. package/src/functional/match.test.mts +1 -0
  470. package/src/functional/optional/impl/optional-expect-to-be.mts +1 -0
  471. package/src/functional/optional/impl/optional-filter.mts +1 -0
  472. package/src/functional/optional/impl/optional-flat-map.mts +1 -0
  473. package/src/functional/optional/impl/optional-from-nullable.mts +1 -0
  474. package/src/functional/optional/impl/optional-is-none.mts +1 -0
  475. package/src/functional/optional/impl/optional-is-optional.mts +1 -0
  476. package/src/functional/optional/impl/optional-is-some.mts +1 -0
  477. package/src/functional/optional/impl/optional-map.mts +1 -0
  478. package/src/functional/optional/impl/optional-none.mts +1 -0
  479. package/src/functional/optional/impl/optional-or-else.mts +1 -0
  480. package/src/functional/optional/impl/optional-some.mts +1 -0
  481. package/src/functional/optional/impl/optional-to-nullable.mts +1 -0
  482. package/src/functional/optional/impl/optional-unwrap-or.mts +1 -0
  483. package/src/functional/optional/impl/optional-unwrap-throw.mts +1 -0
  484. package/src/functional/optional/impl/optional-unwrap.mts +2 -0
  485. package/src/functional/optional/impl/optional-zip.mts +2 -0
  486. package/src/functional/optional/impl/tag.mts +2 -0
  487. package/src/functional/optional/impl/types.mts +3 -0
  488. package/src/functional/optional/index.mts +1 -1
  489. package/src/functional/optional/optional.mts +19 -0
  490. package/src/functional/optional.test.mts +1 -0
  491. package/src/functional/pipe.mts +2 -1
  492. package/src/functional/pipe.test.mts +1 -0
  493. package/src/functional/result/impl/result-err.mts +1 -0
  494. package/src/functional/result/impl/result-expect-to-be.mts +1 -0
  495. package/src/functional/result/impl/result-flat-map.mts +2 -0
  496. package/src/functional/result/impl/result-fold.mts +1 -0
  497. package/src/functional/result/impl/result-from-promise.mts +2 -0
  498. package/src/functional/result/impl/result-from-throwable.mts +1 -0
  499. package/src/functional/result/impl/result-is-err.mts +1 -0
  500. package/src/functional/result/impl/result-is-ok.mts +1 -0
  501. package/src/functional/result/impl/result-is-result.mts +1 -0
  502. package/src/functional/result/impl/result-map-err.mts +2 -0
  503. package/src/functional/result/impl/result-map.mts +2 -0
  504. package/src/functional/result/impl/result-ok.mts +1 -0
  505. package/src/functional/result/impl/result-or-else.mts +1 -0
  506. package/src/functional/result/impl/result-swap.mts +1 -0
  507. package/src/functional/result/impl/result-to-optional.mts +1 -0
  508. package/src/functional/result/impl/result-unwrap-err-or.mts +1 -0
  509. package/src/functional/result/impl/result-unwrap-err-throw.mts +1 -0
  510. package/src/functional/result/impl/result-unwrap-err.mts +1 -0
  511. package/src/functional/result/impl/result-unwrap-ok-or.mts +1 -0
  512. package/src/functional/result/impl/result-unwrap-ok.mts +2 -0
  513. package/src/functional/result/impl/result-unwrap-throw.mts +1 -0
  514. package/src/functional/result/impl/result-zip.mts +1 -0
  515. package/src/functional/result/impl/tag.mts +2 -0
  516. package/src/functional/result/impl/types.mts +3 -0
  517. package/src/functional/result/index.mts +1 -1
  518. package/src/functional/result/result.mts +19 -0
  519. package/src/functional/result.test.mts +1 -0
  520. package/src/functional/ternary-result/impl/tag.mts +6 -0
  521. package/src/functional/ternary-result/impl/ternary-result-err.mts +1 -0
  522. package/src/functional/ternary-result/impl/ternary-result-expect-to-be.mts +4 -0
  523. package/src/functional/ternary-result/impl/ternary-result-flat-map.mts +5 -0
  524. package/src/functional/ternary-result/impl/ternary-result-fold.mts +4 -0
  525. package/src/functional/ternary-result/impl/ternary-result-from-promise.mts +1 -0
  526. package/src/functional/ternary-result/impl/ternary-result-from-throwable.mts +1 -0
  527. package/src/functional/ternary-result/impl/ternary-result-is-err.mts +1 -0
  528. package/src/functional/ternary-result/impl/ternary-result-is-ok.mts +1 -0
  529. package/src/functional/ternary-result/impl/ternary-result-is-ternary-result.mts +1 -0
  530. package/src/functional/ternary-result/impl/ternary-result-is-warn.mts +1 -0
  531. package/src/functional/ternary-result/impl/ternary-result-map-err.mts +4 -0
  532. package/src/functional/ternary-result/impl/ternary-result-map-warn.mts +4 -0
  533. package/src/functional/ternary-result/impl/ternary-result-map.mts +5 -0
  534. package/src/functional/ternary-result/impl/ternary-result-ok.mts +1 -0
  535. package/src/functional/ternary-result/impl/ternary-result-or-else.mts +4 -0
  536. package/src/functional/ternary-result/impl/ternary-result-to-optional.mts +1 -0
  537. package/src/functional/ternary-result/impl/ternary-result-unwrap-err-or.mts +4 -0
  538. package/src/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mts +1 -0
  539. package/src/functional/ternary-result/impl/ternary-result-unwrap-err.mts +1 -0
  540. package/src/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mts +4 -0
  541. package/src/functional/ternary-result/impl/ternary-result-unwrap-ok.mts +4 -0
  542. package/src/functional/ternary-result/impl/ternary-result-unwrap-throw.mts +1 -0
  543. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mts +4 -0
  544. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mts +1 -0
  545. package/src/functional/ternary-result/impl/ternary-result-unwrap-warn.mts +1 -0
  546. package/src/functional/ternary-result/impl/ternary-result-warn.mts +1 -0
  547. package/src/functional/ternary-result/impl/ternary-result-zip.mts +1 -0
  548. package/src/functional/ternary-result/impl/types.mts +7 -0
  549. package/src/functional/ternary-result/impl/variant-name.mts +1 -0
  550. package/src/functional/ternary-result/index.mts +1 -1
  551. package/src/functional/ternary-result/ternary-result.mts +54 -0
  552. package/src/guard/has-key.mts +2 -0
  553. package/src/guard/has-key.test.mts +4 -0
  554. package/src/guard/is-non-empty-string.mts +2 -0
  555. package/src/guard/is-non-null-object.test.mts +1 -0
  556. package/src/guard/is-primitive.mts +1 -0
  557. package/src/guard/is-record.mts +1 -0
  558. package/src/guard/is-record.test.mts +1 -0
  559. package/src/guard/is-type.mts +2 -0
  560. package/src/guard/key-is-in.mts +2 -0
  561. package/src/guard/key-is-in.test.mts +2 -0
  562. package/src/iterator/range.mts +6 -0
  563. package/src/json/json.mts +5 -0
  564. package/src/number/branded-types/finite-number.mts +7 -0
  565. package/src/number/branded-types/int.mts +3 -0
  566. package/src/number/branded-types/int16.mts +3 -0
  567. package/src/number/branded-types/int32.mts +3 -0
  568. package/src/number/branded-types/non-negative-finite-number.mts +6 -0
  569. package/src/number/branded-types/non-negative-int16.mts +3 -0
  570. package/src/number/branded-types/non-negative-int32.mts +3 -0
  571. package/src/number/branded-types/non-zero-finite-number.mts +8 -0
  572. package/src/number/branded-types/non-zero-int.mts +3 -0
  573. package/src/number/branded-types/non-zero-int16.mts +3 -0
  574. package/src/number/branded-types/non-zero-int32.mts +3 -0
  575. package/src/number/branded-types/non-zero-safe-int.mts +7 -0
  576. package/src/number/branded-types/non-zero-uint16.mts +3 -0
  577. package/src/number/branded-types/non-zero-uint32.mts +3 -0
  578. package/src/number/branded-types/positive-finite-number.mts +7 -0
  579. package/src/number/branded-types/positive-int.mts +3 -0
  580. package/src/number/branded-types/positive-int16.mts +3 -0
  581. package/src/number/branded-types/positive-int32.mts +3 -0
  582. package/src/number/branded-types/positive-safe-int.mts +6 -0
  583. package/src/number/branded-types/positive-uint16.mts +3 -0
  584. package/src/number/branded-types/positive-uint32.mts +3 -0
  585. package/src/number/branded-types/safe-int.mts +6 -0
  586. package/src/number/branded-types/safe-uint.mts +3 -0
  587. package/src/number/branded-types/uint.mts +3 -0
  588. package/src/number/branded-types/uint16.mts +3 -0
  589. package/src/number/branded-types/uint32.mts +3 -0
  590. package/src/number/enum/int8.mts +7 -0
  591. package/src/number/enum/uint8.mts +3 -0
  592. package/src/number/num.mts +18 -0
  593. package/src/number/num.test.mts +1 -0
  594. package/src/number/refined-number-utils.mts +15 -0
  595. package/src/object/object.mts +13 -0
  596. package/src/object/object.test.mts +5 -0
  597. package/src/others/cast-mutable.mts +3 -0
  598. package/src/others/cast-readonly.mts +3 -0
  599. package/src/others/debounce-function.test.mts +0 -2
  600. package/src/others/fast-deep-equal.test.mts +1 -1
  601. package/src/others/map-nullable.test.mts +1 -0
  602. package/src/others/memoize-function.mts +2 -0
  603. package/src/types.mts +131 -0
  604. package/dist/globals.d.mts +0 -194
  605. package/src/globals.d.mts +0 -194
@@ -1,3 +1,4 @@
1
+ import { type Result, type UnknownResult } from '../result.mjs';
1
2
  import { unwrapErr } from './result-unwrap-err.mjs';
2
3
  import { type UnwrapErr } from './types.mjs';
3
4
 
@@ -1,5 +1,6 @@
1
1
  import { unknownToString } from '../../../others/index.mjs';
2
2
  import { match } from '../../match.mjs';
3
+ import { type UnknownResult } from '../result.mjs';
3
4
  import { isErr } from './result-is-err.mjs';
4
5
  import { type UnwrapErr, type UnwrapOk } from './types.mjs';
5
6
 
@@ -1,3 +1,4 @@
1
+ import { type UnknownResult } from '../result.mjs';
1
2
  import { isErr } from './result-is-err.mjs';
2
3
  import { type UnwrapErr } from './types.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ import { type Result, type UnknownResult } from '../result.mjs';
1
2
  import { unwrapOk } from './result-unwrap-ok.mjs';
2
3
  import { type UnwrapOk } from './types.mjs';
3
4
 
@@ -1,3 +1,5 @@
1
+ import { type Ok } from '../../../types.mjs';
2
+ import { type UnknownResult } from '../result.mjs';
1
3
  import { isOk } from './result-is-ok.mjs';
2
4
  import { type UnwrapOk } from './types.mjs';
3
5
 
@@ -1,4 +1,5 @@
1
1
  import { unknownToString } from '../../../others/index.mjs';
2
+ import { type UnknownResult } from '../result.mjs';
2
3
  import { isErr } from './result-is-err.mjs';
3
4
  import { type UnwrapErr, type UnwrapOk } from './types.mjs';
4
5
 
@@ -1,3 +1,4 @@
1
+ import { type Result } from '../result.mjs';
1
2
  import { isOk } from './result-is-ok.mjs';
2
3
  import { ok } from './result-ok.mjs';
3
4
 
@@ -1,4 +1,6 @@
1
1
  /** @internal Tag identifying the Ok variant. */
2
+ import { type Err, type Ok } from '../../../types.mjs';
3
+
2
4
  export const OkTypeTagName: Ok<unknown>['$$tag'] = 'ts-data-forge::Result.ok';
3
5
 
4
6
  /** @internal Tag identifying the Err variant. */
@@ -1,3 +1,6 @@
1
+ import { type Err, type Ok } from '../../../types.mjs';
2
+ import { type UnknownResult } from '../result.mjs';
3
+
1
4
  /**
2
5
  * Extracts the success value type `S` from a `Result.Ok<S>`. If the `Result`
3
6
  * is `Result.Err<E>`, resolves to `never`.
@@ -1 +1 @@
1
- export * as Result from './impl/index.mjs';
1
+ export * from './result.mjs';
@@ -0,0 +1,19 @@
1
+ import { type Err, type Ok } from '../../types.mjs';
2
+
3
+ /**
4
+ * Represents a value that can either be a success (`Ok`) or an error (`Err`).
5
+ *
6
+ * @template S The type of the success value.
7
+ * @template E The type of the error value.
8
+ */
9
+ export type Result<S, E> = Ok<S> | Err<E>;
10
+
11
+ /**
12
+ * Base type for any `Result`, used for generic constraints. Represents a
13
+ * `Result` with unknown success and error types.
14
+ */
15
+ export type UnknownResult = Ok<unknown> | Err<unknown>;
16
+
17
+ export type { Err, Ok } from '../../types.mjs';
18
+
19
+ export * as Result from './impl/index.mjs';
@@ -1,4 +1,5 @@
1
1
  import { expectType } from '../expect-type.mjs';
2
+ import { type Err, type Ok } from '../types.mjs';
2
3
  import { Optional } from './optional/index.mjs';
3
4
  import { pipe } from './pipe.mjs';
4
5
  import { Result } from './result/index.mjs';
@@ -1,4 +1,10 @@
1
1
  /** @internal Tag identifying the Ok variant. */
2
+ import {
3
+ type TernaryErr,
4
+ type TernaryOk,
5
+ type TernaryWarn,
6
+ } from '../ternary-result.mjs';
7
+
2
8
  export const OkTypeTagName: TernaryOk<unknown>['$$tag'] =
3
9
  'ts-data-forge::Result.ok';
4
10
 
@@ -1,3 +1,4 @@
1
+ import { type TernaryErr } from '../ternary-result.mjs';
1
2
  import { ErrTypeTagName } from './tag.mjs';
2
3
 
3
4
  /**
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryResult,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { isOk } from './ternary-result-is-ok.mjs';
2
6
  import { unwrapOk } from './ternary-result-unwrap-ok.mjs';
3
7
  import { type UnwrapOk } from './types.mjs';
@@ -1,3 +1,8 @@
1
+ import {
2
+ type TernaryErr,
3
+ type TernaryResult,
4
+ type UnknownTernaryResult,
5
+ } from '../ternary-result.mjs';
1
6
  import { isOk } from './ternary-result-is-ok.mjs';
2
7
  import { isWarn } from './ternary-result-is-warn.mjs';
3
8
  import { warn } from './ternary-result-warn.mjs';
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryResult,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { err } from './ternary-result-err.mjs';
2
6
  import { isOk } from './ternary-result-is-ok.mjs';
3
7
  import { isWarn } from './ternary-result-is-warn.mjs';
@@ -1,3 +1,4 @@
1
+ import { type TernaryOk, type TernaryResult } from '../ternary-result.mjs';
1
2
  import { err } from './ternary-result-err.mjs';
2
3
  import { ok } from './ternary-result-ok.mjs';
3
4
 
@@ -1,5 +1,6 @@
1
1
  import { isError } from '@sindresorhus/is';
2
2
  import { unknownToString } from '../../../others/index.mjs';
3
+ import { type TernaryResult } from '../ternary-result.mjs';
3
4
  import { err } from './ternary-result-err.mjs';
4
5
  import { ok } from './ternary-result-ok.mjs';
5
6
 
@@ -1,3 +1,4 @@
1
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
1
2
  import { ErrTypeTagName } from './tag.mjs';
2
3
  import { type NarrowToErr } from './types.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
1
2
  import { OkTypeTagName } from './tag.mjs';
2
3
  import { type NarrowToOk } from './types.mjs';
3
4
 
@@ -1,4 +1,5 @@
1
1
  import { hasKey, isRecord } from '../../../guard/index.mjs';
2
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
2
3
  import { ErrTypeTagName, OkTypeTagName, WarnTypeTagName } from './tag.mjs';
3
4
 
4
5
  /**
@@ -1,3 +1,4 @@
1
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
1
2
  import { WarnTypeTagName } from './tag.mjs';
2
3
  import { type NarrowToWarn } from './types.mjs';
3
4
 
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryResult,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { err } from './ternary-result-err.mjs';
2
6
  import { isErr } from './ternary-result-is-err.mjs';
3
7
  import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryResult,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { isWarn } from './ternary-result-is-warn.mjs';
2
6
  import { warn } from './ternary-result-warn.mjs';
3
7
  import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
@@ -1,3 +1,8 @@
1
+ import {
2
+ type TernaryErr,
3
+ type TernaryResult,
4
+ type UnknownTernaryResult,
5
+ } from '../ternary-result.mjs';
1
6
  import { isOk } from './ternary-result-is-ok.mjs';
2
7
  import { isWarn } from './ternary-result-is-warn.mjs';
3
8
  import { ok } from './ternary-result-ok.mjs';
@@ -1,3 +1,4 @@
1
+ import { type TernaryOk } from '../ternary-result.mjs';
1
2
  import { OkTypeTagName } from './tag.mjs';
2
3
 
3
4
  /**
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryResult,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { isOk } from './ternary-result-is-ok.mjs';
2
6
  import { isWarn } from './ternary-result-is-warn.mjs';
3
7
  import { type NarrowToOk, type NarrowToWarn } from './types.mjs';
@@ -1,4 +1,5 @@
1
1
  import { Optional } from '../../optional/index.mjs';
2
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
2
3
  import { isOk } from './ternary-result-is-ok.mjs';
3
4
  import { isWarn } from './ternary-result-is-warn.mjs';
4
5
  import { type UnwrapOk } from './types.mjs';
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryResult,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { unwrapErr } from './ternary-result-unwrap-err.mjs';
2
6
  import { type UnwrapErr } from './types.mjs';
3
7
 
@@ -1,4 +1,5 @@
1
1
  import { unknownToString } from '../../../others/index.mjs';
2
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
2
3
  import { isErr } from './ternary-result-is-err.mjs';
3
4
  import { isWarn } from './ternary-result-is-warn.mjs';
4
5
  import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
@@ -1,3 +1,4 @@
1
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
1
2
  import { isErr } from './ternary-result-is-err.mjs';
2
3
  import { type UnwrapErr } from './types.mjs';
3
4
 
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryResult,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { unwrapOk } from './ternary-result-unwrap-ok.mjs';
2
6
  import { type UnwrapOk } from './types.mjs';
3
7
 
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryOk,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { isOk } from './ternary-result-is-ok.mjs';
2
6
  import { isWarn } from './ternary-result-is-warn.mjs';
3
7
  import { type UnwrapOk } from './types.mjs';
@@ -1,4 +1,5 @@
1
1
  import { unknownToString } from '../../../others/index.mjs';
2
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
2
3
  import { isErr } from './ternary-result-is-err.mjs';
3
4
  import { isWarn } from './ternary-result-is-warn.mjs';
4
5
  import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
@@ -1,3 +1,7 @@
1
+ import {
2
+ type TernaryResult,
3
+ type UnknownTernaryResult,
4
+ } from '../ternary-result.mjs';
1
5
  import { unwrapWarn } from './ternary-result-unwrap-warn.mjs';
2
6
  import { type UnwrapWarn } from './types.mjs';
3
7
 
@@ -1,4 +1,5 @@
1
1
  import { unknownToString } from '../../../others/index.mjs';
2
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
2
3
  import { isWarn } from './ternary-result-is-warn.mjs';
3
4
  import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
4
5
  import { variantName } from './variant-name.mjs';
@@ -1,3 +1,4 @@
1
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
1
2
  import { isWarn } from './ternary-result-is-warn.mjs';
2
3
  import { type UnwrapWarn } from './types.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ import { type TernaryWarn } from '../ternary-result.mjs';
1
2
  import { WarnTypeTagName } from './tag.mjs';
2
3
 
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { type TernaryResult } from '../ternary-result.mjs';
1
2
  import { isErr } from './ternary-result-is-err.mjs';
2
3
  import { isWarn } from './ternary-result-is-warn.mjs';
3
4
  import { ok } from './ternary-result-ok.mjs';
@@ -1,3 +1,10 @@
1
+ import {
2
+ type TernaryErr,
3
+ type TernaryOk,
4
+ type TernaryWarn,
5
+ type UnknownTernaryResult,
6
+ } from '../ternary-result.mjs';
7
+
1
8
  /**
2
9
  * Extracts the success value type `S` from a `TernaryResult.Ok<S>`.
3
10
  */
@@ -1,3 +1,4 @@
1
+ import { type UnknownTernaryResult } from '../ternary-result.mjs';
1
2
  import { ErrTypeTagName, OkTypeTagName, WarnTypeTagName } from './tag.mjs';
2
3
 
3
4
  /** @internal Returns the human readable variant label for the given tag. */
@@ -1 +1 @@
1
- export * as TernaryResult from './impl/index.mjs';
1
+ export * from './ternary-result.mjs';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Represents a `TernaryResult` that is a success, containing a value.
3
+ */
4
+ export type TernaryOk<S> = Readonly<{
5
+ /** @internal Discriminant property for the 'Ok' type. */
6
+ $$tag: 'ts-data-forge::Result.ok';
7
+
8
+ /** The success value. */
9
+ value: S;
10
+ }>;
11
+
12
+ /**
13
+ * Represents a `TernaryResult` that contains a success value and an attached
14
+ * warning.
15
+ */
16
+ export type TernaryWarn<S, W> = Readonly<{
17
+ /** @internal Discriminant property for the 'Warn' type. */
18
+ $$tag: 'ts-data-forge::Result.warn';
19
+
20
+ /** The success value. */
21
+ value: S;
22
+
23
+ /** The warning value. */
24
+ warning: W;
25
+ }>;
26
+
27
+ /**
28
+ * Represents a `TernaryResult` that is an error, containing an error value.
29
+ */
30
+ export type TernaryErr<E> = Readonly<{
31
+ /** @internal Discriminant property for the 'Err' type. */
32
+ $$tag: 'ts-data-forge::Result.err';
33
+
34
+ /** The error value. */
35
+ value: E;
36
+ }>;
37
+
38
+ /**
39
+ * Represents a value that can be `Ok`, `Warn`, or `Err`.
40
+ */
41
+ export type TernaryResult<S, E, W = E> =
42
+ | TernaryOk<S>
43
+ | TernaryWarn<S, W>
44
+ | TernaryErr<E>;
45
+
46
+ /**
47
+ * Base type for any `TernaryResult`, used for generic constraints.
48
+ */
49
+ export type UnknownTernaryResult =
50
+ | TernaryOk<unknown>
51
+ | TernaryWarn<unknown, unknown>
52
+ | TernaryErr<unknown>;
53
+
54
+ export * as TernaryResult from './impl/index.mjs';
@@ -1,3 +1,5 @@
1
+ import { type ReadonlyRecord, type UnknownRecord } from 'ts-type-forge';
2
+
1
3
  /**
2
4
  * Type guard function that checks if an object has a specific key as its own
3
5
  * property.
@@ -1,3 +1,4 @@
1
+ import { type ReadonlyRecord } from 'ts-type-forge';
1
2
  import { expectType } from '../expect-type.mjs';
2
3
  import { hasKey, type HasKeyReturnType } from './has-key.mjs';
3
4
 
@@ -52,6 +53,7 @@ test('hasKey type inferences', () => {
52
53
  {
53
54
  type R = Readonly<{ a: 0 } | { b: 1 }>;
54
55
 
56
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
55
57
  const obj: R = { a: 0 } as R;
56
58
 
57
59
  if (hasKey(obj, 'a')) {
@@ -68,6 +70,7 @@ test('hasKey type inferences', () => {
68
70
  {
69
71
  type R = Readonly<{ a: 0 } | { a: 1; b: 1 } | { b: 2 } | { c: 3 }>;
70
72
 
73
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
71
74
  const obj: R = { a: 0 } as R;
72
75
 
73
76
  if (hasKey(obj, 'a') && hasKey(obj, 'b')) {
@@ -84,6 +87,7 @@ test('hasKey type inferences', () => {
84
87
  | ReadonlyRecord<string, number>
85
88
  | Readonly<{ a: 0 } | { a: 1; b: 1 } | { b: 2 }>;
86
89
 
90
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
87
91
  const obj: R = { a: 0 } as R;
88
92
 
89
93
  expectType<
@@ -1,3 +1,5 @@
1
+ import { type RelaxedExclude } from 'ts-type-forge';
2
+
1
3
  /**
2
4
  * Type guard that checks if a value is a non-empty string.
3
5
  *
@@ -1,3 +1,4 @@
1
+ import { type UnknownRecord } from 'ts-type-forge';
1
2
  import { expectType } from '../expect-type.mjs';
2
3
  import { isNonNullObject } from './is-non-null-object.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ import { type Primitive } from 'ts-type-forge';
1
2
  import { expectType } from '../expect-type.mjs';
2
3
 
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { type MutableRecord, type UnknownRecord } from 'ts-type-forge';
1
2
  import { isNonNullObject } from './is-non-null-object.mjs';
2
3
 
3
4
  /**
@@ -1,3 +1,4 @@
1
+ import { type UnknownRecord } from 'ts-type-forge';
1
2
  import { expectType } from '../expect-type.mjs';
2
3
  import { isRecord } from './is-record.mjs';
3
4
 
@@ -1,3 +1,5 @@
1
+ import { type RelaxedExclude } from 'ts-type-forge';
2
+
1
3
  /**
2
4
  * Type guard that checks if a value is `undefined`.
3
5
  *
@@ -1,3 +1,5 @@
1
+ import { type UnknownRecord } from 'ts-type-forge';
2
+
1
3
  /**
2
4
  * Type guard that checks if a key exists as an own property in an object.
3
5
  *
@@ -1,3 +1,4 @@
1
+ import { type ReadonlyRecord } from 'ts-type-forge';
1
2
  import { keyIsIn } from './key-is-in.mjs';
2
3
 
3
4
  const f = <Key extends string, V, KeySub extends Key>(
@@ -6,6 +7,7 @@ const f = <Key extends string, V, KeySub extends Key>(
6
7
  ): V | undefined => (keyIsIn(key, obj) ? obj[key] : undefined);
7
8
 
8
9
  describe(keyIsIn, () => {
10
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
9
11
  f('a' as 'a' | 'b' | 'c', { a: 0, b: 1 });
10
12
 
11
13
  test('', () => {
@@ -1,3 +1,9 @@
1
+ import {
2
+ type NonZeroSafeInt,
3
+ type PositiveSafeInt,
4
+ type SafeUint,
5
+ type WithSmallInt,
6
+ } from 'ts-type-forge';
1
7
  import { SafeInt, asSafeInt } from '../number/index.mjs';
2
8
 
3
9
  /**
package/src/json/json.mts CHANGED
@@ -1,3 +1,8 @@
1
+ import {
2
+ type JsonValue,
3
+ type UintRangeInclusive,
4
+ type UnknownRecord,
5
+ } from 'ts-type-forge';
1
6
  import { Arr } from '../array/index.mjs';
2
7
  import { pipe, Result } from '../functional/index.mjs';
3
8
  import { isRecord } from '../guard/index.mjs';
@@ -1,6 +1,13 @@
1
+ import {
2
+ type Int,
3
+ type NonNegativeFiniteNumber,
4
+ type FiniteNumber as TtfImported_FiniteNumber,
5
+ } from 'ts-type-forge';
1
6
  import { expectType } from '../../expect-type.mjs';
2
7
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
8
 
9
+ export type FiniteNumber = TtfImported_FiniteNumber;
10
+
4
11
  type ElementType = FiniteNumber;
5
12
 
6
13
  const typeNameInMessage = 'a finite number';
@@ -1,6 +1,9 @@
1
+ import { type Int as TtfImported_Int } from 'ts-type-forge';
1
2
  import { expectType } from '../../expect-type.mjs';
2
3
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
4
 
5
+ export type Int = TtfImported_Int;
6
+
4
7
  type ElementType = Int;
5
8
 
6
9
  const typeNameInMessage = 'an integer';
@@ -1,6 +1,9 @@
1
+ import { type Int16 as TtfImported_Int16 } from 'ts-type-forge';
1
2
  import { expectType } from '../../expect-type.mjs';
2
3
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
4
 
5
+ export type Int16 = TtfImported_Int16;
6
+
4
7
  type ElementType = Int16;
5
8
 
6
9
  const typeNameInMessage = 'an integer in [-2^15, 2^15)';
@@ -1,6 +1,9 @@
1
+ import { type Int32 as TtfImported_Int32 } from 'ts-type-forge';
1
2
  import { expectType } from '../../expect-type.mjs';
2
3
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
4
 
5
+ export type Int32 = TtfImported_Int32;
6
+
4
7
  type ElementType = Int32;
5
8
 
6
9
  const typeNameInMessage = 'an integer in [-2^31, 2^31)';
@@ -1,6 +1,12 @@
1
+ import {
2
+ type NonNegativeFiniteNumber as TtfImported_NonNegativeFiniteNumber,
3
+ type Uint,
4
+ } from 'ts-type-forge';
1
5
  import { expectType } from '../../expect-type.mjs';
2
6
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
7
 
8
+ export type NonNegativeFiniteNumber = TtfImported_NonNegativeFiniteNumber;
9
+
4
10
  type ElementType = NonNegativeFiniteNumber;
5
11
 
6
12
  const typeNameInMessage = 'a non-negative finite number';
@@ -1,6 +1,9 @@
1
+ import { type NonNegativeInt16 as TtfImported_NonNegativeInt16 } from 'ts-type-forge';
1
2
  import { expectType } from '../../expect-type.mjs';
2
3
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
4
 
5
+ export type NonNegativeInt16 = TtfImported_NonNegativeInt16;
6
+
4
7
  type ElementType = NonNegativeInt16;
5
8
 
6
9
  const typeNameInMessage = 'a non-negative integer in [0, 2^15)';
@@ -1,6 +1,9 @@
1
+ import { type NonNegativeInt32 as TtfImported_NonNegativeInt32 } from 'ts-type-forge';
1
2
  import { expectType } from '../../expect-type.mjs';
2
3
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
4
 
5
+ export type NonNegativeInt32 = TtfImported_NonNegativeInt32;
6
+
4
7
  type ElementType = NonNegativeInt32;
5
8
 
6
9
  const typeNameInMessage = 'a non-negative integer in [0, 2^31)';
@@ -1,6 +1,14 @@
1
+ import {
2
+ type Int,
3
+ type NonZeroInt,
4
+ type PositiveFiniteNumber,
5
+ type NonZeroFiniteNumber as TtfImported_NonZeroFiniteNumber,
6
+ } from 'ts-type-forge';
1
7
  import { expectType } from '../../expect-type.mjs';
2
8
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
9
 
10
+ export type NonZeroFiniteNumber = TtfImported_NonZeroFiniteNumber;
11
+
4
12
  type ElementType = NonZeroFiniteNumber;
5
13
 
6
14
  const typeNameInMessage = 'a non-zero finite number';
@@ -1,6 +1,9 @@
1
+ import { type NonZeroInt as TtfImported_NonZeroInt } from 'ts-type-forge';
1
2
  import { expectType } from '../../expect-type.mjs';
2
3
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
4
 
5
+ export type NonZeroInt = TtfImported_NonZeroInt;
6
+
4
7
  type ElementType = NonZeroInt;
5
8
 
6
9
  const typeNameInMessage = 'a non-zero integer';
@@ -1,6 +1,9 @@
1
+ import { type NonZeroInt16 as TtfImported_NonZeroInt16 } from 'ts-type-forge';
1
2
  import { expectType } from '../../expect-type.mjs';
2
3
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
3
4
 
5
+ export type NonZeroInt16 = TtfImported_NonZeroInt16;
6
+
4
7
  type ElementType = NonZeroInt16;
5
8
 
6
9
  const typeNameInMessage = 'a non-zero integer in [-2^15, 2^15)';