type-plus 6.8.1 → 7.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 (531) hide show
  1. package/README.md +1054 -355
  2. package/cjs/array/{array.d.ts → array.at.d.ts} +4 -14
  3. package/cjs/array/array.at.d.ts.map +1 -0
  4. package/cjs/array/{pad_left.js → array.at.js} +1 -1
  5. package/cjs/array/array.at.js.map +1 -0
  6. package/cjs/array/array.concat.d.ts +13 -0
  7. package/cjs/array/array.concat.d.ts.map +1 -0
  8. package/cjs/array/array.concat.js +3 -0
  9. package/cjs/array/array.concat.js.map +1 -0
  10. package/cjs/array/array.entries.d.ts +17 -0
  11. package/cjs/array/array.entries.d.ts.map +1 -0
  12. package/cjs/array/array.entries.js +3 -0
  13. package/cjs/array/array.entries.js.map +1 -0
  14. package/cjs/array/array.find.d.ts +21 -0
  15. package/cjs/array/array.find.d.ts.map +1 -0
  16. package/cjs/array/{find_first.js → array.find.js} +1 -1
  17. package/cjs/array/array.find.js.map +1 -0
  18. package/cjs/array/array.find_last.d.ts +17 -0
  19. package/cjs/array/array.find_last.d.ts.map +1 -0
  20. package/cjs/array/array.find_last.js +3 -0
  21. package/cjs/array/array.find_last.js.map +1 -0
  22. package/cjs/array/array.reverse.d.ts +2 -0
  23. package/cjs/array/array.reverse.d.ts.map +1 -0
  24. package/cjs/array/array.reverse.js +3 -0
  25. package/cjs/array/array.reverse.js.map +1 -0
  26. package/cjs/array/array.some.d.ts +29 -0
  27. package/cjs/array/array.some.d.ts.map +1 -0
  28. package/cjs/array/array.some.js +3 -0
  29. package/cjs/array/array.some.js.map +1 -0
  30. package/cjs/array/array_index.d.ts +8 -8
  31. package/cjs/array/array_index.d.ts.map +1 -1
  32. package/cjs/array/array_plus.d.ts +9 -1
  33. package/cjs/array/array_plus.d.ts.map +1 -1
  34. package/cjs/array/array_plus.split_at.d.ts +30 -0
  35. package/cjs/array/array_plus.split_at.d.ts.map +1 -0
  36. package/cjs/array/array_plus.split_at.js +3 -0
  37. package/cjs/array/array_plus.split_at.js.map +1 -0
  38. package/cjs/array/drop.d.ts +2 -2
  39. package/cjs/array/drop.d.ts.map +1 -1
  40. package/cjs/array/index.d.ts +4 -5
  41. package/cjs/array/index.d.ts.map +1 -1
  42. package/cjs/array/index.js +4 -5
  43. package/cjs/array/index.js.map +1 -1
  44. package/cjs/array/pad_start.d.ts +32 -0
  45. package/cjs/array/pad_start.d.ts.map +1 -0
  46. package/cjs/array/{find_last.js → pad_start.js} +1 -1
  47. package/cjs/array/pad_start.js.map +1 -0
  48. package/cjs/assertion/assert_type.d.ts +3 -0
  49. package/cjs/assertion/assert_type.d.ts.map +1 -1
  50. package/cjs/assertion/assert_type.js +3 -0
  51. package/cjs/assertion/assert_type.js.map +1 -1
  52. package/cjs/bigint/cast.d.ts +10 -0
  53. package/cjs/bigint/cast.d.ts.map +1 -0
  54. package/cjs/{array/some.js → bigint/cast.js} +1 -1
  55. package/cjs/bigint/cast.js.map +1 -0
  56. package/cjs/equal/equal.d.ts +51 -3
  57. package/cjs/equal/equal.d.ts.map +1 -1
  58. package/cjs/functional/Maybe.d.ts +2 -2
  59. package/cjs/functional/Maybe.d.ts.map +1 -1
  60. package/cjs/index.d.ts +16 -7
  61. package/cjs/index.d.ts.map +1 -1
  62. package/cjs/index.js +6 -1
  63. package/cjs/index.js.map +1 -1
  64. package/cjs/math/abs.d.ts +6 -0
  65. package/cjs/math/abs.d.ts.map +1 -0
  66. package/cjs/math/{Add.js → abs.js} +1 -1
  67. package/cjs/math/abs.js.map +1 -0
  68. package/cjs/math/add.d.ts +7 -0
  69. package/cjs/math/add.d.ts.map +1 -0
  70. package/cjs/math/{Max.js → add.js} +1 -1
  71. package/cjs/math/add.js.map +1 -0
  72. package/cjs/math/greater_than.d.ts +4 -0
  73. package/cjs/math/greater_than.d.ts.map +1 -0
  74. package/cjs/math/greater_than.js +3 -0
  75. package/cjs/math/greater_than.js.map +1 -0
  76. package/cjs/math/index.d.ts +6 -6
  77. package/cjs/math/index.d.ts.map +1 -1
  78. package/cjs/math/math_plus.d.ts +5 -0
  79. package/cjs/math/math_plus.d.ts.map +1 -0
  80. package/cjs/math/math_plus.js +3 -0
  81. package/cjs/math/math_plus.js.map +1 -0
  82. package/cjs/math/math_plus.to_negative.d.ts +13 -0
  83. package/cjs/math/math_plus.to_negative.d.ts.map +1 -0
  84. package/cjs/math/math_plus.to_negative.js +3 -0
  85. package/cjs/math/math_plus.to_negative.js.map +1 -0
  86. package/cjs/math/max.d.ts +4 -0
  87. package/cjs/math/max.d.ts.map +1 -0
  88. package/cjs/math/{Abs.js → max.js} +1 -1
  89. package/cjs/math/max.js.map +1 -0
  90. package/cjs/math/multiply.d.ts +6 -0
  91. package/cjs/math/multiply.d.ts.map +1 -0
  92. package/cjs/{array/array.js → math/multiply.js} +1 -1
  93. package/cjs/math/multiply.js.map +1 -0
  94. package/cjs/math/numeric_struct.d.ts +1469 -0
  95. package/cjs/math/numeric_struct.d.ts.map +1 -0
  96. package/cjs/math/numeric_struct.js +3 -0
  97. package/cjs/math/numeric_struct.js.map +1 -0
  98. package/cjs/math/subtract.d.ts +7 -0
  99. package/cjs/math/subtract.d.ts.map +1 -0
  100. package/cjs/math/subtract.js +3 -0
  101. package/cjs/math/subtract.js.map +1 -0
  102. package/cjs/nominal/brand.js +2 -2
  103. package/cjs/nominal/brand.js.map +1 -1
  104. package/cjs/nominal/flavor.js +2 -2
  105. package/cjs/nominal/flavor.js.map +1 -1
  106. package/cjs/number/cast.d.ts +10 -0
  107. package/cjs/number/cast.d.ts.map +1 -0
  108. package/cjs/number/cast.js +3 -0
  109. package/cjs/number/cast.js.map +1 -0
  110. package/cjs/number/number_array.d.ts +0 -2
  111. package/cjs/number/number_array.d.ts.map +1 -1
  112. package/cjs/number/number_array.js +14 -1
  113. package/cjs/number/number_array.js.map +1 -1
  114. package/cjs/number/number_plus.d.ts +4 -5
  115. package/cjs/number/number_plus.d.ts.map +1 -1
  116. package/cjs/number/strict_number_type.d.ts +12 -0
  117. package/cjs/number/strict_number_type.d.ts.map +1 -1
  118. package/cjs/numeric/cast.d.ts +27 -0
  119. package/cjs/numeric/cast.d.ts.map +1 -0
  120. package/cjs/numeric/cast.js +3 -0
  121. package/cjs/numeric/cast.js.map +1 -0
  122. package/{esm/number → cjs/numeric}/integer.d.ts +2 -0
  123. package/cjs/numeric/integer.d.ts.map +1 -0
  124. package/cjs/{number → numeric}/integer.js.map +1 -1
  125. package/cjs/numeric/negative.d.ts.map +1 -0
  126. package/cjs/{number → numeric}/negative.js.map +1 -1
  127. package/cjs/numeric/numeric_plus.d.ts +5 -0
  128. package/cjs/numeric/numeric_plus.d.ts.map +1 -0
  129. package/cjs/numeric/numeric_plus.js +3 -0
  130. package/cjs/numeric/numeric_plus.js.map +1 -0
  131. package/cjs/numeric/numeric_type.d.ts.map +1 -0
  132. package/cjs/{number → numeric}/numeric_type.js.map +1 -1
  133. package/cjs/{number → numeric}/positive.d.ts +2 -2
  134. package/cjs/numeric/positive.d.ts.map +1 -0
  135. package/cjs/{number → numeric}/positive.js.map +1 -1
  136. package/cjs/object/ANotB.d.ts +3 -3
  137. package/cjs/object/ANotB.d.ts.map +1 -1
  138. package/cjs/object/Partial.d.ts +6 -0
  139. package/cjs/object/Partial.d.ts.map +1 -1
  140. package/cjs/object/Required.d.ts +4 -0
  141. package/cjs/object/Required.d.ts.map +1 -1
  142. package/cjs/object/index.d.ts +1 -1
  143. package/cjs/object/index.d.ts.map +1 -1
  144. package/cjs/object/object_type.d.ts +1 -1
  145. package/cjs/object/split.d.ts +3 -1
  146. package/cjs/object/split.d.ts.map +1 -1
  147. package/cjs/object/split.js.map +1 -1
  148. package/cjs/predicates/CanAssign.d.ts +35 -0
  149. package/cjs/predicates/CanAssign.d.ts.map +1 -1
  150. package/cjs/predicates/CanAssign.js.map +1 -1
  151. package/cjs/predicates/Extends.d.ts +2 -2
  152. package/cjs/predicates/Extends.d.ts.map +1 -1
  153. package/cjs/predicates/index.d.ts +0 -1
  154. package/cjs/predicates/index.d.ts.map +1 -1
  155. package/cjs/predicates/index.js +0 -1
  156. package/cjs/predicates/index.js.map +1 -1
  157. package/cjs/testing/test_type.d.ts +125 -50
  158. package/cjs/testing/test_type.d.ts.map +1 -1
  159. package/cjs/testing/test_type.js +4 -141
  160. package/cjs/testing/test_type.js.map +1 -1
  161. package/cjs/tuple/create_tuple.d.ts +28 -0
  162. package/cjs/tuple/create_tuple.d.ts.map +1 -0
  163. package/cjs/{array → tuple}/create_tuple.js.map +1 -1
  164. package/cjs/tuple/tuple_plus.d.ts +2 -0
  165. package/cjs/tuple/tuple_plus.d.ts.map +1 -0
  166. package/cjs/tuple/tuple_plus.js +18 -0
  167. package/cjs/tuple/tuple_plus.js.map +1 -0
  168. package/cjs/tuple/tuple_plus.pad_start.d.ts +22 -0
  169. package/cjs/tuple/tuple_plus.pad_start.d.ts.map +1 -0
  170. package/cjs/tuple/tuple_plus.pad_start.js +3 -0
  171. package/cjs/tuple/tuple_plus.pad_start.js.map +1 -0
  172. package/cjs/{predicates/isType.d.ts → type-guard/is_type.d.ts} +5 -3
  173. package/cjs/type-guard/is_type.d.ts.map +1 -0
  174. package/cjs/{predicates/isType.js → type-guard/is_type.js} +8 -2
  175. package/cjs/type-guard/is_type.js.map +1 -0
  176. package/esm/array/{array.d.ts → array.at.d.ts} +4 -14
  177. package/esm/array/array.at.d.ts.map +1 -0
  178. package/esm/array/array.at.js +2 -0
  179. package/esm/array/array.at.js.map +1 -0
  180. package/esm/array/array.concat.d.ts +13 -0
  181. package/esm/array/array.concat.d.ts.map +1 -0
  182. package/esm/array/array.concat.js +2 -0
  183. package/esm/array/array.concat.js.map +1 -0
  184. package/esm/array/array.entries.d.ts +17 -0
  185. package/esm/array/array.entries.d.ts.map +1 -0
  186. package/esm/array/array.entries.js +2 -0
  187. package/esm/array/array.entries.js.map +1 -0
  188. package/esm/array/array.find.d.ts +21 -0
  189. package/esm/array/array.find.d.ts.map +1 -0
  190. package/esm/array/array.find.js +2 -0
  191. package/esm/array/array.find.js.map +1 -0
  192. package/esm/array/array.find_last.d.ts +17 -0
  193. package/esm/array/array.find_last.d.ts.map +1 -0
  194. package/esm/array/array.find_last.js +2 -0
  195. package/esm/array/array.find_last.js.map +1 -0
  196. package/esm/array/array.reverse.d.ts +2 -0
  197. package/esm/array/array.reverse.d.ts.map +1 -0
  198. package/esm/array/array.reverse.js +2 -0
  199. package/esm/array/array.reverse.js.map +1 -0
  200. package/esm/array/array.some.d.ts +29 -0
  201. package/esm/array/array.some.d.ts.map +1 -0
  202. package/esm/array/array.some.js +2 -0
  203. package/esm/array/array.some.js.map +1 -0
  204. package/esm/array/array_index.d.ts +8 -8
  205. package/esm/array/array_index.d.ts.map +1 -1
  206. package/esm/array/array_plus.d.ts +9 -1
  207. package/esm/array/array_plus.d.ts.map +1 -1
  208. package/esm/array/array_plus.split_at.d.ts +30 -0
  209. package/esm/array/array_plus.split_at.d.ts.map +1 -0
  210. package/esm/array/array_plus.split_at.js +2 -0
  211. package/esm/array/array_plus.split_at.js.map +1 -0
  212. package/esm/array/drop.d.ts +2 -2
  213. package/esm/array/drop.d.ts.map +1 -1
  214. package/esm/array/index.d.ts +4 -5
  215. package/esm/array/index.d.ts.map +1 -1
  216. package/esm/array/index.js +4 -5
  217. package/esm/array/index.js.map +1 -1
  218. package/esm/array/pad_start.d.ts +32 -0
  219. package/esm/array/pad_start.d.ts.map +1 -0
  220. package/esm/array/pad_start.js +2 -0
  221. package/esm/array/pad_start.js.map +1 -0
  222. package/esm/assertion/assert_type.d.ts +3 -0
  223. package/esm/assertion/assert_type.d.ts.map +1 -1
  224. package/esm/assertion/assert_type.js +3 -0
  225. package/esm/assertion/assert_type.js.map +1 -1
  226. package/esm/bigint/cast.d.ts +10 -0
  227. package/esm/bigint/cast.d.ts.map +1 -0
  228. package/esm/bigint/cast.js +2 -0
  229. package/esm/bigint/cast.js.map +1 -0
  230. package/esm/equal/equal.d.ts +51 -3
  231. package/esm/equal/equal.d.ts.map +1 -1
  232. package/esm/functional/Maybe.d.ts +2 -2
  233. package/esm/functional/Maybe.d.ts.map +1 -1
  234. package/esm/index.d.ts +16 -7
  235. package/esm/index.d.ts.map +1 -1
  236. package/esm/index.js +5 -0
  237. package/esm/index.js.map +1 -1
  238. package/esm/math/abs.d.ts +6 -0
  239. package/esm/math/abs.d.ts.map +1 -0
  240. package/esm/math/abs.js +2 -0
  241. package/esm/math/abs.js.map +1 -0
  242. package/esm/math/add.d.ts +7 -0
  243. package/esm/math/add.d.ts.map +1 -0
  244. package/esm/math/add.js +2 -0
  245. package/esm/math/add.js.map +1 -0
  246. package/esm/math/greater_than.d.ts +4 -0
  247. package/esm/math/greater_than.d.ts.map +1 -0
  248. package/esm/math/greater_than.js +2 -0
  249. package/esm/math/greater_than.js.map +1 -0
  250. package/esm/math/index.d.ts +6 -6
  251. package/esm/math/index.d.ts.map +1 -1
  252. package/esm/math/math_plus.d.ts +5 -0
  253. package/esm/math/math_plus.d.ts.map +1 -0
  254. package/esm/math/math_plus.js +2 -0
  255. package/esm/math/math_plus.js.map +1 -0
  256. package/esm/math/math_plus.to_negative.d.ts +13 -0
  257. package/esm/math/math_plus.to_negative.d.ts.map +1 -0
  258. package/esm/math/math_plus.to_negative.js +2 -0
  259. package/esm/math/math_plus.to_negative.js.map +1 -0
  260. package/esm/math/max.d.ts +4 -0
  261. package/esm/math/max.d.ts.map +1 -0
  262. package/esm/math/max.js +2 -0
  263. package/esm/math/max.js.map +1 -0
  264. package/esm/math/multiply.d.ts +6 -0
  265. package/esm/math/multiply.d.ts.map +1 -0
  266. package/esm/math/multiply.js +2 -0
  267. package/esm/math/multiply.js.map +1 -0
  268. package/esm/math/numeric_struct.d.ts +1469 -0
  269. package/esm/math/numeric_struct.d.ts.map +1 -0
  270. package/esm/math/numeric_struct.js +2 -0
  271. package/esm/math/numeric_struct.js.map +1 -0
  272. package/esm/math/subtract.d.ts +7 -0
  273. package/esm/math/subtract.d.ts.map +1 -0
  274. package/esm/math/subtract.js +2 -0
  275. package/esm/math/subtract.js.map +1 -0
  276. package/esm/nominal/brand.js +1 -1
  277. package/esm/nominal/brand.js.map +1 -1
  278. package/esm/nominal/flavor.js +1 -1
  279. package/esm/nominal/flavor.js.map +1 -1
  280. package/esm/number/cast.d.ts +10 -0
  281. package/esm/number/cast.d.ts.map +1 -0
  282. package/esm/number/cast.js +2 -0
  283. package/esm/number/cast.js.map +1 -0
  284. package/esm/number/number_array.d.ts +1 -2
  285. package/esm/number/number_array.d.ts.map +1 -1
  286. package/esm/number/number_array.js +14 -0
  287. package/esm/number/number_array.js.map +1 -1
  288. package/esm/number/number_plus.d.ts +4 -5
  289. package/esm/number/number_plus.d.ts.map +1 -1
  290. package/esm/number/strict_number_type.d.ts +12 -0
  291. package/esm/number/strict_number_type.d.ts.map +1 -1
  292. package/esm/numeric/cast.d.ts +27 -0
  293. package/esm/numeric/cast.d.ts.map +1 -0
  294. package/esm/numeric/cast.js +2 -0
  295. package/esm/numeric/cast.js.map +1 -0
  296. package/{cjs/number → esm/numeric}/integer.d.ts +2 -0
  297. package/esm/numeric/integer.d.ts.map +1 -0
  298. package/esm/{number → numeric}/integer.js.map +1 -1
  299. package/esm/numeric/negative.d.ts.map +1 -0
  300. package/esm/{number → numeric}/negative.js.map +1 -1
  301. package/esm/numeric/numeric_plus.d.ts +5 -0
  302. package/esm/numeric/numeric_plus.d.ts.map +1 -0
  303. package/esm/numeric/numeric_plus.js +2 -0
  304. package/esm/numeric/numeric_plus.js.map +1 -0
  305. package/esm/numeric/numeric_type.d.ts.map +1 -0
  306. package/esm/{number → numeric}/numeric_type.js.map +1 -1
  307. package/esm/{number → numeric}/positive.d.ts +2 -2
  308. package/esm/numeric/positive.d.ts.map +1 -0
  309. package/esm/{number → numeric}/positive.js.map +1 -1
  310. package/esm/object/ANotB.d.ts +3 -3
  311. package/esm/object/ANotB.d.ts.map +1 -1
  312. package/esm/object/Partial.d.ts +6 -0
  313. package/esm/object/Partial.d.ts.map +1 -1
  314. package/esm/object/Required.d.ts +4 -0
  315. package/esm/object/Required.d.ts.map +1 -1
  316. package/esm/object/index.d.ts +1 -1
  317. package/esm/object/index.d.ts.map +1 -1
  318. package/esm/object/object_type.d.ts +1 -1
  319. package/esm/object/split.d.ts +3 -1
  320. package/esm/object/split.d.ts.map +1 -1
  321. package/esm/object/split.js.map +1 -1
  322. package/esm/predicates/CanAssign.d.ts +35 -0
  323. package/esm/predicates/CanAssign.d.ts.map +1 -1
  324. package/esm/predicates/CanAssign.js.map +1 -1
  325. package/esm/predicates/Extends.d.ts +2 -2
  326. package/esm/predicates/Extends.d.ts.map +1 -1
  327. package/esm/predicates/index.d.ts +0 -1
  328. package/esm/predicates/index.d.ts.map +1 -1
  329. package/esm/predicates/index.js +0 -1
  330. package/esm/predicates/index.js.map +1 -1
  331. package/esm/testing/test_type.d.ts +125 -50
  332. package/esm/testing/test_type.d.ts.map +1 -1
  333. package/esm/testing/test_type.js +4 -141
  334. package/esm/testing/test_type.js.map +1 -1
  335. package/esm/tuple/create_tuple.d.ts +28 -0
  336. package/esm/tuple/create_tuple.d.ts.map +1 -0
  337. package/esm/{array → tuple}/create_tuple.js.map +1 -1
  338. package/esm/tuple/tuple_plus.d.ts +2 -0
  339. package/esm/tuple/tuple_plus.d.ts.map +1 -0
  340. package/esm/tuple/tuple_plus.js +2 -0
  341. package/esm/tuple/tuple_plus.js.map +1 -0
  342. package/esm/tuple/tuple_plus.pad_start.d.ts +22 -0
  343. package/esm/tuple/tuple_plus.pad_start.d.ts.map +1 -0
  344. package/esm/tuple/tuple_plus.pad_start.js +2 -0
  345. package/esm/tuple/tuple_plus.pad_start.js.map +1 -0
  346. package/esm/{predicates/isType.d.ts → type-guard/is_type.d.ts} +5 -3
  347. package/esm/type-guard/is_type.d.ts.map +1 -0
  348. package/esm/{predicates/isType.js → type-guard/is_type.js} +8 -2
  349. package/esm/type-guard/is_type.js.map +1 -0
  350. package/package.json +1 -1
  351. package/ts/array/{array.ts → array.at.ts} +10 -15
  352. package/ts/array/array.concat.ts +12 -0
  353. package/ts/array/array.entries.ts +24 -0
  354. package/ts/array/array.find.ts +32 -0
  355. package/ts/array/array.find_last.ts +27 -0
  356. package/ts/array/array.reverse.ts +16 -0
  357. package/ts/array/array.some.ts +53 -0
  358. package/ts/array/array_index.ts +16 -10
  359. package/ts/array/array_plus.split_at.ts +47 -0
  360. package/ts/array/array_plus.ts +9 -1
  361. package/ts/array/drop.ts +2 -2
  362. package/ts/array/index.ts +4 -5
  363. package/ts/array/pad_start.ts +43 -0
  364. package/ts/array/readme.md +184 -4
  365. package/ts/assertion/assert_type.ts +6 -0
  366. package/ts/assertion/readme.md +132 -1
  367. package/ts/bigint/cast.ts +13 -0
  368. package/ts/bigint/readme.md +17 -17
  369. package/ts/equal/equal.ts +53 -3
  370. package/ts/equal/readme.md +30 -16
  371. package/ts/functional/Maybe.ts +2 -2
  372. package/ts/index.ts +22 -24
  373. package/ts/math/README.md +97 -7
  374. package/ts/math/abs.ts +18 -0
  375. package/ts/math/add.ts +14 -0
  376. package/ts/math/greater_than.ts +12 -0
  377. package/ts/math/index.ts +7 -6
  378. package/ts/math/math_plus.to_negative.ts +22 -0
  379. package/ts/math/math_plus.ts +4 -0
  380. package/ts/math/max.ts +13 -0
  381. package/ts/math/multiply.ts +12 -0
  382. package/ts/math/numeric_struct.ts +658 -0
  383. package/ts/math/subtract.ts +14 -0
  384. package/ts/nominal/brand.ts +1 -1
  385. package/ts/nominal/flavor.ts +1 -1
  386. package/ts/number/cast.ts +17 -0
  387. package/ts/number/number_array.ts +14 -14
  388. package/ts/number/number_plus.ts +6 -6
  389. package/ts/number/readme.md +0 -108
  390. package/ts/number/strict_number_type.ts +12 -0
  391. package/ts/numeric/cast.ts +28 -0
  392. package/ts/{number → numeric}/integer.ts +2 -0
  393. package/ts/numeric/numeric_plus.ts +12 -0
  394. package/ts/{number → numeric}/positive.ts +2 -2
  395. package/ts/numeric/readme.md +115 -0
  396. package/ts/object/ANotB.ts +3 -3
  397. package/ts/object/Partial.ts +5 -0
  398. package/ts/object/Required.ts +4 -0
  399. package/ts/object/index.ts +1 -1
  400. package/ts/object/object_type.ts +1 -1
  401. package/ts/object/split.ts +3 -1
  402. package/ts/predicates/CanAssign.ts +46 -0
  403. package/ts/predicates/Extends.ts +2 -2
  404. package/ts/predicates/index.ts +0 -1
  405. package/ts/testing/test_type.ts +131 -88
  406. package/ts/tuple/create_tuple.ts +42 -0
  407. package/ts/tuple/tuple_plus.pad_start.ts +42 -0
  408. package/ts/tuple/tuple_plus.ts +1 -0
  409. package/ts/{predicates/isType.ts → type-guard/is_type.ts} +11 -3
  410. package/ts/type-guard/readme.md +37 -0
  411. package/cjs/array/array.d.ts.map +0 -1
  412. package/cjs/array/array.js.map +0 -1
  413. package/cjs/array/create_tuple.d.ts +0 -11
  414. package/cjs/array/create_tuple.d.ts.map +0 -1
  415. package/cjs/array/find_first.d.ts +0 -6
  416. package/cjs/array/find_first.d.ts.map +0 -1
  417. package/cjs/array/find_first.js.map +0 -1
  418. package/cjs/array/find_last.d.ts +0 -2
  419. package/cjs/array/find_last.d.ts.map +0 -1
  420. package/cjs/array/find_last.js.map +0 -1
  421. package/cjs/array/pad_left.d.ts +0 -6
  422. package/cjs/array/pad_left.d.ts.map +0 -1
  423. package/cjs/array/pad_left.js.map +0 -1
  424. package/cjs/array/some.d.ts +0 -8
  425. package/cjs/array/some.d.ts.map +0 -1
  426. package/cjs/array/some.js.map +0 -1
  427. package/cjs/math/Abs.d.ts +0 -3
  428. package/cjs/math/Abs.d.ts.map +0 -1
  429. package/cjs/math/Abs.js.map +0 -1
  430. package/cjs/math/Add.d.ts +0 -19
  431. package/cjs/math/Add.d.ts.map +0 -1
  432. package/cjs/math/Add.js.map +0 -1
  433. package/cjs/math/Digit.d.ts +0 -100
  434. package/cjs/math/Digit.d.ts.map +0 -1
  435. package/cjs/math/Digit.js +0 -3
  436. package/cjs/math/Digit.js.map +0 -1
  437. package/cjs/math/GreaterThan.d.ts +0 -13
  438. package/cjs/math/GreaterThan.d.ts.map +0 -1
  439. package/cjs/math/GreaterThan.js +0 -3
  440. package/cjs/math/GreaterThan.js.map +0 -1
  441. package/cjs/math/Max.d.ts +0 -4
  442. package/cjs/math/Max.d.ts.map +0 -1
  443. package/cjs/math/Max.js.map +0 -1
  444. package/cjs/math/Subtract.d.ts +0 -19
  445. package/cjs/math/Subtract.d.ts.map +0 -1
  446. package/cjs/math/Subtract.js +0 -3
  447. package/cjs/math/Subtract.js.map +0 -1
  448. package/cjs/number/integer.d.ts.map +0 -1
  449. package/cjs/number/negative.d.ts.map +0 -1
  450. package/cjs/number/numeric_type.d.ts.map +0 -1
  451. package/cjs/number/positive.d.ts.map +0 -1
  452. package/cjs/predicates/isType.d.ts.map +0 -1
  453. package/cjs/predicates/isType.js.map +0 -1
  454. package/esm/array/array.d.ts.map +0 -1
  455. package/esm/array/array.js +0 -2
  456. package/esm/array/array.js.map +0 -1
  457. package/esm/array/create_tuple.d.ts +0 -11
  458. package/esm/array/create_tuple.d.ts.map +0 -1
  459. package/esm/array/find_first.d.ts +0 -6
  460. package/esm/array/find_first.d.ts.map +0 -1
  461. package/esm/array/find_first.js +0 -2
  462. package/esm/array/find_first.js.map +0 -1
  463. package/esm/array/find_last.d.ts +0 -2
  464. package/esm/array/find_last.d.ts.map +0 -1
  465. package/esm/array/find_last.js +0 -2
  466. package/esm/array/find_last.js.map +0 -1
  467. package/esm/array/pad_left.d.ts +0 -6
  468. package/esm/array/pad_left.d.ts.map +0 -1
  469. package/esm/array/pad_left.js +0 -2
  470. package/esm/array/pad_left.js.map +0 -1
  471. package/esm/array/some.d.ts +0 -8
  472. package/esm/array/some.d.ts.map +0 -1
  473. package/esm/array/some.js +0 -2
  474. package/esm/array/some.js.map +0 -1
  475. package/esm/math/Abs.d.ts +0 -3
  476. package/esm/math/Abs.d.ts.map +0 -1
  477. package/esm/math/Abs.js +0 -2
  478. package/esm/math/Abs.js.map +0 -1
  479. package/esm/math/Add.d.ts +0 -19
  480. package/esm/math/Add.d.ts.map +0 -1
  481. package/esm/math/Add.js +0 -2
  482. package/esm/math/Add.js.map +0 -1
  483. package/esm/math/Digit.d.ts +0 -100
  484. package/esm/math/Digit.d.ts.map +0 -1
  485. package/esm/math/Digit.js +0 -2
  486. package/esm/math/Digit.js.map +0 -1
  487. package/esm/math/GreaterThan.d.ts +0 -13
  488. package/esm/math/GreaterThan.d.ts.map +0 -1
  489. package/esm/math/GreaterThan.js +0 -2
  490. package/esm/math/GreaterThan.js.map +0 -1
  491. package/esm/math/Max.d.ts +0 -4
  492. package/esm/math/Max.d.ts.map +0 -1
  493. package/esm/math/Max.js +0 -2
  494. package/esm/math/Max.js.map +0 -1
  495. package/esm/math/Subtract.d.ts +0 -19
  496. package/esm/math/Subtract.d.ts.map +0 -1
  497. package/esm/math/Subtract.js +0 -2
  498. package/esm/math/Subtract.js.map +0 -1
  499. package/esm/number/integer.d.ts.map +0 -1
  500. package/esm/number/negative.d.ts.map +0 -1
  501. package/esm/number/numeric_type.d.ts.map +0 -1
  502. package/esm/number/positive.d.ts.map +0 -1
  503. package/esm/predicates/isType.d.ts.map +0 -1
  504. package/esm/predicates/isType.js.map +0 -1
  505. package/ts/array/create_tuple.ts +0 -17
  506. package/ts/array/find_first.ts +0 -16
  507. package/ts/array/find_last.ts +0 -11
  508. package/ts/array/pad_left.ts +0 -16
  509. package/ts/array/some.ts +0 -33
  510. package/ts/math/Abs.ts +0 -7
  511. package/ts/math/Add.ts +0 -58
  512. package/ts/math/Digit.ts +0 -152
  513. package/ts/math/GreaterThan.ts +0 -55
  514. package/ts/math/Max.ts +0 -10
  515. package/ts/math/Subtract.ts +0 -57
  516. /package/cjs/{number → numeric}/integer.js +0 -0
  517. /package/cjs/{number → numeric}/negative.d.ts +0 -0
  518. /package/cjs/{number → numeric}/negative.js +0 -0
  519. /package/cjs/{number → numeric}/numeric_type.d.ts +0 -0
  520. /package/cjs/{number → numeric}/numeric_type.js +0 -0
  521. /package/cjs/{number → numeric}/positive.js +0 -0
  522. /package/cjs/{array → tuple}/create_tuple.js +0 -0
  523. /package/esm/{number → numeric}/integer.js +0 -0
  524. /package/esm/{number → numeric}/negative.d.ts +0 -0
  525. /package/esm/{number → numeric}/negative.js +0 -0
  526. /package/esm/{number → numeric}/numeric_type.d.ts +0 -0
  527. /package/esm/{number → numeric}/numeric_type.js +0 -0
  528. /package/esm/{number → numeric}/positive.js +0 -0
  529. /package/esm/{array → tuple}/create_tuple.js +0 -0
  530. /package/ts/{number → numeric}/negative.ts +0 -0
  531. /package/ts/{number → numeric}/numeric_type.ts +0 -0
