ts-data-forge 9.0.0 → 10.0.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 (447) hide show
  1. package/README.md +1 -1
  2. package/dist/array/impl/array-utils-creation.d.mts +4 -4
  3. package/dist/array/impl/array-utils-creation.d.mts.map +1 -1
  4. package/dist/array/impl/array-utils-creation.mjs +17 -112
  5. package/dist/array/impl/array-utils-creation.mjs.map +1 -1
  6. package/dist/array/impl/array-utils-element-access.d.mts.map +1 -1
  7. package/dist/array/impl/array-utils-element-access.mjs +22 -61
  8. package/dist/array/impl/array-utils-element-access.mjs.map +1 -1
  9. package/dist/array/impl/array-utils-iterators.d.mts.map +1 -1
  10. package/dist/array/impl/array-utils-iterators.mjs +9 -63
  11. package/dist/array/impl/array-utils-iterators.mjs.map +1 -1
  12. package/dist/array/impl/array-utils-modification.d.mts +7 -7
  13. package/dist/array/impl/array-utils-modification.d.mts.map +1 -1
  14. package/dist/array/impl/array-utils-modification.mjs +78 -78
  15. package/dist/array/impl/array-utils-modification.mjs.map +1 -1
  16. package/dist/array/impl/array-utils-reducing-value.mjs +95 -89
  17. package/dist/array/impl/array-utils-reducing-value.mjs.map +1 -1
  18. package/dist/array/impl/array-utils-search.mjs +100 -92
  19. package/dist/array/impl/array-utils-search.mjs.map +1 -1
  20. package/dist/array/impl/array-utils-set-op.d.mts.map +1 -1
  21. package/dist/array/impl/array-utils-set-op.mjs +31 -141
  22. package/dist/array/impl/array-utils-set-op.mjs.map +1 -1
  23. package/dist/array/impl/array-utils-size.d.mts.map +1 -1
  24. package/dist/array/impl/array-utils-size.mjs +4 -8
  25. package/dist/array/impl/array-utils-size.mjs.map +1 -1
  26. package/dist/array/impl/array-utils-slice-clamped.mjs +11 -12
  27. package/dist/array/impl/array-utils-slice-clamped.mjs.map +1 -1
  28. package/dist/array/impl/array-utils-slicing.d.mts.map +1 -1
  29. package/dist/array/impl/array-utils-slicing.mjs +44 -96
  30. package/dist/array/impl/array-utils-slicing.mjs.map +1 -1
  31. package/dist/array/impl/array-utils-transformation.d.mts +4 -4
  32. package/dist/array/impl/array-utils-transformation.d.mts.map +1 -1
  33. package/dist/array/impl/array-utils-transformation.mjs +150 -292
  34. package/dist/array/impl/array-utils-transformation.mjs.map +1 -1
  35. package/dist/array/impl/array-utils-validation.d.mts +17 -17
  36. package/dist/array/impl/array-utils-validation.d.mts.map +1 -1
  37. package/dist/array/impl/array-utils-validation.mjs +23 -174
  38. package/dist/array/impl/array-utils-validation.mjs.map +1 -1
  39. package/dist/array/impl/index.mjs +1 -1
  40. package/dist/collections/imap-mapped.d.mts.map +1 -1
  41. package/dist/collections/imap-mapped.mjs +243 -330
  42. package/dist/collections/imap-mapped.mjs.map +1 -1
  43. package/dist/collections/imap.d.mts.map +1 -1
  44. package/dist/collections/imap.mjs +190 -275
  45. package/dist/collections/imap.mjs.map +1 -1
  46. package/dist/collections/iset-mapped.d.mts +1 -1
  47. package/dist/collections/iset-mapped.d.mts.map +1 -1
  48. package/dist/collections/iset-mapped.mjs +222 -444
  49. package/dist/collections/iset-mapped.mjs.map +1 -1
  50. package/dist/collections/iset.d.mts +1 -1
  51. package/dist/collections/iset.d.mts.map +1 -1
  52. package/dist/collections/iset.mjs +158 -324
  53. package/dist/collections/iset.mjs.map +1 -1
  54. package/dist/collections/queue.d.mts.map +1 -1
  55. package/dist/collections/queue.mjs +106 -178
  56. package/dist/collections/queue.mjs.map +1 -1
  57. package/dist/collections/stack.d.mts.map +1 -1
  58. package/dist/collections/stack.mjs +95 -165
  59. package/dist/collections/stack.mjs.map +1 -1
  60. package/dist/entry-point.mjs +2 -0
  61. package/dist/entry-point.mjs.map +1 -1
  62. package/dist/expect-type.d.mts +1 -1
  63. package/dist/expect-type.d.mts.map +1 -1
  64. package/dist/expect-type.mjs +1 -69
  65. package/dist/expect-type.mjs.map +1 -1
  66. package/dist/functional/match.mjs +9 -9
  67. package/dist/functional/match.mjs.map +1 -1
  68. package/dist/functional/optional/impl/optional-expect-to-be.mjs +13 -14
  69. package/dist/functional/optional/impl/optional-expect-to-be.mjs.map +1 -1
  70. package/dist/functional/optional/impl/optional-filter.mjs +14 -15
  71. package/dist/functional/optional/impl/optional-filter.mjs.map +1 -1
  72. package/dist/functional/optional/impl/optional-flat-map.mjs +10 -11
  73. package/dist/functional/optional/impl/optional-flat-map.mjs.map +1 -1
  74. package/dist/functional/optional/impl/optional-from-nullable.d.mts.map +1 -1
  75. package/dist/functional/optional/impl/optional-from-nullable.mjs +1 -25
  76. package/dist/functional/optional/impl/optional-from-nullable.mjs.map +1 -1
  77. package/dist/functional/optional/impl/optional-is-none.d.mts.map +1 -1
  78. package/dist/functional/optional/impl/optional-is-none.mjs +0 -19
  79. package/dist/functional/optional/impl/optional-is-none.mjs.map +1 -1
  80. package/dist/functional/optional/impl/optional-is-optional.d.mts.map +1 -1
  81. package/dist/functional/optional/impl/optional-is-optional.mjs +1 -23
  82. package/dist/functional/optional/impl/optional-is-optional.mjs.map +1 -1
  83. package/dist/functional/optional/impl/optional-is-some.d.mts.map +1 -1
  84. package/dist/functional/optional/impl/optional-is-some.mjs +0 -20
  85. package/dist/functional/optional/impl/optional-is-some.mjs.map +1 -1
  86. package/dist/functional/optional/impl/optional-map.mjs +13 -14
  87. package/dist/functional/optional/impl/optional-map.mjs.map +1 -1
  88. package/dist/functional/optional/impl/optional-none.mjs +0 -16
  89. package/dist/functional/optional/impl/optional-none.mjs.map +1 -1
  90. package/dist/functional/optional/impl/optional-or-else.mjs +10 -11
  91. package/dist/functional/optional/impl/optional-or-else.mjs.map +1 -1
  92. package/dist/functional/optional/impl/optional-some.d.mts.map +1 -1
  93. package/dist/functional/optional/impl/optional-some.mjs +2 -21
  94. package/dist/functional/optional/impl/optional-some.mjs.map +1 -1
  95. package/dist/functional/optional/impl/optional-to-nullable.d.mts.map +1 -1
  96. package/dist/functional/optional/impl/optional-to-nullable.mjs +1 -27
  97. package/dist/functional/optional/impl/optional-to-nullable.mjs.map +1 -1
  98. package/dist/functional/optional/impl/optional-unwrap-or.mjs +9 -10
  99. package/dist/functional/optional/impl/optional-unwrap-or.mjs.map +1 -1
  100. package/dist/functional/optional/impl/optional-unwrap-throw.d.mts.map +1 -1
  101. package/dist/functional/optional/impl/optional-unwrap-throw.mjs +4 -32
  102. package/dist/functional/optional/impl/optional-unwrap-throw.mjs.map +1 -1
  103. package/dist/functional/optional/impl/optional-unwrap.mjs +4 -4
  104. package/dist/functional/optional/impl/optional-unwrap.mjs.map +1 -1
  105. package/dist/functional/optional/impl/optional-zip.d.mts.map +1 -1
  106. package/dist/functional/optional/impl/optional-zip.mjs +1 -35
  107. package/dist/functional/optional/impl/optional-zip.mjs.map +1 -1
  108. package/dist/functional/optional/impl/tag.mjs +2 -3
  109. package/dist/functional/optional/impl/tag.mjs.map +1 -1
  110. package/dist/functional/pipe.d.mts.map +1 -1
  111. package/dist/functional/pipe.mjs +9 -34
  112. package/dist/functional/pipe.mjs.map +1 -1
  113. package/dist/functional/result/impl/result-err.d.mts.map +1 -1
  114. package/dist/functional/result/impl/result-err.mjs +2 -27
  115. package/dist/functional/result/impl/result-err.mjs.map +1 -1
  116. package/dist/functional/result/impl/result-expect-to-be.mjs +13 -15
  117. package/dist/functional/result/impl/result-expect-to-be.mjs.map +1 -1
  118. package/dist/functional/result/impl/result-flat-map.mjs +16 -16
  119. package/dist/functional/result/impl/result-flat-map.mjs.map +1 -1
  120. package/dist/functional/result/impl/result-fold.mjs +16 -16
  121. package/dist/functional/result/impl/result-fold.mjs.map +1 -1
  122. package/dist/functional/result/impl/result-from-promise.d.mts.map +1 -1
  123. package/dist/functional/result/impl/result-from-promise.mjs +4 -31
  124. package/dist/functional/result/impl/result-from-promise.mjs.map +1 -1
  125. package/dist/functional/result/impl/result-from-throwable.d.mts.map +1 -1
  126. package/dist/functional/result/impl/result-from-throwable.mjs +8 -38
  127. package/dist/functional/result/impl/result-from-throwable.mjs.map +1 -1
  128. package/dist/functional/result/impl/result-is-err.d.mts.map +1 -1
  129. package/dist/functional/result/impl/result-is-err.mjs +0 -19
  130. package/dist/functional/result/impl/result-is-err.mjs.map +1 -1
  131. package/dist/functional/result/impl/result-is-ok.d.mts.map +1 -1
  132. package/dist/functional/result/impl/result-is-ok.mjs +0 -19
  133. package/dist/functional/result/impl/result-is-ok.mjs.map +1 -1
  134. package/dist/functional/result/impl/result-is-result.d.mts.map +1 -1
  135. package/dist/functional/result/impl/result-is-result.mjs +1 -23
  136. package/dist/functional/result/impl/result-is-result.mjs.map +1 -1
  137. package/dist/functional/result/impl/result-map-err.mjs +16 -16
  138. package/dist/functional/result/impl/result-map-err.mjs.map +1 -1
  139. package/dist/functional/result/impl/result-map.mjs +16 -16
  140. package/dist/functional/result/impl/result-map.mjs.map +1 -1
  141. package/dist/functional/result/impl/result-ok.d.mts.map +1 -1
  142. package/dist/functional/result/impl/result-ok.mjs +2 -27
  143. package/dist/functional/result/impl/result-ok.mjs.map +1 -1
  144. package/dist/functional/result/impl/result-or-else.mjs +10 -12
  145. package/dist/functional/result/impl/result-or-else.mjs.map +1 -1
  146. package/dist/functional/result/impl/result-swap.d.mts.map +1 -1
  147. package/dist/functional/result/impl/result-swap.mjs +4 -22
  148. package/dist/functional/result/impl/result-swap.mjs.map +1 -1
  149. package/dist/functional/result/impl/result-to-optional.d.mts.map +1 -1
  150. package/dist/functional/result/impl/result-to-optional.mjs +0 -27
  151. package/dist/functional/result/impl/result-to-optional.mjs.map +1 -1
  152. package/dist/functional/result/impl/result-unwrap-err-or.mjs +9 -11
  153. package/dist/functional/result/impl/result-unwrap-err-or.mjs.map +1 -1
  154. package/dist/functional/result/impl/result-unwrap-err-throw.d.mts.map +1 -1
  155. package/dist/functional/result/impl/result-unwrap-err-throw.mjs +13 -40
  156. package/dist/functional/result/impl/result-unwrap-err-throw.mjs.map +1 -1
  157. package/dist/functional/result/impl/result-unwrap-err.d.mts.map +1 -1
  158. package/dist/functional/result/impl/result-unwrap-err.mjs +4 -32
  159. package/dist/functional/result/impl/result-unwrap-err.mjs.map +1 -1
  160. package/dist/functional/result/impl/result-unwrap-ok-or.mjs +9 -11
  161. package/dist/functional/result/impl/result-unwrap-ok-or.mjs.map +1 -1
  162. package/dist/functional/result/impl/result-unwrap-ok.mjs +4 -4
  163. package/dist/functional/result/impl/result-unwrap-ok.mjs.map +1 -1
  164. package/dist/functional/result/impl/result-unwrap-throw.d.mts.map +1 -1
  165. package/dist/functional/result/impl/result-unwrap-throw.mjs +4 -35
  166. package/dist/functional/result/impl/result-unwrap-throw.mjs.map +1 -1
  167. package/dist/functional/result/impl/result-zip.d.mts.map +1 -1
  168. package/dist/functional/result/impl/result-zip.mjs +1 -34
  169. package/dist/functional/result/impl/result-zip.mjs.map +1 -1
  170. package/dist/functional/result/impl/tag.mjs +2 -3
  171. package/dist/functional/result/impl/tag.mjs.map +1 -1
  172. package/dist/functional/ternary-result/impl/tag.mjs +3 -5
  173. package/dist/functional/ternary-result/impl/tag.mjs.map +1 -1
  174. package/dist/functional/ternary-result/impl/ternary-result-err.d.mts.map +1 -1
  175. package/dist/functional/ternary-result/impl/ternary-result-err.mjs +2 -15
  176. package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -1
  177. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs +13 -13
  178. package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs.map +1 -1
  179. package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs +27 -26
  180. package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -1
  181. package/dist/functional/ternary-result/impl/ternary-result-fold.mjs +21 -22
  182. package/dist/functional/ternary-result/impl/ternary-result-fold.mjs.map +1 -1
  183. package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts.map +1 -1
  184. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +4 -20
  185. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs.map +1 -1
  186. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts.map +1 -1
  187. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +7 -25
  188. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs.map +1 -1
  189. package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts.map +1 -1
  190. package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs +0 -17
  191. package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs.map +1 -1
  192. package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts.map +1 -1
  193. package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs +0 -19
  194. package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs.map +1 -1
  195. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts.map +1 -1
  196. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +1 -25
  197. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs.map +1 -1
  198. package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts.map +1 -1
  199. package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs +0 -18
  200. package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs.map +1 -1
  201. package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs +13 -15
  202. package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -1
  203. package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs +18 -18
  204. package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -1
  205. package/dist/functional/ternary-result/impl/ternary-result-map.mjs +21 -22
  206. package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +1 -1
  207. package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts.map +1 -1
  208. package/dist/functional/ternary-result/impl/ternary-result-ok.mjs +2 -16
  209. package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -1
  210. package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs +9 -9
  211. package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs.map +1 -1
  212. package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts.map +1 -1
  213. package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs +4 -22
  214. package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs.map +1 -1
  215. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs +9 -9
  216. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs.map +1 -1
  217. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts.map +1 -1
  218. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs +12 -27
  219. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs.map +1 -1
  220. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts.map +1 -1
  221. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs +4 -19
  222. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs.map +1 -1
  223. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs +9 -9
  224. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs.map +1 -1
  225. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs +4 -5
  226. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs.map +1 -1
  227. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts.map +1 -1
  228. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs +15 -27
  229. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs.map +1 -1
  230. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs +9 -9
  231. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs.map +1 -1
  232. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts.map +1 -1
  233. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs +10 -24
  234. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs.map +1 -1
  235. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts.map +1 -1
  236. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs +4 -19
  237. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs.map +1 -1
  238. package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts.map +1 -1
  239. package/dist/functional/ternary-result/impl/ternary-result-warn.mjs +3 -19
  240. package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -1
  241. package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -1
  242. package/dist/functional/ternary-result/impl/ternary-result-zip.mjs +14 -45
  243. package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -1
  244. package/dist/functional/ternary-result/impl/variant-name.d.mts +1 -1
  245. package/dist/functional/ternary-result/impl/variant-name.d.mts.map +1 -1
  246. package/dist/functional/ternary-result/impl/variant-name.mjs +8 -9
  247. package/dist/functional/ternary-result/impl/variant-name.mjs.map +1 -1
  248. package/dist/guard/as-length-bounded-array.d.mts +117 -0
  249. package/dist/guard/as-length-bounded-array.d.mts.map +1 -0
  250. package/dist/guard/as-length-bounded-array.mjs +37 -0
  251. package/dist/guard/as-length-bounded-array.mjs.map +1 -0
  252. package/dist/guard/has-key.d.mts.map +1 -1
  253. package/dist/guard/has-key.mjs +0 -41
  254. package/dist/guard/has-key.mjs.map +1 -1
  255. package/dist/guard/index.d.mts +2 -0
  256. package/dist/guard/index.d.mts.map +1 -1
  257. package/dist/guard/index.mjs +2 -0
  258. package/dist/guard/index.mjs.map +1 -1
  259. package/dist/guard/is-length-bounded-array.d.mts +159 -0
  260. package/dist/guard/is-length-bounded-array.d.mts.map +1 -0
  261. package/dist/guard/is-length-bounded-array.mjs +7 -0
  262. package/dist/guard/is-length-bounded-array.mjs.map +1 -0
  263. package/dist/guard/is-length-bounded-string.d.mts +5 -6
  264. package/dist/guard/is-length-bounded-string.d.mts.map +1 -1
  265. package/dist/guard/is-length-bounded-string.mjs +0 -157
  266. package/dist/guard/is-length-bounded-string.mjs.map +1 -1
  267. package/dist/guard/is-non-empty-string.d.mts +1 -1
  268. package/dist/guard/is-non-empty-string.d.mts.map +1 -1
  269. package/dist/guard/is-non-empty-string.mjs +1 -38
  270. package/dist/guard/is-non-empty-string.mjs.map +1 -1
  271. package/dist/guard/is-non-null-object.d.mts.map +1 -1
  272. package/dist/guard/is-non-null-object.mjs +1 -35
  273. package/dist/guard/is-non-null-object.mjs.map +1 -1
  274. package/dist/guard/is-primitive.d.mts.map +1 -1
  275. package/dist/guard/is-primitive.mjs +12 -43
  276. package/dist/guard/is-primitive.mjs.map +1 -1
  277. package/dist/guard/is-record.d.mts.map +1 -1
  278. package/dist/guard/is-record.mjs +0 -86
  279. package/dist/guard/is-record.mjs.map +1 -1
  280. package/dist/guard/is-type.d.mts.map +1 -1
  281. package/dist/guard/is-type.mjs +12 -399
  282. package/dist/guard/is-type.mjs.map +1 -1
  283. package/dist/guard/key-is-in.d.mts.map +1 -1
  284. package/dist/guard/key-is-in.mjs +0 -40
  285. package/dist/guard/key-is-in.mjs.map +1 -1
  286. package/dist/index.mjs +2 -0
  287. package/dist/index.mjs.map +1 -1
  288. package/dist/iterator/range.mjs +16 -16
  289. package/dist/iterator/range.mjs.map +1 -1
  290. package/dist/json/json.d.mts.map +1 -1
  291. package/dist/json/json.mjs +52 -340
  292. package/dist/json/json.mjs.map +1 -1
  293. package/dist/number/branded-types/finite-number.d.mts +3 -3
  294. package/dist/number/branded-types/finite-number.mjs +135 -154
  295. package/dist/number/branded-types/finite-number.mjs.map +1 -1
  296. package/dist/number/branded-types/int.d.mts +4 -4
  297. package/dist/number/branded-types/int.mjs +205 -245
  298. package/dist/number/branded-types/int.mjs.map +1 -1
  299. package/dist/number/branded-types/int16.d.mts +15 -15
  300. package/dist/number/branded-types/int16.mjs +116 -123
  301. package/dist/number/branded-types/int16.mjs.map +1 -1
  302. package/dist/number/branded-types/int32.d.mts +11 -11
  303. package/dist/number/branded-types/int32.mjs +116 -123
  304. package/dist/number/branded-types/int32.mjs.map +1 -1
  305. package/dist/number/branded-types/negative-finite-number.d.mts +4 -4
  306. package/dist/number/branded-types/negative-finite-number.mjs +129 -144
  307. package/dist/number/branded-types/negative-finite-number.mjs.map +1 -1
  308. package/dist/number/branded-types/negative-int.d.mts +5 -5
  309. package/dist/number/branded-types/negative-int.mjs +94 -113
  310. package/dist/number/branded-types/negative-int.mjs.map +1 -1
  311. package/dist/number/branded-types/negative-safe-int.d.mts +5 -5
  312. package/dist/number/branded-types/negative-safe-int.mjs +103 -124
  313. package/dist/number/branded-types/negative-safe-int.mjs.map +1 -1
  314. package/dist/number/branded-types/non-negative-finite-number.d.mts +5 -5
  315. package/dist/number/branded-types/non-negative-finite-number.mjs +136 -142
  316. package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
  317. package/dist/number/branded-types/non-negative-int16.d.mts +16 -16
  318. package/dist/number/branded-types/non-negative-int16.mjs +109 -118
  319. package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
  320. package/dist/number/branded-types/non-negative-int32.d.mts +12 -12
  321. package/dist/number/branded-types/non-negative-int32.mjs +110 -119
  322. package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
  323. package/dist/number/branded-types/non-positive-finite-number.d.mts +3 -3
  324. package/dist/number/branded-types/non-positive-finite-number.mjs +120 -124
  325. package/dist/number/branded-types/non-positive-finite-number.mjs.map +1 -1
  326. package/dist/number/branded-types/non-positive-int.d.mts +4 -4
  327. package/dist/number/branded-types/non-positive-int.mjs +167 -212
  328. package/dist/number/branded-types/non-positive-int.mjs.map +1 -1
  329. package/dist/number/branded-types/non-positive-safe-int.d.mts +4 -4
  330. package/dist/number/branded-types/non-positive-safe-int.mjs +95 -106
  331. package/dist/number/branded-types/non-positive-safe-int.mjs.map +1 -1
  332. package/dist/number/branded-types/non-zero-finite-number.d.mts +4 -4
  333. package/dist/number/branded-types/non-zero-finite-number.mjs +114 -123
  334. package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
  335. package/dist/number/branded-types/non-zero-int.d.mts +2 -2
  336. package/dist/number/branded-types/non-zero-int.mjs +72 -83
  337. package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
  338. package/dist/number/branded-types/non-zero-int16.d.mts +7 -7
  339. package/dist/number/branded-types/non-zero-int16.mjs +96 -107
  340. package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
  341. package/dist/number/branded-types/non-zero-int32.d.mts +5 -5
  342. package/dist/number/branded-types/non-zero-int32.mjs +97 -108
  343. package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
  344. package/dist/number/branded-types/non-zero-safe-int.d.mts +2 -2
  345. package/dist/number/branded-types/non-zero-safe-int.mjs +100 -111
  346. package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
  347. package/dist/number/branded-types/non-zero-uint16.d.mts +8 -8
  348. package/dist/number/branded-types/non-zero-uint16.mjs +96 -107
  349. package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
  350. package/dist/number/branded-types/non-zero-uint32.d.mts +6 -6
  351. package/dist/number/branded-types/non-zero-uint32.mjs +96 -107
  352. package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
  353. package/dist/number/branded-types/positive-finite-number.d.mts +8 -8
  354. package/dist/number/branded-types/positive-finite-number.mjs +139 -141
  355. package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
  356. package/dist/number/branded-types/positive-int.d.mts +11 -11
  357. package/dist/number/branded-types/positive-int.mjs +228 -271
  358. package/dist/number/branded-types/positive-int.mjs.map +1 -1
  359. package/dist/number/branded-types/positive-int16.d.mts +19 -19
  360. package/dist/number/branded-types/positive-int16.mjs +109 -118
  361. package/dist/number/branded-types/positive-int16.mjs.map +1 -1
  362. package/dist/number/branded-types/positive-int32.d.mts +15 -15
  363. package/dist/number/branded-types/positive-int32.mjs +109 -118
  364. package/dist/number/branded-types/positive-int32.mjs.map +1 -1
  365. package/dist/number/branded-types/positive-safe-int.d.mts +11 -11
  366. package/dist/number/branded-types/positive-safe-int.mjs +244 -275
  367. package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
  368. package/dist/number/branded-types/positive-uint16.d.mts +17 -17
  369. package/dist/number/branded-types/positive-uint16.mjs +109 -118
  370. package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
  371. package/dist/number/branded-types/positive-uint32.d.mts +13 -13
  372. package/dist/number/branded-types/positive-uint32.mjs +110 -119
  373. package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
  374. package/dist/number/branded-types/safe-int.d.mts +4 -4
  375. package/dist/number/branded-types/safe-int.mjs +251 -292
  376. package/dist/number/branded-types/safe-int.mjs.map +1 -1
  377. package/dist/number/branded-types/safe-uint.d.mts +8 -8
  378. package/dist/number/branded-types/safe-uint.mjs +111 -119
  379. package/dist/number/branded-types/safe-uint.mjs.map +1 -1
  380. package/dist/number/branded-types/uint.d.mts +8 -8
  381. package/dist/number/branded-types/uint.mjs +198 -225
  382. package/dist/number/branded-types/uint.mjs.map +1 -1
  383. package/dist/number/branded-types/uint16.d.mts +14 -14
  384. package/dist/number/branded-types/uint16.mjs +109 -119
  385. package/dist/number/branded-types/uint16.mjs.map +1 -1
  386. package/dist/number/branded-types/uint32.d.mts +10 -10
  387. package/dist/number/branded-types/uint32.mjs +110 -117
  388. package/dist/number/branded-types/uint32.mjs.map +1 -1
  389. package/dist/number/enum/int8.mjs +119 -145
  390. package/dist/number/enum/int8.mjs.map +1 -1
  391. package/dist/number/enum/uint8.mjs +107 -121
  392. package/dist/number/enum/uint8.mjs.map +1 -1
  393. package/dist/number/num.d.mts +2 -2
  394. package/dist/number/num.d.mts.map +1 -1
  395. package/dist/number/num.mjs +76 -537
  396. package/dist/number/num.mjs.map +1 -1
  397. package/dist/number/refined-number-utils.d.mts +1 -1
  398. package/dist/number/refined-number-utils.d.mts.map +1 -1
  399. package/dist/number/refined-number-utils.mjs +127 -263
  400. package/dist/number/refined-number-utils.mjs.map +1 -1
  401. package/dist/object/object.d.mts.map +1 -1
  402. package/dist/object/object.mjs +107 -222
  403. package/dist/object/object.mjs.map +1 -1
  404. package/dist/others/cast-mutable.d.mts.map +1 -1
  405. package/dist/others/cast-mutable.mjs +8 -37
  406. package/dist/others/cast-mutable.mjs.map +1 -1
  407. package/dist/others/cast-readonly.d.mts.map +1 -1
  408. package/dist/others/cast-readonly.mjs +8 -36
  409. package/dist/others/cast-readonly.mjs.map +1 -1
  410. package/dist/others/debounce-function.d.mts.map +1 -1
  411. package/dist/others/debounce-function.mjs +7 -16
  412. package/dist/others/debounce-function.mjs.map +1 -1
  413. package/dist/others/fast-deep-equal.d.mts.map +1 -1
  414. package/dist/others/fast-deep-equal.mjs +43 -59
  415. package/dist/others/fast-deep-equal.mjs.map +1 -1
  416. package/dist/others/if-then.d.mts.map +1 -1
  417. package/dist/others/if-then.mjs +0 -29
  418. package/dist/others/if-then.mjs.map +1 -1
  419. package/dist/others/map-nullable.mjs +9 -9
  420. package/dist/others/map-nullable.mjs.map +1 -1
  421. package/dist/others/memoize-function.mjs +12 -12
  422. package/dist/others/memoize-function.mjs.map +1 -1
  423. package/dist/others/tuple.d.mts.map +1 -1
  424. package/dist/others/tuple.mjs +0 -50
  425. package/dist/others/tuple.mjs.map +1 -1
  426. package/dist/others/unknown-to-string.d.mts.map +1 -1
  427. package/dist/others/unknown-to-string.mjs +41 -88
  428. package/dist/others/unknown-to-string.mjs.map +1 -1
  429. package/dist/promise/promise.d.mts.map +1 -1
  430. package/dist/promise/promise.mjs +4 -49
  431. package/dist/promise/promise.mjs.map +1 -1
  432. package/package.json +14 -13
  433. package/src/array/impl/array-utils-creation.mts +3 -3
  434. package/src/array/impl/array-utils-modification.mts +7 -7
  435. package/src/array/impl/array-utils-modification.test.mts +4 -4
  436. package/src/array/impl/array-utils-transformation.mts +4 -4
  437. package/src/array/impl/array-utils-transformation.test.mts +7 -7
  438. package/src/array/impl/array-utils-validation.mts +24 -24
  439. package/src/array/impl/array-utils-validation.test.mts +94 -92
  440. package/src/collections/queue.test.mts +1 -1
  441. package/src/guard/as-length-bounded-array.mts +190 -0
  442. package/src/guard/as-length-bounded-array.test.mts +118 -0
  443. package/src/guard/index.mts +2 -0
  444. package/src/guard/is-length-bounded-array.mts +195 -0
  445. package/src/guard/is-length-bounded-array.test.mts +169 -0
  446. package/src/guard/is-length-bounded-string.mts +6 -6
  447. package/src/object/object.test.mts +3 -3