@@ -1,181 +1,224 @@
1
1
  import type { IsAny } from '../any/any_type.js'
2
+ import type { IsArray } from '../array/array_type.js'
2
3
  import type { IsBigint } from '../bigint/bigint_type.js'
3
4
  import type { IsStrictBigint } from '../bigint/strict_bigint_type.js'
4
5
  import type { IsBoolean } from '../boolean/boolean_type.js'
5
6
  import type { IsFalse } from '../boolean/false_type.js'
6
7
  import type { IsStrictBoolean } from '../boolean/strict_boolean_type.js'
7
8
  import type { IsTrue } from '../boolean/true_type.js'
8
- import type { Equal } from '../equal/equal.js'
9
+ import type { IsEqual } from '../equal/equal.js'
10
+ import type { IsFunction } from '../function/function_type.js'
11
+ import type { IsStrictFunction } from '../function/strict_function_type.js'
9
12
  import type { IsNever } from '../never/never_type.js'
10
13
  import type { IsNull } from '../null/null_type.js'
11
14
  import type { IsNumber } from '../number/number_type.js'
12
15
  import type { IsStrictNumber } from '../number/strict_number_type.js'
13
- import type { CanAssign } from '../predicates/CanAssign.js'
16
+ import type { IsObject } from '../object/object_type.js'
17
+ import type { CanAssign, StrictCanAssign } from '../predicates/CanAssign.js'
14
18
  import type { IsStrictString } from '../string/strict_string_type.js'
15
19
  import type { IsString } from '../string/string_type.js'
20
+ import type { IsSymbol } from '../symbol/symbol_type.js'
21
+ import type { IsTuple } from '../tuple/tuple_type.js'
16
22
  import type { IsUndefined } from '../undefined/undefined_type.js'
17
23
  import type { IsUnknown } from '../unknown/unknown_type.js'
18
24
  import type { IsVoid } from '../void/void_type.js'
19
25
 
20
- /**
21
- * Check if type `A` is equal to type `B` and `C`.
22
- *
23
- * @return `expected` as `A` for type inspection.
24
- */
25
- function equal<A, B, C>(expected: Equal<A, B> & Equal<A, C>): A
26
- /**
27
- * Check if type `A` is equal to type `B`.
28
- *
29
- * @return `expected` as `A` for type inspection.
30
- */
31
- function equal<A, B>(expected: Equal<A, B>): A
32
- function equal(expected: unknown) {
33
- return expected
34
- }
35
-
36
- /**
37
- * Test utilities for types.
38
- *
39
- * This is designed specifically for testing.
40
- * The return value is the input `expected` parameter asserted as the first type parameter,
41
- * so that the type can be further inspected.
42
- */
43
- export const testType = {
26
+ interface TestType {
44
27
  /**
45
- * Check if type `T` is exactly `any`.
28
+ * Check if type `A` is equal to type `B` and `C`.
46
29
  *
47
- * @return `expected` as `T` for type inspection.
30
+ * @return `expected` as `A` for type inspection.
48
31
  */
49
- any<T>(expected: IsAny<T>) {
50
- return expected as T
51
- },
32
+ equal<A, B, C>(expected: IsEqual<A, B> & IsEqual<A, C>): A
52
33
  /**
53
- * Check if type `T` is exactly `unknown`.
34
+ * Check if type `A` is equal to type `B`.
35
+ *
36
+ * @return `expected` as `A` for type inspection.
37
+ */
38
+ equal<A, B>(expected: IsEqual<A, B>): A
39
+ /**
40
+ * Check if `A` can assign to `B`.
41
+ *
42
+ * If `A` is a union,
43
+ * the check is distributive.
44
+ *
45
+ * Meaning the result can be `boolean`,
46
+ * meaning both `true` and `false` will pass.
47
+ *
48
+ * If you want to avoid the distributivity,
49
+ * use `testType.strictCanAssign()` instead.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * testType.canAssign<123, number> // true
54
+ *
55
+ * testType.canAssign<number | string, number> // boolean
56
+ * ```
57
+ *
58
+ * @return `expected` as `A` for type inspection.
59
+ */
60
+ canAssign<A, B>(expected: CanAssign<A, B>): A
61
+ /**
62
+ * Check if `A` can fully assign to `B`.
63
+ *
64
+ * This checks all branches in an union `A` are assignable to `B`.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * testType.strictCanAssign<number | string, number | string> // true
69
+ *
70
+ * testType.strictCanAssign<number | string, number> // false
71
+ * ```
72
+ *
73
+ * @return `expected` as `A` for type inspection.
74
+ */
75
+ strictCanAssign<A, B>(expected: StrictCanAssign<A, B>): A
76
+ /**
77
+ * Check if type `T` is exactly `any`.
54
78
  *
55
79
  * @return `expected` as `T` for type inspection.
56
80
  */
57
- unknown<T>(expected: IsUnknown<T>) {
58
- return expected as T
59
- },
81
+ any<T>(expected: IsAny<T>): T
60
82
  /**
61
- * Check if type `T` is exactly `never`.
83
+ * Check if type `T` is exactly `array`.
62
84
  *
63
85
  * @return `expected` as `T` for type inspection.
64
86
  */
65
- never<T>(expected: IsNever<T>) {
66
- return expected as T
67
- },
87
+ array<T>(expected: IsArray<T>): T
68
88
  /**
69
- * Check if type `T` is exactly `void`.
89
+ * Check if type `T` is exactly `bigint`.
70
90
  *
71
91
  * @return `expected` as `T` for type inspection.
72
92
  */
73
- void<T>(expected: IsVoid<T>) {
74
- return expected as T
75
- },
76
- equal,
93
+ strictBigint<T>(expected: IsStrictBigint<T>): T
77
94
  /**
78
- * Check if `A` can assign to `B`.
95
+ * Check if type `T` is `bigint` or bigint literals.
79
96
  *
80
- * @return `expected` as `A` for type inspection.
97
+ * @return `expected` as `T` for type inspection.
81
98
  */
82
- canAssign<A, B>(expected: CanAssign<A, B>) {
83
- return expected as A
84
- },
99
+ bigint<T>(expected: IsBigint<T>): T
85
100
  /**
86
101
  * Check if type `T` is exactly `boolean`.
87
102
  *
88
103
  * @return `expected` as `T` for type inspection.
89
104
  */
90
- strictBoolean<T>(expected: IsStrictBoolean<T>) {
91
- return expected as T
92
- },
105
+ strictBoolean<T>(expected: IsStrictBoolean<T>): T
93
106
  /**
94
107
  * Check if type `T` is `boolean` and boolean literals.
95
108
  *
96
109
  * @return `expected` as `T` for type inspection.
97
110
  */
98
- boolean<T>(expected: IsBoolean<T>) {
99
- return expected as T
100
- },
111
+ boolean<T>(expected: IsBoolean<T>): T
101
112
  /**
102
113
  * Check if type `T` is exactly `true`.
103
114
  *
104
115
  * @return `expected` as `T` for type inspection.
105
116
  */
106
- true<T>(expected: IsTrue<T>) {
107
- return expected as T
108
- },
117
+ true<T>(expected: IsTrue<T>): T
109
118
  /**
110
119
  * Check if type `T` is exactly `false`.
111
120
  *
112
121
  * @return `expected` as `T` for type inspection.
113
122
  */
114
- false<T>(expected: IsFalse<T>) {
115
- return expected as T
116
- },
123
+ false<T>(expected: IsFalse<T>): T
124
+ /**
125
+ * Check if type `T` is exactly `boolean`.
126
+ *
127
+ * @return `expected` as `T` for type inspection.
128
+ */
129
+ strictFunction<T>(expected: IsStrictFunction<T>): T
130
+ /**
131
+ * Check if type `T` is `boolean` and boolean literals.
132
+ *
133
+ * @return `expected` as `T` for type inspection.
134
+ */
135
+ function<T>(expected: IsFunction<T>): T
136
+ /**
137
+ * Check if type `T` is exactly `never`.
138
+ *
139
+ * @return `expected` as `T` for type inspection.
140
+ */
141
+ never<T>(expected: IsNever<T>): T
142
+ /**
143
+ * Check if type `T` is exactly `null`.
144
+ *
145
+ * @return `expected` as `T` for type inspection.
146
+ */
147
+ null<T>(expected: IsNull<T>): T
117
148
  /**
118
149
  * Check if type `T` is exactly `number`.
119
150
  *
120
151
  * @return `expected` as `T` for type inspection.
121
152
  */
122
- strictNumber<T>(expected: IsStrictNumber<T>) {
123
- return expected as T
124
- },
153
+ strictNumber<T>(expected: IsStrictNumber<T>): T
125
154
  /**
126
155
  * Check if type `T` is `number` or number literals.
127
156
  *
128
157
  * @return `expected` as `T` for type inspection.
129
158
  */
130
- number<T>(expected: IsNumber<T>) {
131
- return expected as T
132
- },
159
+ number<T>(expected: IsNumber<T>): T
160
+ /**
161
+ * Check if type `T` is `object`.
162
+ *
163
+ * Note that `Function`, `Array`, and *tuple* are also `object`.
164
+ *
165
+ * @return `expected` as `T` for type inspection.
166
+ */
167
+ object<T>(expected: IsObject<T>): T
133
168
  /**
134
169
  * Check if type `T` is exactly `string`.
135
170
  *
136
171
  * @return `expected` as `T` for type inspection.
137
172
  */
138
- strictString<T>(expected: IsStrictString<T>) {
139
- return expected as T
140
- },
173
+ strictString<T>(expected: IsStrictString<T>): T
141
174
  /**
142
175
  * Check if type `T` is `string` or string literals.
143
176
  *
144
177
  * @return `expected` as `T` for type inspection.
145
178
  */
146
- string<T>(expected: IsString<T>) {
147
- return expected as T
148
- },
179
+ string<T>(expected: IsString<T>): T
149
180
  /**
150
- * Check if type `T` is exactly `bigint`.
181
+ * Check if type `T` is a `symbol`.
151
182
  *
152
183
  * @return `expected` as `T` for type inspection.
153
184
  */
154
- strictBigint<T>(expected: IsStrictBigint<T>) {
155
- return expected as T
156
- },
185
+ symbol<T>(expected: IsSymbol<T>): T
157
186
  /**
158
- * Check if type `T` is `bigint` or bigint literals.
187
+ * Check if type `T` is a *tuple*.
159
188
  *
160
189
  * @return `expected` as `T` for type inspection.
161
190
  */
162
- bigint<T>(expected: IsBigint<T>) {
163
- return expected as T
164
- },
191
+ tuple<T>(expected: IsTuple<T>): T
165
192
  /**
166
193
  * Check if type `T` is exactly `undefined`.
167
194
  *
168
195
  * @return `expected` as `T` for type inspection.
169
196
  */
170
- undefined<T>(expected: IsUndefined<T>) {
171
- return expected as T
172
- },
197
+ undefined<T>(expected: IsUndefined<T>): T
198
+ // hasUndefined<T>(expected: CanAssign<T, undefined>): T
173
199
  /**
174
- * Check if type `T` is exactly `null`.
200
+ * Check if type `T` is exactly `unknown`.
175
201
  *
176
202
  * @return `expected` as `T` for type inspection.
177
203
  */
178
- null<T>(expected: IsNull<T>) {
179
- return expected as T
180
- }
204
+ unknown<T>(expected: IsUnknown<T>): T
205
+ /**
206
+ * Check if type `T` is exactly `void`.
207
+ *
208
+ * @return `expected` as `T` for type inspection.
209
+ */
210
+ void<T>(expected: IsVoid<T>): T
181
211
  }
212
+
213
+ /**
214
+ * Test utilities for types.
215
+ *
216
+ * This is designed specifically for testing.
217
+ * The return value is the input `expected` parameter asserted as the first type parameter,
218
+ * so that the type can be further inspected.
219
+ */
220
+ export const testType = new Proxy({} as TestType, {
221
+ get(_target, _prop, _receiver) {
222
+ return (expected: unknown) => expected
223
+ }
224
+ })
@@ -0,0 +1,42 @@
1
+ import type { DigitArray } from '../math/numeric_struct.js'
2
+ import type { IsInteger } from '../numeric/integer.js'
3
+ import type { IsPositive } from '../numeric/positive.js'
4
+
5
+ /**
6
+ * Creates `Tuple<T>` with `L` number of elements.
7
+ * @note Other cool implementations by @lazytype, @jcalz:
8
+ * @see https://github.com/microsoft/TypeScript/issues/26223#issuecomment-674514787
9
+ * @see https://github.com/microsoft/TypeScript/issues/47874#issuecomment-1039157322
10
+ */
11
+ export type CreateTuple<L extends number, T = unknown, Fail = never> = number extends L
12
+ ? T[]
13
+ : IsPositive<L> extends true
14
+ ? IsInteger<L> extends true
15
+ ? ToTuple<[], DigitArray.FromString<`${L}`>, T>
16
+ : Fail
17
+ : Fail
18
+ export type ToTuple<R extends any[], S extends number[], X = any> = S['length'] extends 0
19
+ ? R
20
+ : S['length'] extends 1
21
+ ? [...R, ...DigitToTuple<X>[S[0]]]
22
+ : S extends [any, ...infer T]
23
+ ? T extends any[]
24
+ ? ToTuple<Multi10<[...R, ...DigitToTuple<X>[S[0]]]>, T>
25
+ : never
26
+ : never
27
+
28
+ type DigitToTuple<T = 1> = {
29
+ [k in number]: any[]
30
+ } & {
31
+ 0: []
32
+ 1: [T]
33
+ 2: [T, T]
34
+ 3: [T, T, T]
35
+ 4: [T, T, T, T]
36
+ 5: [T, T, T, T, T]
37
+ 6: [T, T, T, T, T, T]
38
+ 7: [T, T, T, T, T, T, T]
39
+ 8: [T, T, T, T, T, T, T, T]
40
+ 9: [T, T, T, T, T, T, T, T, T]
41
+ }
42
+ type Multi10<C extends any[]> = [...C, ...C, ...C, ...C, ...C, ...C, ...C, ...C, ...C, ...C]
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Pads the start of a tuple with `PadWith`.
3
+ *
4
+ * If the `MaxLength` is less than the length of the tuple,
5
+ * the `Tuple` will be returned unchanged.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * PadStart<[1, 2, 3], 5, 0> // [0, 0, 1, 2, 3]
10
+ *
11
+ * // Ignore if MaxLength is less than the length of the tuple
12
+ * PadStart<[1, 2, 3], 5, 0> // [0, 0, 1, 2, 3]
13
+ *
14
+ * // Default to unknown
15
+ * PadStart<[1, 2, 3], 5> // [unknown, unknown, 1, 2, 3]
16
+ * ```
17
+ */
18
+ export type PadStart<Tuple extends unknown[], MaxLength extends number, PadWith = unknown> = PadStartDevice<
19
+ Tuple,
20
+ MaxLength,
21
+ PadWith,
22
+ []
23
+ >
24
+
25
+ type PadStartDevice<
26
+ Source extends unknown[],
27
+ MaxLength extends number,
28
+ PadWith,
29
+ Result extends unknown[]
30
+ > = Result['length'] extends MaxLength
31
+ ? Source extends []
32
+ ? Result
33
+ : Source extends [...infer Head, infer Tail]
34
+ ? [Tail, ...Result] extends infer R extends unknown[]
35
+ ? PadStartDevice<Head, R['length'], PadWith, R>
36
+ : never
37
+ : never
38
+ : Source extends []
39
+ ? PadStartDevice<Source, MaxLength, PadWith, [PadWith, ...Result]>
40
+ : Source extends [...infer Head, infer Tail]
41
+ ? PadStartDevice<Head, MaxLength, PadWith, [Tail, ...Result]>
42
+ : Source
@@ -0,0 +1 @@
1
+ export * from './tuple_plus.pad_start.js'
@@ -1,4 +1,4 @@
1
- import type { Equal } from '../equal/equal.js'
1
+ import type { IsEqual } from '../equal/equal.js'
2
2
 
3
3
  /**
4
4
  * Is the subject of type T
@@ -12,20 +12,28 @@ export function isType(subject: unknown, validator?: (s: unknown) => unknown) {
12
12
  return validator ? !!validator(subject) : true
13
13
  }
14
14
 
15
+ /**
16
+ * @deprecated use `isType<T>()` or `testType.true<T>()` instead
17
+ */
15
18
  isType.t = function <T extends true>(subject?: T) {
16
19
  return subject === undefined || subject === true
17
20
  }
18
21
 
22
+ /**
23
+ * @deprecated use `isType<T>()` or `testType.false<T>()` instead
24
+ */
19
25
  isType.f = function <T extends false>(subject?: T) {
20
26
  return subject === undefined || subject === false
21
27
  }
22
28
 
23
29
  /**
24
30
  * Check is the type `never`
31
+ * @deprecated use `isType<T>()` or `testType.never<T>()` instead
25
32
  */
26
33
  function isNever<S extends never>(): unknown
27
34
  /**
28
35
  * Check is the value is type `never`
36
+ * @deprecated use `isType<T>()` or `testType.never<T>()` instead
29
37
  */
30
38
  function isNever(subject: never): subject is never
31
39
  function isNever(subject?: unknown): subject is never {
@@ -39,6 +47,6 @@ isType.never = isNever
39
47
  * Easier to use than `isType.t<>()` and `isType.f<>()`,
40
48
  * when doing type level only equality comparison as you don't have to import `Equal<>`.
41
49
  *
42
- * @deprecated use `type.equal()` instead
50
+ * @deprecated use `testType.equal()` instead
43
51
  */
44
- isType.equal = function <C extends Equal<A, B>, A, B>() {}
52
+ isType.equal = function <C extends IsEqual<A, B>, A, B>() {}
@@ -0,0 +1,37 @@
1
+ # Type Guard
2
+
3
+ [User-defined type guard functions][type_guard] is a function which its return type is specified as `x as T`.
4
+
5
+ It is introduced in TypeScript 1.6.
6
+
7
+ For example:
8
+
9
+ ```ts
10
+ function isBool(x: unknown): x is boolean {
11
+ return typeof x === 'boolean';
12
+ }
13
+ ```
14
+
15
+ ## isType
16
+
17
+ > `isType<T>(subject: T): subject is T`
18
+
19
+ ✔️ `immediate`
20
+
21
+ It ensures `subject` satisfies `T`.
22
+ You need to specify `T`.
23
+
24
+ > `isType<T>(subject: unknown, validator: (s: T) => unknown): subject is T`
25
+
26
+ It is a generic type guard.
27
+ You can use it for do quick type guard without creating a custom one.
28
+
29
+ ```ts
30
+ const s: unknown = 1
31
+
32
+ if (isType<1>(s, v => v === 1)) {
33
+ // s is narrowed to type `1` here.
34
+ }
35
+ ```
36
+
37
+ [type_guard]: https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../ts/array/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE/C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,EAAE,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,MAAM,CAAC,GACtG,CAAC,SAAS,MAAM,GACf,CAAC,CAAC,CAAC,CAAC,GACJ,IAAI,GACL,KAAK,CAAA;AAER;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.js","sourceRoot":"","sources":["../../ts/array/array.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- import type { DigitArray } from '../math/index.js';
2
- import type { IsInteger } from '../number/integer.js';
3
- import type { IsPositive } from '../number/positive.js';
4
- /**
5
- * Creates `Tuple<T>` with `L` number of elements.
6
- * @note Other cool implementations by @lazytype, @jcalz:
7
- * @see https://github.com/microsoft/TypeScript/issues/26223#issuecomment-674514787
8
- * @see https://github.com/microsoft/TypeScript/issues/47874#issuecomment-1039157322
9
- */
10
- export type CreateTuple<L extends number, T = unknown, Fail = never> = number extends L ? T[] : IsPositive<L> extends true ? IsInteger<L> extends true ? DigitArray.ToTuple<[], DigitArray.FromNumber<L>, T> : Fail : Fail;
11
- //# sourceMappingURL=create_tuple.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create_tuple.d.ts","sourceRoot":"","sources":["../../ts/array/create_tuple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,OAAO,EAAE,IAAI,GAAG,KAAK,IAAI,MAAM,SAAS,CAAC,GACpF,CAAC,EAAE,GACH,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,GAC1B,SAAS,CAAC,CAAC,CAAC,SAAS,IAAI,GACxB,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GACnD,IAAI,GACL,IAAI,CAAA"}
@@ -1,6 +0,0 @@
1
- export type FindFirst<A extends Array<any>, Criteria> = number extends A['length'] ? A[0] extends Criteria ? A[0] : never : A['length'] extends 0 ? never : A extends [any, ...infer Tail] ? A[0] extends Criteria ? A[0] : FindFirst<Tail, Criteria> : never;
2
- /**
3
- * @deprecated use FindFirst
4
- */
5
- export type First<A extends any[], Criteria> = FindFirst<A, Criteria>;
6
- //# sourceMappingURL=find_first.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find_first.d.ts","sourceRoot":"","sources":["../../ts/array/find_first.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC/E,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACpB,CAAC,CAAC,CAAC,CAAC,GACJ,KAAK,GACN,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,KAAK,GACL,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,GAC9B,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACpB,CAAC,CAAC,CAAC,CAAC,GACJ,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,GAC1B,KAAK,CAAA;AAER;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,QAAQ,IAAI,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"find_first.js","sourceRoot":"","sources":["../../ts/array/find_first.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export type FindLast<A extends Array<any>, Criteria> = number extends A['length'] ? A[0] extends Criteria ? A[0] : never : A['length'] extends 0 ? never : A extends [...infer Heads, infer Last] ? Last extends Criteria ? Last : FindLast<Heads, Criteria> : never;
2
- //# sourceMappingURL=find_last.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find_last.d.ts","sourceRoot":"","sources":["../../ts/array/find_last.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC9E,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACpB,CAAC,CAAC,CAAC,CAAC,GACJ,KAAK,GACN,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,KAAK,GACL,CAAC,SAAS,CAAC,GAAG,MAAM,KAAK,EAAE,MAAM,IAAI,CAAC,GACtC,IAAI,SAAS,QAAQ,GACpB,IAAI,GACJ,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,GAC1B,KAAK,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"find_last.js","sourceRoot":"","sources":["../../ts/array/find_last.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import type { IsAny } from '../any/any_type.js';
2
- import type { Equal } from '../equal/equal.js';
3
- import type { CreateTuple } from './create_tuple.js';
4
- import type { UnionOfValues } from './union_of_values.js';
5
- export type PadLeft<A extends any[], Total extends number, PadWith = any> = number extends A['length'] ? IsAny<UnionOfValues<A>> extends true ? A : Equal<UnionOfValues<A>, PadWith> extends true ? A : PadLeft<[...CreateTuple<Total, PadWith>, ...A], Total, PadWith> : CreateTuple<Total, any> extends [...infer U, ...A] ? number extends U['length'] ? A : [...CreateTuple<U['length'], PadWith>, ...A] : A;
6
- //# sourceMappingURL=pad_left.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pad_left.d.ts","sourceRoot":"","sources":["../../ts/array/pad_left.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,KAAK,SAAS,MAAM,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GACnG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GACnC,CAAC,GACD,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,IAAI,GAC7C,CAAC,GACD,OAAO,CAAC,CAAC,GAAG,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,GAChE,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,GAClD,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GACzB,CAAC,GACD,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,GAC7C,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pad_left.js","sourceRoot":"","sources":["../../ts/array/pad_left.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import type { Equal } from '../equal/equal.js';
2
- import type { Tail } from './tail.js';
3
- import type { UnionOfValues } from './union_of_values.js';
4
- export type Some<A extends any[], Criteria, Mode extends 'strict' | 'loose' = 'loose', Then = true, Else = false> = Mode extends 'strict' ? Some.Strict<A, Criteria, Then, Else> : number extends A['length'] ? UnionOfValues<A> extends Criteria ? Then : Else : A['length'] extends 0 ? Else : A[0] extends Criteria ? Then : Some<Tail<A>, Criteria, 'loose', Then, Else>;
5
- export declare namespace Some {
6
- type Strict<A extends any[], Criteria, Then, Else> = number extends A['length'] ? Equal<UnionOfValues<A>, Criteria> extends true ? Then : Else : A['length'] extends 0 ? Else : Equal<A[0], Criteria> extends true ? Then : Strict<Tail<A>, Criteria, Then, Else>;
7
- }
8
- //# sourceMappingURL=some.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"some.d.ts","sourceRoot":"","sources":["../../ts/array/some.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,MAAM,IAAI,CACf,CAAC,SAAS,GAAG,EAAE,EACf,QAAQ,EACR,IAAI,SAAS,QAAQ,GAAG,OAAO,GAAG,OAAO,EACzC,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,KAAK,IACT,IAAI,SAAS,QAAQ,GACtB,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,GACpC,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC1B,aAAa,CAAC,CAAC,CAAC,SAAS,QAAQ,GAChC,IAAI,GACJ,IAAI,GACL,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,IAAI,GACJ,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACrB,IAAI,GACJ,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE/C,yBAAiB,IAAI,CAAC;IACrB,KAAY,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GACnF,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,IAAI,GAC7C,IAAI,GACJ,IAAI,GACL,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,IAAI,GACJ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,IAAI,GAClC,IAAI,GACJ,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;CACxC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"some.js","sourceRoot":"","sources":["../../ts/array/some.ts"],"names":[],"mappings":""}
package/cjs/math/Abs.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { DigitArray } from './Digit.js';
2
- export type Abs<N extends number, Fail = never> = number extends N ? Fail : `${N}` extends `-${infer P}` ? DigitArray.ToNumber<DigitArray.FromString<P>> : N;
3
- //# sourceMappingURL=Abs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Abs.d.ts","sourceRoot":"","sources":["../../ts/math/Abs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,KAAK,IAAI,MAAM,SAAS,CAAC,GAC/D,IAAI,GACJ,GAAG,CAAC,EAAE,SAAS,IAAI,MAAM,CAAC,EAAE,GAC5B,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAC7C,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Abs.js","sourceRoot":"","sources":["../../ts/math/Abs.ts"],"names":[],"mappings":""}
package/cjs/math/Add.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import type { PadLeft } from '../array/index.js';
2
- import type { IsInteger } from '../number/integer.js';
3
- import type { IsPositive } from '../number/positive.js';
4
- import type { And } from '../predicates/index.js';
5
- import type { Digit, DigitArray } from './Digit.js';
6
- import type { Max } from './Max.js';
7
- /**
8
- * Add two number literals.
9
- */
10
- export type Add<A extends number, B extends number, Fail = never> = And<And<IsPositive<A>, IsInteger<A>>, And<IsPositive<B>, IsInteger<B>>> extends false ? Fail : DigitArray.FromNumber<A> extends infer DA ? DA extends number[] ? DigitArray.FromNumber<B> extends infer DB ? DB extends number[] ? Max<DA['length'], DB['length']> extends infer M ? M extends number ? PadLeft<DA, M, 0> extends infer PDA ? PDA extends number[] ? PadLeft<DB, M, 0> extends infer PDB ? PDB extends number[] ? DigitArray.ToNumber<Add.DigitArray<PDA, PDB>> : Fail : Fail : Fail : Fail : Fail : Fail : Fail : Fail : Fail : Fail;
11
- export declare namespace Add {
12
- type DigitArray<A extends number[], B extends number[]> = A extends [any, ...infer ATail] ? ATail extends number[] ? B extends [any, ...infer BTail] ? BTail extends number[] ? [Digit<A[0], B[0]>, ...DigitArray<ATail, BTail>] : [] : [A[0], ...DigitArray<[], ATail>] : [] : B extends [any, ...infer BTail] ? BTail extends number[] ? [B[0], ...DigitArray<[], BTail>] : [] : [];
13
- type Digit<A extends number, B extends number> = [...Digit.ToTuple[A], ...Digit.ToTuple[B]]['length'];
14
- }
15
- /**
16
- * Increment `A` by 1.
17
- */
18
- export type Increment<A extends number, Fail = never> = Add<A, 1, Fail>;
19
- //# sourceMappingURL=Add.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Add.d.ts","sourceRoot":"","sources":["../../ts/math/Add.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC;;GAEG;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,KAAK,IAAI,GAAG,CACtE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAChC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAChC,SAAS,KAAK,GACZ,IAAI,GACJ,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,MAAM,EAAE,GACzC,EAAE,SAAS,MAAM,EAAE,GAClB,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,MAAM,EAAE,GACxC,EAAE,SAAS,MAAM,EAAE,GAClB,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,GAC9C,CAAC,SAAS,MAAM,GACf,OAAO,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,GAClC,GAAG,SAAS,MAAM,EAAE,GACnB,OAAO,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,GAClC,GAAG,SAAS,MAAM,EAAE,GACnB,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAC7C,IAAI,GACL,IAAI,GACL,IAAI,GACL,IAAI,GACL,IAAI,GACL,IAAI,GACL,IAAI,GACL,IAAI,GACL,IAAI,GACL,IAAI,CAAA;AAEP,yBAAiB,GAAG,CAAC;IACpB,KAAY,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,KAAK,CAAC,GAC7F,KAAK,SAAS,MAAM,EAAE,GACrB,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,KAAK,CAAC,GAC9B,KAAK,SAAS,MAAM,EAAE,GACrB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,GAChD,EAAE,GACH,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,GACjC,EAAE,GACH,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,KAAK,CAAC,GAC/B,KAAK,SAAS,MAAM,EAAE,GACrB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,GAChC,EAAE,GACH,EAAE,CAAA;IAEL,KAAY,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;CAC5G;AACD;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,KAAK,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Add.js","sourceRoot":"","sources":["../../ts/math/Add.ts"],"names":[],"mappings":""}