@@ -1,135 +1,114 @@
1
1
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
2
2
  import { PositiveSafeInt } from './positive-safe-int.mjs';
3
3
 
4
- const typeNameInMessage = 'a negative safe integer';
5
- const { MAX_VALUE, MIN_VALUE, add, castType, clamp, is, max: max_, min: min_, pow, random, sub, } = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger({
6
- integerOrSafeInteger: 'SafeInteger',
7
- nonZero: true,
8
- MIN_VALUE: Number.MIN_SAFE_INTEGER,
9
- MAX_VALUE: -1,
10
- typeNameInMessage,
4
+ const typeNameInMessage = "a negative safe integer";
5
+ const {
6
+ MAX_VALUE,
7
+ MIN_VALUE,
8
+ add,
9
+ castType,
10
+ clamp,
11
+ is,
12
+ max: max_,
13
+ min: min_,
14
+ pow,
15
+ random,
16
+ sub
17
+ } = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger({
18
+ integerOrSafeInteger: "SafeInteger",
19
+ nonZero: true,
20
+ MIN_VALUE: Number.MIN_SAFE_INTEGER,
21
+ MAX_VALUE: -1,
22
+ typeNameInMessage
11
23
  });
12
- /**
13
- * Returns the absolute value of a negative safe integer.
14
- *
15
- * The absolute value of a negative safe integer is always a positive safe
16
- * integer (`>= 1`), so the result is typed as a {@link PositiveSafeInt}.
17
- *
18
- * @param x - The negative safe integer.
19
- * @returns `|x|` as a PositiveSafeInt.
20
- */
21
24
  const abs = (x) => PositiveSafeInt.clamp(Math.abs(x));
22
- /**
23
- * Checks if a number is a NegativeSafeInt (a negative safe integer in the range
24
- * `[Number.MIN_SAFE_INTEGER, -1]`).
25
- *
26
- * @param value The value to check.
27
- * @returns `true` if the value is a NegativeSafeInt, `false` otherwise.
28
- */
29
25
  const isNegativeSafeInt = is;
30
- /**
31
- * Casts a number to a NegativeSafeInt type.
32
- *
33
- * @param value The value to cast.
34
- * @returns The value as a NegativeSafeInt type.
35
- * @throws {TypeError} If the value is not a negative safe integer.
36
- */
37
26
  const asNegativeSafeInt = castType;
38
- /**
39
- * Namespace providing type-safe arithmetic operations for negative safe
40
- * integers.
41
- *
42
- * NegativeSafeInt represents safe integers that are strictly less than zero
43
- * (`[Number.MIN_SAFE_INTEGER, -1]`). Operations that stay within the negative
44
- * safe integers clamp their results to the valid range, while operations whose
45
- * result leaves the set (`mul`, `div`, `abs`) are typed to reflect the actual
46
- * sign of the result.
47
- */
48
27
  const NegativeSafeInt = {
49
- /**
50
- * Type guard to check if a value is a NegativeSafeInt.
51
- *
52
- * @param value The value to check.
53
- * @returns `true` if the value is a negative safe integer, `false` otherwise.
54
- */
55
- is,
56
- /**
57
- * The minimum value for a negative safe integer.
58
- *
59
- * @readonly
60
- */
61
- MIN_VALUE,
62
- /**
63
- * The maximum value for a negative safe integer.
64
- *
65
- * @readonly
66
- */
67
- MAX_VALUE,
68
- /**
69
- * Returns the absolute value of a negative safe integer.
70
- *
71
- * @param a The negative safe integer.
72
- * @returns The absolute value as a PositiveSafeInt.
73
- */
74
- abs,
75
- /**
76
- * Returns the smaller of two negative safe integers.
77
- *
78
- * @param a The first negative safe integer.
79
- * @param b The second negative safe integer.
80
- * @returns The minimum value as a NegativeSafeInt.
81
- */
82
- min: min_,
83
- /**
84
- * Returns the larger of two negative safe integers.
85
- *
86
- * @param a The first negative safe integer.
87
- * @param b The second negative safe integer.
88
- * @returns The maximum value as a NegativeSafeInt.
89
- */
90
- max: max_,
91
- /**
92
- * Clamps a number to the NegativeSafeInt range.
93
- *
94
- * @param value The number to clamp.
95
- * @returns The value clamped to `[Number.MIN_SAFE_INTEGER, -1]` as a
96
- * NegativeSafeInt.
97
- */
98
- clamp,
99
- /**
100
- * Generates a random NegativeSafeInt value within the valid range.
101
- *
102
- * @returns A random NegativeSafeInt between Number.MIN_SAFE_INTEGER and -1.
103
- */
104
- random,
105
- /**
106
- * Raises a negative safe integer to the power of another negative safe
107
- * integer.
108
- *
109
- * @param a The base negative safe integer.
110
- * @param b The exponent negative safe integer.
111
- * @returns `a ** b` clamped to the NegativeSafeInt range.
112
- */
113
- pow,
114
- /**
115
- * Adds two negative safe integers.
116
- *
117
- * @param a The first negative safe integer.
118
- * @param b The second negative safe integer.
119
- * @returns `a + b` clamped to the NegativeSafeInt range.
120
- */
121
- add,
122
- /**
123
- * Subtracts one negative safe integer from another.
124
- *
125
- * The mathematical result can be positive, so it is clamped to the
126
- * NegativeSafeInt range (maximum `-1`).
127
- *
128
- * @param a The minuend negative safe integer.
129
- * @param b The subtrahend negative safe integer.
130
- * @returns `a - b` clamped to the NegativeSafeInt range.
131
- */
132
- sub,
28
+ /**
29
+ * Type guard to check if a value is a NegativeSafeInt.
30
+ *
31
+ * @param value The value to check.
32
+ * @returns `true` if the value is a negative safe integer, `false` otherwise.
33
+ */
34
+ is,
35
+ /**
36
+ * The minimum value for a negative safe integer.
37
+ *
38
+ * @readonly
39
+ */
40
+ MIN_VALUE,
41
+ /**
42
+ * The maximum value for a negative safe integer.
43
+ *
44
+ * @readonly
45
+ */
46
+ MAX_VALUE,
47
+ /**
48
+ * Returns the absolute value of a negative safe integer.
49
+ *
50
+ * @param a The negative safe integer.
51
+ * @returns The absolute value as a PositiveSafeInt.
52
+ */
53
+ abs,
54
+ /**
55
+ * Returns the smaller of two negative safe integers.
56
+ *
57
+ * @param a The first negative safe integer.
58
+ * @param b The second negative safe integer.
59
+ * @returns The minimum value as a NegativeSafeInt.
60
+ */
61
+ min: min_,
62
+ /**
63
+ * Returns the larger of two negative safe integers.
64
+ *
65
+ * @param a The first negative safe integer.
66
+ * @param b The second negative safe integer.
67
+ * @returns The maximum value as a NegativeSafeInt.
68
+ */
69
+ max: max_,
70
+ /**
71
+ * Clamps a number to the NegativeSafeInt range.
72
+ *
73
+ * @param value The number to clamp.
74
+ * @returns The value clamped to `[Number.MIN_SAFE_INTEGER, -1]` as a
75
+ * NegativeSafeInt.
76
+ */
77
+ clamp,
78
+ /**
79
+ * Generates a random NegativeSafeInt value within the valid range.
80
+ *
81
+ * @returns A random NegativeSafeInt between Number.MIN_SAFE_INTEGER and -1.
82
+ */
83
+ random,
84
+ /**
85
+ * Raises a negative safe integer to the power of another negative safe
86
+ * integer.
87
+ *
88
+ * @param a The base negative safe integer.
89
+ * @param b The exponent negative safe integer.
90
+ * @returns `a ** b` clamped to the NegativeSafeInt range.
91
+ */
92
+ pow,
93
+ /**
94
+ * Adds two negative safe integers.
95
+ *
96
+ * @param a The first negative safe integer.
97
+ * @param b The second negative safe integer.
98
+ * @returns `a + b` clamped to the NegativeSafeInt range.
99
+ */
100
+ add,
101
+ /**
102
+ * Subtracts one negative safe integer from another.
103
+ *
104
+ * The mathematical result can be positive, so it is clamped to the
105
+ * NegativeSafeInt range (maximum `-1`).
106
+ *
107
+ * @param a The minuend negative safe integer.
108
+ * @param b The subtrahend negative safe integer.
109
+ * @returns `a - b` clamped to the NegativeSafeInt range.
110
+ */
111
+ sub
133
112
  };
134
113
 
135
114
  export { NegativeSafeInt, asNegativeSafeInt, isNegativeSafeInt };
@@ -1 +1 @@
1
- {"version":3,"file":"negative-safe-int.mjs","sources":["../../../src/number/branded-types/negative-safe-int.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAWA,MAAM,iBAAiB,GAAG,yBAAyB;AAEnD,MAAM,EACJ,SAAS,EACT,SAAS,EACT,GAAG,EACH,QAAQ,EACR,KAAK,EACL,EAAE,EACF,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,IAAI,EACT,GAAG,EACH,MAAM,EACN,GAAG,GACJ,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,mBAAmB,CAI7D;AACA,IAAA,oBAAoB,EAAE,aAAa;AACnC,IAAA,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB;IAClC,SAAS,EAAE,EAAE;IACb,iBAAiB;AACT,CAAA,CAAC;AAEX;;;;;;;;AAQG;AACH,MAAM,GAAG,GAAG,CAAC,CAA4B,KACvC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEpC;;;;;;AAMG;AACI,MAAM,iBAAiB,GAAG;AAEjC;;;;;;AAMG;AACI,MAAM,iBAAiB,GAAG;AAEjC;;;;;;;;;AASG;AACI,MAAM,eAAe,GAAG;AAC7B;;;;;AAKG;IACH,EAAE;AAEF;;;;AAIG;IACH,SAAS;AAET;;;;AAIG;IACH,SAAS;AAET;;;;;AAKG;IACH,GAAG;AAEH;;;;;;AAMG;AACH,IAAA,GAAG,EAAE,IAAI;AAET;;;;;;AAMG;AACH,IAAA,GAAG,EAAE,IAAI;AAET;;;;;;AAMG;IACH,KAAK;AAEL;;;;AAIG;IACH,MAAM;AAEN;;;;;;;AAOG;IACH,GAAG;AAEH;;;;;;AAMG;IACH,GAAG;AAEH;;;;;;;;;AASG;IACH,GAAG;;;;;"}
1
+ {"version":3,"file":"negative-safe-int.mjs","sources":["../../../src/number/branded-types/negative-safe-int.mts"],"sourcesContent":["import {\n type NegativeSafeInt as TtfImported_NegativeSafeInt,\n type WithSmallInt,\n} from 'ts-type-forge';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\nimport { PositiveSafeInt } from './positive-safe-int.mjs';\n\nexport type NegativeSafeInt = TtfImported_NegativeSafeInt;\n\ntype ElementType = NegativeSafeInt;\n\nconst typeNameInMessage = 'a negative safe integer';\n\nconst {\n MAX_VALUE,\n MIN_VALUE,\n add,\n castType,\n clamp,\n is,\n max: max_,\n min: min_,\n pow,\n random,\n sub,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger<\n ElementType,\n number,\n -1\n>({\n integerOrSafeInteger: 'SafeInteger',\n nonZero: true,\n MIN_VALUE: Number.MIN_SAFE_INTEGER,\n MAX_VALUE: -1,\n typeNameInMessage,\n} as const);\n\n/**\n * Returns the absolute value of a negative safe integer.\n *\n * The absolute value of a negative safe integer is always a positive safe\n * integer (`>= 1`), so the result is typed as a {@link PositiveSafeInt}.\n *\n * @param x - The negative safe integer.\n * @returns `|x|` as a PositiveSafeInt.\n */\nconst abs = (x: WithSmallInt<ElementType>): PositiveSafeInt =>\n PositiveSafeInt.clamp(Math.abs(x));\n\n/**\n * Checks if a number is a NegativeSafeInt (a negative safe integer in the range\n * `[Number.MIN_SAFE_INTEGER, -1]`).\n *\n * @param value The value to check.\n * @returns `true` if the value is a NegativeSafeInt, `false` otherwise.\n */\nexport const isNegativeSafeInt = is;\n\n/**\n * Casts a number to a NegativeSafeInt type.\n *\n * @param value The value to cast.\n * @returns The value as a NegativeSafeInt type.\n * @throws {TypeError} If the value is not a negative safe integer.\n */\nexport const asNegativeSafeInt = castType;\n\n/**\n * Namespace providing type-safe arithmetic operations for negative safe\n * integers.\n *\n * NegativeSafeInt represents safe integers that are strictly less than zero\n * (`[Number.MIN_SAFE_INTEGER, -1]`). Operations that stay within the negative\n * safe integers clamp their results to the valid range, while operations whose\n * result leaves the set (`mul`, `div`, `abs`) are typed to reflect the actual\n * sign of the result.\n */\nexport const NegativeSafeInt = {\n /**\n * Type guard to check if a value is a NegativeSafeInt.\n *\n * @param value The value to check.\n * @returns `true` if the value is a negative safe integer, `false` otherwise.\n */\n is,\n\n /**\n * The minimum value for a negative safe integer.\n *\n * @readonly\n */\n MIN_VALUE,\n\n /**\n * The maximum value for a negative safe integer.\n *\n * @readonly\n */\n MAX_VALUE,\n\n /**\n * Returns the absolute value of a negative safe integer.\n *\n * @param a The negative safe integer.\n * @returns The absolute value as a PositiveSafeInt.\n */\n abs,\n\n /**\n * Returns the smaller of two negative safe integers.\n *\n * @param a The first negative safe integer.\n * @param b The second negative safe integer.\n * @returns The minimum value as a NegativeSafeInt.\n */\n min: min_,\n\n /**\n * Returns the larger of two negative safe integers.\n *\n * @param a The first negative safe integer.\n * @param b The second negative safe integer.\n * @returns The maximum value as a NegativeSafeInt.\n */\n max: max_,\n\n /**\n * Clamps a number to the NegativeSafeInt range.\n *\n * @param value The number to clamp.\n * @returns The value clamped to `[Number.MIN_SAFE_INTEGER, -1]` as a\n * NegativeSafeInt.\n */\n clamp,\n\n /**\n * Generates a random NegativeSafeInt value within the valid range.\n *\n * @returns A random NegativeSafeInt between Number.MIN_SAFE_INTEGER and -1.\n */\n random,\n\n /**\n * Raises a negative safe integer to the power of another negative safe\n * integer.\n *\n * @param a The base negative safe integer.\n * @param b The exponent negative safe integer.\n * @returns `a ** b` clamped to the NegativeSafeInt range.\n */\n pow,\n\n /**\n * Adds two negative safe integers.\n *\n * @param a The first negative safe integer.\n * @param b The second negative safe integer.\n * @returns `a + b` clamped to the NegativeSafeInt range.\n */\n add,\n\n /**\n * Subtracts one negative safe integer from another.\n *\n * The mathematical result can be positive, so it is clamped to the\n * NegativeSafeInt range (maximum `-1`).\n *\n * @param a The minuend negative safe integer.\n * @param b The subtrahend negative safe integer.\n * @returns `a - b` clamped to the NegativeSafeInt range.\n */\n sub,\n} as const;\n"],"names":[],"mappings":";;;AAWA,MAAM,iBAAA,GAAoB,yBAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA,EAAK,IAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,GAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,aAAA;AAAA,EACtB,OAAA,EAAS,IAAA;AAAA,EACT,WAAW,MAAA,CAAO,gBAAA;AAAA,EAClB,SAAA,EAAW,EAAA;AAAA,EACX;AACF,CAAU,CAAA;AAWV,MAAM,GAAA,GAAM,CAAC,CAAA,KACX,eAAA,CAAgB,MAAM,IAAA,CAAK,GAAA,CAAI,CAAC,CAAC,CAAA;AAS5B,MAAM,iBAAA,GAAoB;AAS1B,MAAM,iBAAA,GAAoB;AAY1B,MAAM,eAAA,GAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO7B,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA;AACF;;;;"}
@@ -17,13 +17,13 @@ export declare const isNonNegativeFiniteNumber: (a: number) => a is TtfImported_
17
17
  * @throws {TypeError} If the value is not a non-negative finite number.
18
18
  */
19
19
  export declare const asNonNegativeFiniteNumber: <N extends number>(x: N) => number & {
20
- readonly NaNValue: false;
21
- readonly Finite: true;
22
20
  readonly "> -2^16": true;
23
21
  readonly "> -2^32": true;
24
22
  readonly ">= -2^15": true;
25
23
  readonly ">= -2^31": true;
26
24
  readonly ">=0": true;
25
+ readonly Finite: true;
26
+ readonly NaNValue: false;
27
27
  } & Readonly<{
28
28
  'TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3': unknown;
29
29
  }> & N;
@@ -143,14 +143,14 @@ export declare const NonNegativeFiniteNumber: {
143
143
  * @returns `a / b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
144
144
  */
145
145
  readonly div: (x: TtfImported_NonNegativeFiniteNumber, y: number & {
146
- readonly NaNValue: false;
147
- readonly Finite: true;
146
+ readonly "!=0": true;
148
147
  readonly "> -2^16": true;
149
148
  readonly "> -2^32": true;
150
149
  readonly ">= -2^15": true;
151
150
  readonly ">= -2^31": true;
152
151
  readonly ">=0": true;
153
- readonly "!=0": true;
152
+ readonly Finite: true;
153
+ readonly NaNValue: false;
154
154
  } & Readonly<{
155
155
  'TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3': unknown;
156
156
  }>) => TtfImported_NonNegativeFiniteNumber;
@@ -1,151 +1,145 @@
1
1
  import { TsDataForgeInternals } from '../refined-number-utils.mjs';
2
2
 
3
- const typeNameInMessage = 'a non-negative finite number';
4
- const { MIN_VALUE, add, castType, clamp, div, is, max: max_, min: min_, mul, pow, random, sub, } = TsDataForgeInternals.RefinedNumberUtils.operatorsForFloat({
5
- MIN_VALUE: 0,
6
- MAX_VALUE: Number.MAX_VALUE,
7
- typeNameInMessage,
3
+ const typeNameInMessage = "a non-negative finite number";
4
+ const {
5
+ MIN_VALUE,
6
+ add,
7
+ castType,
8
+ clamp,
9
+ div,
10
+ is,
11
+ max: max_,
12
+ min: min_,
13
+ mul,
14
+ pow,
15
+ random,
16
+ sub
17
+ } = TsDataForgeInternals.RefinedNumberUtils.operatorsForFloat({
18
+ MIN_VALUE: 0,
19
+ MAX_VALUE: Number.MAX_VALUE,
20
+ typeNameInMessage
8
21
  });
9
- const floor = (x) =>
10
- // eslint-disable-next-line total-functions/no-unsafe-type-assertion
11
- Math.floor(x);
12
- const ceil = (x) =>
13
- // eslint-disable-next-line total-functions/no-unsafe-type-assertion
14
- Math.ceil(x);
15
- const round = (x) =>
16
- // eslint-disable-next-line total-functions/no-unsafe-type-assertion
17
- Math.round(x);
18
- /**
19
- * Checks if a number is a NonNegativeFiniteNumber (a finite number >= 0).
20
- *
21
- * @param value The value to check.
22
- * @returns `true` if the value is a NonNegativeFiniteNumber, `false` otherwise.
23
- */
22
+ const floor = (x) => (
23
+ // eslint-disable-next-line total-functions/no-unsafe-type-assertion
24
+ Math.floor(x)
25
+ );
26
+ const ceil = (x) => (
27
+ // eslint-disable-next-line total-functions/no-unsafe-type-assertion
28
+ Math.ceil(x)
29
+ );
30
+ const round = (x) => (
31
+ // eslint-disable-next-line total-functions/no-unsafe-type-assertion
32
+ Math.round(x)
33
+ );
24
34
  const isNonNegativeFiniteNumber = is;
25
- /**
26
- * Casts a number to a NonNegativeFiniteNumber type.
27
- *
28
- * @param value The value to cast.
29
- * @returns The value as a NonNegativeFiniteNumber type.
30
- * @throws {TypeError} If the value is not a non-negative finite number.
31
- */
32
35
  const asNonNegativeFiniteNumber = castType;
33
- /**
34
- * Namespace providing type-safe arithmetic operations for non-negative finite
35
- * numbers.
36
- *
37
- * All operations maintain the non-negative constraint by clamping negative
38
- * results to 0, while ensuring results remain finite (excluding NaN and
39
- * Infinity). This type is useful for representing measurements, distances,
40
- * weights, and other inherently non-negative values.
41
- */
42
36
  const NonNegativeFiniteNumber = {
43
- /**
44
- * Type guard to check if a value is a NonNegativeFiniteNumber.
45
- *
46
- * @param value The value to check.
47
- * @returns `true` if the value is a non-negative finite number, `false`
48
- * otherwise.
49
- */
50
- is,
51
- /**
52
- * The minimum value for a non-negative finite number.
53
- *
54
- * @readonly
55
- */
56
- MIN_VALUE,
57
- /**
58
- * Returns the smaller of two NonNegativeFiniteNumber values.
59
- *
60
- * @param a The first NonNegativeFiniteNumber.
61
- * @param b The second NonNegativeFiniteNumber.
62
- * @returns The minimum value as a NonNegativeFiniteNumber.
63
- */
64
- min: min_,
65
- /**
66
- * Returns the larger of two NonNegativeFiniteNumber values.
67
- *
68
- * @param a The first NonNegativeFiniteNumber.
69
- * @param b The second NonNegativeFiniteNumber.
70
- * @returns The maximum value as a NonNegativeFiniteNumber.
71
- */
72
- max: max_,
73
- /**
74
- * Clamps a number to the non-negative finite range.
75
- *
76
- * @param value The number to clamp.
77
- * @returns The value clamped to [0, +∞) as a NonNegativeFiniteNumber.
78
- */
79
- clamp,
80
- /**
81
- * Rounds down a NonNegativeFiniteNumber to the nearest integer.
82
- *
83
- * @param x The NonNegativeFiniteNumber to round down.
84
- * @returns The floor value as a Uint.
85
- */
86
- floor,
87
- /**
88
- * Rounds up a NonNegativeFiniteNumber to the nearest integer.
89
- *
90
- * @param x The NonNegativeFiniteNumber to round up.
91
- * @returns The ceiling value as a Uint.
92
- */
93
- ceil,
94
- /**
95
- * Rounds a NonNegativeFiniteNumber to the nearest integer.
96
- *
97
- * @param x The NonNegativeFiniteNumber to round.
98
- * @returns The rounded value as a Uint.
99
- */
100
- round,
101
- /**
102
- * Generates a random NonNegativeFiniteNumber value.
103
- *
104
- * @returns A random non-negative finite number.
105
- */
106
- random,
107
- /**
108
- * Raises a NonNegativeFiniteNumber to the power of another
109
- * NonNegativeFiniteNumber.
110
- *
111
- * @param a The base NonNegativeFiniteNumber.
112
- * @param b The exponent NonNegativeFiniteNumber.
113
- * @returns `a ** b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
114
- */
115
- pow,
116
- /**
117
- * Adds two NonNegativeFiniteNumber values.
118
- *
119
- * @param a The first NonNegativeFiniteNumber.
120
- * @param b The second NonNegativeFiniteNumber.
121
- * @returns `a + b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
122
- */
123
- add,
124
- /**
125
- * Subtracts one NonNegativeFiniteNumber from another.
126
- *
127
- * @param a The minuend NonNegativeFiniteNumber.
128
- * @param b The subtrahend NonNegativeFiniteNumber.
129
- * @returns `a - b` clamped to [0, +∞) as a NonNegativeFiniteNumber (minimum
130
- * 0).
131
- */
132
- sub,
133
- /**
134
- * Multiplies two NonNegativeFiniteNumber values.
135
- *
136
- * @param a The first NonNegativeFiniteNumber.
137
- * @param b The second NonNegativeFiniteNumber.
138
- * @returns `a * b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
139
- */
140
- mul,
141
- /**
142
- * Divides one NonNegativeFiniteNumber by another.
143
- *
144
- * @param a The dividend NonNegativeFiniteNumber.
145
- * @param b The divisor NonNegativeFiniteNumber.
146
- * @returns `a / b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
147
- */
148
- div,
37
+ /**
38
+ * Type guard to check if a value is a NonNegativeFiniteNumber.
39
+ *
40
+ * @param value The value to check.
41
+ * @returns `true` if the value is a non-negative finite number, `false`
42
+ * otherwise.
43
+ */
44
+ is,
45
+ /**
46
+ * The minimum value for a non-negative finite number.
47
+ *
48
+ * @readonly
49
+ */
50
+ MIN_VALUE,
51
+ /**
52
+ * Returns the smaller of two NonNegativeFiniteNumber values.
53
+ *
54
+ * @param a The first NonNegativeFiniteNumber.
55
+ * @param b The second NonNegativeFiniteNumber.
56
+ * @returns The minimum value as a NonNegativeFiniteNumber.
57
+ */
58
+ min: min_,
59
+ /**
60
+ * Returns the larger of two NonNegativeFiniteNumber values.
61
+ *
62
+ * @param a The first NonNegativeFiniteNumber.
63
+ * @param b The second NonNegativeFiniteNumber.
64
+ * @returns The maximum value as a NonNegativeFiniteNumber.
65
+ */
66
+ max: max_,
67
+ /**
68
+ * Clamps a number to the non-negative finite range.
69
+ *
70
+ * @param value The number to clamp.
71
+ * @returns The value clamped to [0, +∞) as a NonNegativeFiniteNumber.
72
+ */
73
+ clamp,
74
+ /**
75
+ * Rounds down a NonNegativeFiniteNumber to the nearest integer.
76
+ *
77
+ * @param x The NonNegativeFiniteNumber to round down.
78
+ * @returns The floor value as a Uint.
79
+ */
80
+ floor,
81
+ /**
82
+ * Rounds up a NonNegativeFiniteNumber to the nearest integer.
83
+ *
84
+ * @param x The NonNegativeFiniteNumber to round up.
85
+ * @returns The ceiling value as a Uint.
86
+ */
87
+ ceil,
88
+ /**
89
+ * Rounds a NonNegativeFiniteNumber to the nearest integer.
90
+ *
91
+ * @param x The NonNegativeFiniteNumber to round.
92
+ * @returns The rounded value as a Uint.
93
+ */
94
+ round,
95
+ /**
96
+ * Generates a random NonNegativeFiniteNumber value.
97
+ *
98
+ * @returns A random non-negative finite number.
99
+ */
100
+ random,
101
+ /**
102
+ * Raises a NonNegativeFiniteNumber to the power of another
103
+ * NonNegativeFiniteNumber.
104
+ *
105
+ * @param a The base NonNegativeFiniteNumber.
106
+ * @param b The exponent NonNegativeFiniteNumber.
107
+ * @returns `a ** b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
108
+ */
109
+ pow,
110
+ /**
111
+ * Adds two NonNegativeFiniteNumber values.
112
+ *
113
+ * @param a The first NonNegativeFiniteNumber.
114
+ * @param b The second NonNegativeFiniteNumber.
115
+ * @returns `a + b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
116
+ */
117
+ add,
118
+ /**
119
+ * Subtracts one NonNegativeFiniteNumber from another.
120
+ *
121
+ * @param a The minuend NonNegativeFiniteNumber.
122
+ * @param b The subtrahend NonNegativeFiniteNumber.
123
+ * @returns `a - b` clamped to [0, +∞) as a NonNegativeFiniteNumber (minimum
124
+ * 0).
125
+ */
126
+ sub,
127
+ /**
128
+ * Multiplies two NonNegativeFiniteNumber values.
129
+ *
130
+ * @param a The first NonNegativeFiniteNumber.
131
+ * @param b The second NonNegativeFiniteNumber.
132
+ * @returns `a * b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
133
+ */
134
+ mul,
135
+ /**
136
+ * Divides one NonNegativeFiniteNumber by another.
137
+ *
138
+ * @param a The dividend NonNegativeFiniteNumber.
139
+ * @param b The divisor NonNegativeFiniteNumber.
140
+ * @returns `a / b` clamped to [0, +∞) as a NonNegativeFiniteNumber.
141
+ */
142
+ div
149
143
  };
150
144
 
151
145
  export { NonNegativeFiniteNumber, asNonNegativeFiniteNumber, isNonNegativeFiniteNumber };
@@ -1 +1 @@
1
- {"version":3,"file":"non-negative-finite-number.mjs","sources":["../../../src/number/branded-types/non-negative-finite-number.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAWA,MAAM,iBAAiB,GAAG,8BAA8B;AAExD,MAAM,EACJ,SAAS,EACT,GAAG,EACH,QAAQ,EACR,KAAK,EACL,GAAG,EACH,EAAE,EACF,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,IAAI,EACT,GAAG,EACH,GAAG,EACH,MAAM,EACN,GAAG,GACJ,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,iBAAiB,CAI3D;AACA,IAAA,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC,SAAS;IAC3B,iBAAiB;AACT,CAAA,CAAC;AAEX,MAAM,KAAK,GAAG,CACZ,CAAc;AAEd;AACA,IAAI,CAAC,KAAK,CAAC,CAAC,CAA+D;AAE7E,MAAM,IAAI,GAAG,CACX,CAAc;AAEd;AACA,IAAI,CAAC,IAAI,CAAC,CAAC,CAA+D;AAE5E,MAAM,KAAK,GAAG,CACZ,CAAc;AAEd;AACA,IAAI,CAAC,KAAK,CAAC,CAAC,CAA+D;AAM7E;;;;;AAKG;AACI,MAAM,yBAAyB,GAAG;AAEzC;;;;;;AAMG;AACI,MAAM,yBAAyB,GAAG;AAEzC;;;;;;;;AAQG;AACI,MAAM,uBAAuB,GAAG;AACrC;;;;;;AAMG;IACH,EAAE;AAEF;;;;AAIG;IACH,SAAS;AAET;;;;;;AAMG;AACH,IAAA,GAAG,EAAE,IAAI;AAET;;;;;;AAMG;AACH,IAAA,GAAG,EAAE,IAAI;AAET;;;;;AAKG;IACH,KAAK;AAEL;;;;;AAKG;IACH,KAAK;AAEL;;;;;AAKG;IACH,IAAI;AAEJ;;;;;AAKG;IACH,KAAK;AAEL;;;;AAIG;IACH,MAAM;AAEN;;;;;;;AAOG;IACH,GAAG;AAEH;;;;;;AAMG;IACH,GAAG;AAEH;;;;;;;AAOG;IACH,GAAG;AAEH;;;;;;AAMG;IACH,GAAG;AAEH;;;;;;AAMG;IACH,GAAG;;;;;"}
1
+ {"version":3,"file":"non-negative-finite-number.mjs","sources":["../../../src/number/branded-types/non-negative-finite-number.mts"],"sourcesContent":["import {\n type NonNegativeFiniteNumber as TtfImported_NonNegativeFiniteNumber,\n type Uint,\n} from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type NonNegativeFiniteNumber = TtfImported_NonNegativeFiniteNumber;\n\ntype ElementType = NonNegativeFiniteNumber;\n\nconst typeNameInMessage = 'a non-negative finite number';\n\nconst {\n MIN_VALUE,\n add,\n castType,\n clamp,\n div,\n is,\n max: max_,\n min: min_,\n mul,\n pow,\n random,\n sub,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForFloat<\n ElementType,\n 0,\n number\n>({\n MIN_VALUE: 0,\n MAX_VALUE: Number.MAX_VALUE,\n typeNameInMessage,\n} as const);\n\nconst floor = (\n x: ElementType,\n): TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Math.floor(x) as TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>;\n\nconst ceil = (\n x: ElementType,\n): TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Math.ceil(x) as TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>;\n\nconst round = (\n x: ElementType,\n): TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Math.round(x) as TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>;\n\nexpectType<TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>, Uint>(\n '=',\n);\n\n/**\n * Checks if a number is a NonNegativeFiniteNumber (a finite number >= 0).\n *\n * @param value The value to check.\n * @returns `true` if the value is a NonNegativeFiniteNumber, `false` otherwise.\n */\nexport const isNonNegativeFiniteNumber = is;\n\n/**\n * Casts a number to a NonNegativeFiniteNumber type.\n *\n * @param value The value to cast.\n * @returns The value as a NonNegativeFiniteNumber type.\n * @throws {TypeError} If the value is not a non-negative finite number.\n */\nexport const asNonNegativeFiniteNumber = castType;\n\n/**\n * Namespace providing type-safe arithmetic operations for non-negative finite\n * numbers.\n *\n * All operations maintain the non-negative constraint by clamping negative\n * results to 0, while ensuring results remain finite (excluding NaN and\n * Infinity). This type is useful for representing measurements, distances,\n * weights, and other inherently non-negative values.\n */\nexport const NonNegativeFiniteNumber = {\n /**\n * Type guard to check if a value is a NonNegativeFiniteNumber.\n *\n * @param value The value to check.\n * @returns `true` if the value is a non-negative finite number, `false`\n * otherwise.\n */\n is,\n\n /**\n * The minimum value for a non-negative finite number.\n *\n * @readonly\n */\n MIN_VALUE,\n\n /**\n * Returns the smaller of two NonNegativeFiniteNumber values.\n *\n * @param a The first NonNegativeFiniteNumber.\n * @param b The second NonNegativeFiniteNumber.\n * @returns The minimum value as a NonNegativeFiniteNumber.\n */\n min: min_,\n\n /**\n * Returns the larger of two NonNegativeFiniteNumber values.\n *\n * @param a The first NonNegativeFiniteNumber.\n * @param b The second NonNegativeFiniteNumber.\n * @returns The maximum value as a NonNegativeFiniteNumber.\n */\n max: max_,\n\n /**\n * Clamps a number to the non-negative finite range.\n *\n * @param value The number to clamp.\n * @returns The value clamped to [0, +∞) as a NonNegativeFiniteNumber.\n */\n clamp,\n\n /**\n * Rounds down a NonNegativeFiniteNumber to the nearest integer.\n *\n * @param x The NonNegativeFiniteNumber to round down.\n * @returns The floor value as a Uint.\n */\n floor,\n\n /**\n * Rounds up a NonNegativeFiniteNumber to the nearest integer.\n *\n * @param x The NonNegativeFiniteNumber to round up.\n * @returns The ceiling value as a Uint.\n */\n ceil,\n\n /**\n * Rounds a NonNegativeFiniteNumber to the nearest integer.\n *\n * @param x The NonNegativeFiniteNumber to round.\n * @returns The rounded value as a Uint.\n */\n round,\n\n /**\n * Generates a random NonNegativeFiniteNumber value.\n *\n * @returns A random non-negative finite number.\n */\n random,\n\n /**\n * Raises a NonNegativeFiniteNumber to the power of another\n * NonNegativeFiniteNumber.\n *\n * @param a The base NonNegativeFiniteNumber.\n * @param b The exponent NonNegativeFiniteNumber.\n * @returns `a ** b` clamped to [0, +∞) as a NonNegativeFiniteNumber.\n */\n pow,\n\n /**\n * Adds two NonNegativeFiniteNumber values.\n *\n * @param a The first NonNegativeFiniteNumber.\n * @param b The second NonNegativeFiniteNumber.\n * @returns `a + b` clamped to [0, +∞) as a NonNegativeFiniteNumber.\n */\n add,\n\n /**\n * Subtracts one NonNegativeFiniteNumber from another.\n *\n * @param a The minuend NonNegativeFiniteNumber.\n * @param b The subtrahend NonNegativeFiniteNumber.\n * @returns `a - b` clamped to [0, +∞) as a NonNegativeFiniteNumber (minimum\n * 0).\n */\n sub,\n\n /**\n * Multiplies two NonNegativeFiniteNumber values.\n *\n * @param a The first NonNegativeFiniteNumber.\n * @param b The second NonNegativeFiniteNumber.\n * @returns `a * b` clamped to [0, +∞) as a NonNegativeFiniteNumber.\n */\n mul,\n\n /**\n * Divides one NonNegativeFiniteNumber by another.\n *\n * @param a The dividend NonNegativeFiniteNumber.\n * @param b The divisor NonNegativeFiniteNumber.\n * @returns `a / b` clamped to [0, +∞) as a NonNegativeFiniteNumber.\n */\n div,\n} as const;\n\nexpectType<\n keyof typeof NonNegativeFiniteNumber,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'non-negative'\n >\n>('=');\n\nexpectType<\n typeof NonNegativeFiniteNumber,\n TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'non-negative'\n >\n>('<=');\n"],"names":[],"mappings":";;AAWA,MAAM,iBAAA,GAAoB,8BAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA,EAAK,IAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,GAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,iBAAA,CAI1C;AAAA,EACA,SAAA,EAAW,CAAA;AAAA,EACX,WAAW,MAAA,CAAO,SAAA;AAAA,EAClB;AACF,CAAU,CAAA;AAEV,MAAM,QAAQ,CACZ,CAAA;AAAA;AAAA,EAGA,IAAA,CAAK,MAAM,CAAC;AAAA,CAAA;AAEd,MAAM,OAAO,CACX,CAAA;AAAA;AAAA,EAGA,IAAA,CAAK,KAAK,CAAC;AAAA,CAAA;AAEb,MAAM,QAAQ,CACZ,CAAA;AAAA;AAAA,EAGA,IAAA,CAAK,MAAM,CAAC;AAAA,CAAA;AAYP,MAAM,yBAAA,GAA4B;AASlC,MAAM,yBAAA,GAA4B;AAWlC,MAAM,uBAAA,GAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQrC,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA;AACF;;;;"}