ts-data-forge 11.0.0 → 11.0.1

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 (171) hide show
  1. package/dist/number/branded-types/finite-number.d.mts +47 -61
  2. package/dist/number/branded-types/finite-number.d.mts.map +1 -1
  3. package/dist/number/branded-types/finite-number.mjs +37 -41
  4. package/dist/number/branded-types/finite-number.mjs.map +1 -1
  5. package/dist/number/branded-types/int.d.mts +40 -46
  6. package/dist/number/branded-types/int.d.mts.map +1 -1
  7. package/dist/number/branded-types/int.mjs +29 -31
  8. package/dist/number/branded-types/int.mjs.map +1 -1
  9. package/dist/number/branded-types/int16.d.mts +65 -58
  10. package/dist/number/branded-types/int16.d.mts.map +1 -1
  11. package/dist/number/branded-types/int16.mjs +49 -45
  12. package/dist/number/branded-types/int16.mjs.map +1 -1
  13. package/dist/number/branded-types/int32.d.mts +65 -58
  14. package/dist/number/branded-types/int32.d.mts.map +1 -1
  15. package/dist/number/branded-types/int32.mjs +49 -45
  16. package/dist/number/branded-types/int32.mjs.map +1 -1
  17. package/dist/number/branded-types/negative-finite-number.d.mts +68 -59
  18. package/dist/number/branded-types/negative-finite-number.d.mts.map +1 -1
  19. package/dist/number/branded-types/negative-finite-number.mjs +52 -46
  20. package/dist/number/branded-types/negative-finite-number.mjs.map +1 -1
  21. package/dist/number/branded-types/negative-int.d.mts +60 -48
  22. package/dist/number/branded-types/negative-int.d.mts.map +1 -1
  23. package/dist/number/branded-types/negative-int.mjs +40 -36
  24. package/dist/number/branded-types/negative-int.mjs.map +1 -1
  25. package/dist/number/branded-types/negative-safe-int.d.mts +57 -56
  26. package/dist/number/branded-types/negative-safe-int.d.mts.map +1 -1
  27. package/dist/number/branded-types/negative-safe-int.mjs +40 -41
  28. package/dist/number/branded-types/negative-safe-int.mjs.map +1 -1
  29. package/dist/number/branded-types/non-negative-finite-number.d.mts +74 -64
  30. package/dist/number/branded-types/non-negative-finite-number.d.mts.map +1 -1
  31. package/dist/number/branded-types/non-negative-finite-number.mjs +58 -51
  32. package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
  33. package/dist/number/branded-types/non-negative-int16.d.mts +64 -57
  34. package/dist/number/branded-types/non-negative-int16.d.mts.map +1 -1
  35. package/dist/number/branded-types/non-negative-int16.mjs +47 -43
  36. package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
  37. package/dist/number/branded-types/non-negative-int32.d.mts +64 -58
  38. package/dist/number/branded-types/non-negative-int32.d.mts.map +1 -1
  39. package/dist/number/branded-types/non-negative-int32.mjs +47 -44
  40. package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
  41. package/dist/number/branded-types/non-positive-finite-number.d.mts +64 -54
  42. package/dist/number/branded-types/non-positive-finite-number.d.mts.map +1 -1
  43. package/dist/number/branded-types/non-positive-finite-number.mjs +48 -41
  44. package/dist/number/branded-types/non-positive-finite-number.mjs.map +1 -1
  45. package/dist/number/branded-types/non-positive-int.d.mts +41 -146
  46. package/dist/number/branded-types/non-positive-int.d.mts.map +1 -1
  47. package/dist/number/branded-types/non-positive-int.mjs +27 -107
  48. package/dist/number/branded-types/non-positive-int.mjs.map +1 -1
  49. package/dist/number/branded-types/non-positive-safe-int.d.mts +54 -53
  50. package/dist/number/branded-types/non-positive-safe-int.d.mts.map +1 -1
  51. package/dist/number/branded-types/non-positive-safe-int.mjs +37 -39
  52. package/dist/number/branded-types/non-positive-safe-int.mjs.map +1 -1
  53. package/dist/number/branded-types/non-zero-finite-number.d.mts +62 -49
  54. package/dist/number/branded-types/non-zero-finite-number.d.mts.map +1 -1
  55. package/dist/number/branded-types/non-zero-finite-number.mjs +46 -37
  56. package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
  57. package/dist/number/branded-types/non-zero-int.d.mts +51 -38
  58. package/dist/number/branded-types/non-zero-int.d.mts.map +1 -1
  59. package/dist/number/branded-types/non-zero-int.mjs +31 -27
  60. package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
  61. package/dist/number/branded-types/non-zero-int16.d.mts +52 -53
  62. package/dist/number/branded-types/non-zero-int16.d.mts.map +1 -1
  63. package/dist/number/branded-types/non-zero-int16.mjs +36 -39
  64. package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
  65. package/dist/number/branded-types/non-zero-int32.d.mts +52 -54
  66. package/dist/number/branded-types/non-zero-int32.d.mts.map +1 -1
  67. package/dist/number/branded-types/non-zero-int32.mjs +36 -40
  68. package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
  69. package/dist/number/branded-types/non-zero-safe-int.d.mts +53 -54
  70. package/dist/number/branded-types/non-zero-safe-int.d.mts.map +1 -1
  71. package/dist/number/branded-types/non-zero-safe-int.mjs +36 -40
  72. package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
  73. package/dist/number/branded-types/non-zero-uint16.d.mts +52 -53
  74. package/dist/number/branded-types/non-zero-uint16.d.mts.map +1 -1
  75. package/dist/number/branded-types/non-zero-uint16.mjs +35 -39
  76. package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
  77. package/dist/number/branded-types/non-zero-uint32.d.mts +52 -53
  78. package/dist/number/branded-types/non-zero-uint32.d.mts.map +1 -1
  79. package/dist/number/branded-types/non-zero-uint32.mjs +35 -39
  80. package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
  81. package/dist/number/branded-types/positive-finite-number.d.mts +74 -63
  82. package/dist/number/branded-types/positive-finite-number.d.mts.map +1 -1
  83. package/dist/number/branded-types/positive-finite-number.mjs +58 -50
  84. package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
  85. package/dist/number/branded-types/positive-int.d.mts +46 -68
  86. package/dist/number/branded-types/positive-int.d.mts.map +1 -1
  87. package/dist/number/branded-types/positive-int.mjs +34 -49
  88. package/dist/number/branded-types/positive-int.mjs.map +1 -1
  89. package/dist/number/branded-types/positive-int16.d.mts +61 -57
  90. package/dist/number/branded-types/positive-int16.d.mts.map +1 -1
  91. package/dist/number/branded-types/positive-int16.mjs +44 -43
  92. package/dist/number/branded-types/positive-int16.mjs.map +1 -1
  93. package/dist/number/branded-types/positive-int32.d.mts +61 -57
  94. package/dist/number/branded-types/positive-int32.d.mts.map +1 -1
  95. package/dist/number/branded-types/positive-int32.mjs +44 -43
  96. package/dist/number/branded-types/positive-int32.mjs.map +1 -1
  97. package/dist/number/branded-types/positive-safe-int.d.mts +62 -57
  98. package/dist/number/branded-types/positive-safe-int.d.mts.map +1 -1
  99. package/dist/number/branded-types/positive-safe-int.mjs +45 -43
  100. package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
  101. package/dist/number/branded-types/positive-uint16.d.mts +61 -57
  102. package/dist/number/branded-types/positive-uint16.d.mts.map +1 -1
  103. package/dist/number/branded-types/positive-uint16.mjs +44 -43
  104. package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
  105. package/dist/number/branded-types/positive-uint32.d.mts +61 -58
  106. package/dist/number/branded-types/positive-uint32.d.mts.map +1 -1
  107. package/dist/number/branded-types/positive-uint32.mjs +44 -44
  108. package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
  109. package/dist/number/branded-types/safe-int.d.mts +43 -62
  110. package/dist/number/branded-types/safe-int.d.mts.map +1 -1
  111. package/dist/number/branded-types/safe-int.mjs +35 -42
  112. package/dist/number/branded-types/safe-int.mjs.map +1 -1
  113. package/dist/number/branded-types/safe-uint.d.mts +62 -57
  114. package/dist/number/branded-types/safe-uint.d.mts.map +1 -1
  115. package/dist/number/branded-types/safe-uint.mjs +46 -44
  116. package/dist/number/branded-types/safe-uint.mjs.map +1 -1
  117. package/dist/number/branded-types/uint.d.mts +63 -50
  118. package/dist/number/branded-types/uint.d.mts.map +1 -1
  119. package/dist/number/branded-types/uint.mjs +42 -39
  120. package/dist/number/branded-types/uint.mjs.map +1 -1
  121. package/dist/number/branded-types/uint16.d.mts +60 -58
  122. package/dist/number/branded-types/uint16.d.mts.map +1 -1
  123. package/dist/number/branded-types/uint16.mjs +44 -43
  124. package/dist/number/branded-types/uint16.mjs.map +1 -1
  125. package/dist/number/branded-types/uint32.d.mts +59 -55
  126. package/dist/number/branded-types/uint32.d.mts.map +1 -1
  127. package/dist/number/branded-types/uint32.mjs +42 -42
  128. package/dist/number/branded-types/uint32.mjs.map +1 -1
  129. package/dist/number/enum/int8.d.mts +56 -65
  130. package/dist/number/enum/int8.d.mts.map +1 -1
  131. package/dist/number/enum/int8.mjs +44 -43
  132. package/dist/number/enum/int8.mjs.map +1 -1
  133. package/dist/number/enum/uint8.d.mts +60 -58
  134. package/dist/number/enum/uint8.d.mts.map +1 -1
  135. package/dist/number/enum/uint8.mjs +44 -43
  136. package/dist/number/enum/uint8.mjs.map +1 -1
  137. package/package.json +2 -1
  138. package/src/number/branded-types/finite-number.mts +47 -61
  139. package/src/number/branded-types/int.mts +40 -46
  140. package/src/number/branded-types/int16.mts +65 -58
  141. package/src/number/branded-types/int32.mts +65 -58
  142. package/src/number/branded-types/negative-finite-number.mts +68 -68
  143. package/src/number/branded-types/negative-int.mts +60 -57
  144. package/src/number/branded-types/negative-safe-int.mts +57 -65
  145. package/src/number/branded-types/non-negative-finite-number.mts +74 -64
  146. package/src/number/branded-types/non-negative-int16.mts +64 -57
  147. package/src/number/branded-types/non-negative-int32.mts +64 -58
  148. package/src/number/branded-types/non-positive-finite-number.mts +64 -54
  149. package/src/number/branded-types/non-positive-int.mts +41 -146
  150. package/src/number/branded-types/non-positive-safe-int.mts +54 -53
  151. package/src/number/branded-types/non-zero-finite-number.mts +62 -51
  152. package/src/number/branded-types/non-zero-int.mts +51 -38
  153. package/src/number/branded-types/non-zero-int16.mts +52 -53
  154. package/src/number/branded-types/non-zero-int32.mts +52 -54
  155. package/src/number/branded-types/non-zero-safe-int.mts +53 -54
  156. package/src/number/branded-types/non-zero-uint16.mts +52 -53
  157. package/src/number/branded-types/non-zero-uint32.mts +52 -53
  158. package/src/number/branded-types/positive-finite-number.mts +74 -63
  159. package/src/number/branded-types/positive-int.mts +46 -68
  160. package/src/number/branded-types/positive-int16.mts +61 -57
  161. package/src/number/branded-types/positive-int32.mts +61 -57
  162. package/src/number/branded-types/positive-safe-int.mts +62 -57
  163. package/src/number/branded-types/positive-uint16.mts +61 -57
  164. package/src/number/branded-types/positive-uint32.mts +61 -58
  165. package/src/number/branded-types/safe-int.mts +43 -62
  166. package/src/number/branded-types/safe-uint.mts +62 -57
  167. package/src/number/branded-types/uint.mts +63 -50
  168. package/src/number/branded-types/uint16.mts +60 -58
  169. package/src/number/branded-types/uint32.mts +59 -55
  170. package/src/number/enum/int8.mts +56 -65
  171. package/src/number/enum/uint8.mts +60 -58
@@ -25,93 +25,93 @@ const isUint32 = is;
25
25
  const asUint32 = castType;
26
26
  const Uint32 = {
27
27
  /**
28
- * Type guard that checks if a value is a 32-bit unsigned integer.
28
+ * Type guard that checks if a value is a non-negative integer less than 2^32.
29
29
  *
30
30
  * @param value - The value to check
31
- * @returns `true` if the value is within the range [0, 2^32), `false`
32
- * otherwise
31
+ * @returns `true` if the value is a non-negative integer less than 2^32, `false` otherwise
32
+ * @see {@link isUint32} for usage examples
33
33
  */
34
34
  is,
35
35
  /**
36
- * The minimum value for a Uint32.
37
- *
38
- * @readonly
36
+ * The smallest value representable as `Uint32`.
39
37
  */
40
38
  MIN_VALUE,
41
39
  /**
42
- * The maximum value for a Uint32.
43
- *
44
- * @readonly
40
+ * The largest value representable as `Uint32`.
45
41
  */
46
42
  MAX_VALUE,
47
43
  /**
48
- * Returns the minimum of multiple Uint32 values.
44
+ * Returns the smallest of the given non-negative integers.
49
45
  *
50
- * @param values - The Uint32 values to compare
51
- * @returns The smallest value as a Uint32
46
+ * @param values - The non-negative integers to compare (at least one required)
47
+ * @returns The smallest value as an `Uint32`
52
48
  */
53
49
  min: min_,
54
50
  /**
55
- * Returns the maximum of multiple Uint32 values.
51
+ * Returns the largest of the given non-negative integers.
56
52
  *
57
- * @param values - The Uint32 values to compare
58
- * @returns The largest value as a Uint32
53
+ * @param values - The non-negative integers to compare (at least one required)
54
+ * @returns The largest value as an `Uint32`
59
55
  */
60
56
  max: max_,
61
57
  /**
62
- * Clamps a Uint32 to be within the specified range.
58
+ * Clamps a `number` into the `Uint32` range, rounding to the nearest integer
59
+ * and constraining the result to `[MIN_VALUE, MAX_VALUE]`.
63
60
  *
64
61
  * @param value - The value to clamp
65
- * @param min - The minimum value
66
- * @param max - The maximum value
67
- * @returns The clamped value as a Uint32
62
+ * @returns The clamped value as an `Uint32`
68
63
  */
69
64
  clamp,
70
65
  /**
71
- * Generates a random Uint32 value.
66
+ * Generates a random `Uint32` within the given range.
67
+ *
68
+ * The range is inclusive on both ends.
72
69
  *
73
- * @returns A random Uint32 value within [0, 2^32)
70
+ * @param min - The minimum value (inclusive)
71
+ * @param max - The maximum value (inclusive)
72
+ * @returns A random `Uint32` in `[min, max]`
74
73
  */
75
74
  random,
76
75
  /**
77
- * Raises a Uint32 to a power, with result clamped to [0, 2^32).
76
+ * Raises `a` to the power `b`, returning `a ** b` as an `Uint32` (floored to
77
+ * an integer).
78
78
  *
79
- * @param a - The base Uint32
80
- * @param b - The exponent Uint32
81
- * @returns `a ** b` as a Uint32, clamped to valid range
79
+ * @param a - The base non-negative integer
80
+ * @param b - The exponent non-negative integer
81
+ * @returns `a ** b` as an `Uint32`
82
82
  */
83
83
  pow,
84
84
  /**
85
- * Adds two Uint32 values, with result clamped to [0, 2^32).
85
+ * Adds two non-negative integers, returning `a + b` as an `Uint32`.
86
86
  *
87
- * @param a - First Uint32
88
- * @param b - Second Uint32
89
- * @returns `a + b` as a Uint32, clamped to valid range
87
+ * @param a - The first non-negative integer
88
+ * @param b - The second non-negative integer
89
+ * @returns The sum of `a` and `b` as an `Uint32`
90
90
  */
91
91
  add,
92
92
  /**
93
- * Subtracts two Uint32 values, with result clamped to [0, 2^32).
93
+ * Subtracts two non-negative integers, returning `a - b` as an `Uint32`.
94
94
  *
95
- * @param a - First Uint32
96
- * @param b - Second Uint32
97
- * @returns `a - b` as a Uint32, clamped to valid range (minimum 0)
95
+ * @param a - The first non-negative integer
96
+ * @param b - The second non-negative integer
97
+ * @returns The difference of `a` and `b` as an `Uint32`
98
98
  */
99
99
  sub,
100
100
  /**
101
- * Multiplies two Uint32 values, with result clamped to [0, 2^32).
101
+ * Multiplies two non-negative integers, returning `a * b` as an `Uint32`.
102
102
  *
103
- * @param a - First Uint32
104
- * @param b - Second Uint32
105
- * @returns `a * b` as a Uint32, clamped to valid range
103
+ * @param a - The first non-negative integer
104
+ * @param b - The second non-negative integer
105
+ * @returns The product of `a` and `b` as an `Uint32`
106
106
  */
107
107
  mul,
108
108
  /**
109
- * Divides two Uint32 values using floor division, with result clamped to [0,
110
- * 2^32).
109
+ * Divides two non-negative integers using floor division (`⌊a / b⌋`): the
110
+ * result is `a / b` rounded toward negative infinity, as an `Uint32`.
111
111
  *
112
- * @param a - The dividend Uint32
113
- * @param b - The divisor Uint32
114
- * @returns `⌊a / b⌋` as a Uint32, clamped to valid range
112
+ * @param a - The dividend
113
+ * @param b - The divisor (must be non-zero)
114
+ * @returns The floored quotient as an `Uint32`
115
115
  */
116
116
  div
117
117
  };
@@ -1 +1 @@
1
- {"version":3,"file":"uint32.mjs","sources":["../../../src/number/branded-types/uint32.mts"],"sourcesContent":["import { type Uint32 as TtfImported_Uint32 } from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type Uint32 = TtfImported_Uint32;\n\ntype ElementType = Uint32;\n\nconst typeNameInMessage = 'a non-negative integer less than 2^32';\n\nconst {\n MAX_VALUE,\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.operatorsForInteger<\n ElementType,\n 0,\n number\n>({\n integerOrSafeInteger: 'SafeInteger',\n MIN_VALUE: 0,\n MAX_VALUE: 2 ** 32 - 1,\n typeNameInMessage,\n} as const);\n\n/**\n * Checks if a number is a Uint32 (32-bit unsigned integer in the range [0,\n * 2^32)).\n *\n * @param value The value to check.\n * @returns `true` if the value is a Uint32, `false` otherwise.\n */\nexport const isUint32 = is;\n\n/**\n * Casts a number to a Uint32 type.\n *\n * @param value The value to cast.\n * @returns The value as a Uint32 type.\n * @throws {TypeError} If the value is not a non-negative integer less than\n * 2^32.\n */\nexport const asUint32 = castType;\n\n/**\n * Utility functions for working with Uint32 (32-bit unsigned integer) branded\n * types. Provides type-safe operations that ensure results remain within the\n * valid range [0, 2^32). All arithmetic operations are clamped to maintain the\n * Uint32 constraint.\n */\nexport const Uint32 = {\n /**\n * Type guard that checks if a value is a 32-bit unsigned integer.\n *\n * @param value - The value to check\n * @returns `true` if the value is within the range [0, 2^32), `false`\n * otherwise\n */\n is,\n\n /**\n * The minimum value for a Uint32.\n *\n * @readonly\n */\n MIN_VALUE,\n\n /**\n * The maximum value for a Uint32.\n *\n * @readonly\n */\n MAX_VALUE,\n\n /**\n * Returns the minimum of multiple Uint32 values.\n *\n * @param values - The Uint32 values to compare\n * @returns The smallest value as a Uint32\n */\n min: min_,\n\n /**\n * Returns the maximum of multiple Uint32 values.\n *\n * @param values - The Uint32 values to compare\n * @returns The largest value as a Uint32\n */\n max: max_,\n\n /**\n * Clamps a Uint32 to be within the specified range.\n *\n * @param value - The value to clamp\n * @param min - The minimum value\n * @param max - The maximum value\n * @returns The clamped value as a Uint32\n */\n clamp,\n\n /**\n * Generates a random Uint32 value.\n *\n * @returns A random Uint32 value within [0, 2^32)\n */\n random,\n\n /**\n * Raises a Uint32 to a power, with result clamped to [0, 2^32).\n *\n * @param a - The base Uint32\n * @param b - The exponent Uint32\n * @returns `a ** b` as a Uint32, clamped to valid range\n */\n pow,\n\n /**\n * Adds two Uint32 values, with result clamped to [0, 2^32).\n *\n * @param a - First Uint32\n * @param b - Second Uint32\n * @returns `a + b` as a Uint32, clamped to valid range\n */\n add,\n\n /**\n * Subtracts two Uint32 values, with result clamped to [0, 2^32).\n *\n * @param a - First Uint32\n * @param b - Second Uint32\n * @returns `a - b` as a Uint32, clamped to valid range (minimum 0)\n */\n sub,\n\n /**\n * Multiplies two Uint32 values, with result clamped to [0, 2^32).\n *\n * @param a - First Uint32\n * @param b - Second Uint32\n * @returns `a * b` as a Uint32, clamped to valid range\n */\n mul,\n\n /**\n * Divides two Uint32 values using floor division, with result clamped to [0,\n * 2^32).\n *\n * @param a - The dividend Uint32\n * @param b - The divisor Uint32\n * @returns `⌊a / b⌋` as a Uint32, clamped to valid range\n */\n div,\n} as const;\n\nexpectType<\n keyof typeof Uint32,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'non-negative' | 'range'\n >\n>('=');\n\nexpectType<\n typeof Uint32,\n TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'non-negative' | 'range'\n >\n>('<=');\n"],"names":[],"mappings":";;AAQA,MAAM,iBAAA,GAAoB,uCAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,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,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,aAAA;AAAA,EACtB,SAAA,EAAW,CAAA;AAAA,EACX,SAAA,EAAW,KAAK,EAAA,GAAK,CAAA;AAAA,EACrB;AACF,CAAU,CAAA;AASH,MAAM,QAAA,GAAW;AAUjB,MAAM,QAAA,GAAW;AAQjB,MAAM,MAAA,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQpB,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,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA;AACF;;;;"}
1
+ {"version":3,"file":"uint32.mjs","sources":["../../../src/number/branded-types/uint32.mts"],"sourcesContent":["import { type Uint32 as TtfImported_Uint32 } from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type Uint32 = TtfImported_Uint32;\n\ntype ElementType = Uint32;\n\nconst typeNameInMessage = 'a non-negative integer less than 2^32';\n\nconst {\n MAX_VALUE,\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.operatorsForInteger<\n ElementType,\n 0,\n number\n>({\n integerOrSafeInteger: 'SafeInteger',\n MIN_VALUE: 0,\n MAX_VALUE: 2 ** 32 - 1,\n typeNameInMessage,\n} as const);\n\n/**\n * Type guard that checks if a value is a non-negative integer less than 2^32.\n *\n * Returns `true` for a non-negative integer less than 2^32 — a value with no\n * fractional component.\n *\n * @param value - The value to check\n * @returns `true` if the value is a non-negative integer less than 2^32, `false` otherwise\n */\nexport const isUint32 = is;\n\n/**\n * Casts a `number` to the `Uint32` branded type.\n *\n * Validates that the value is a non-negative integer less than 2^32 and returns\n * it with the `Uint32` brand. Throws a `TypeError` otherwise.\n *\n * @param value - The value to cast\n * @returns The value as an `Uint32`\n * @throws {TypeError} If the value is not a non-negative integer less than 2^32\n */\nexport const asUint32 = castType;\n\n/**\n * Namespace providing type-safe operations for the `Uint32` branded type.\n *\n * The `Uint32` type represents a non-negative integer less than 2^32. Division\n * (`div`) uses floor division.\n */\nexport const Uint32 = {\n /**\n * Type guard that checks if a value is a non-negative integer less than 2^32.\n *\n * @param value - The value to check\n * @returns `true` if the value is a non-negative integer less than 2^32, `false` otherwise\n * @see {@link isUint32} for usage examples\n */\n is,\n\n /**\n * The smallest value representable as `Uint32`.\n */\n MIN_VALUE,\n\n /**\n * The largest value representable as `Uint32`.\n */\n MAX_VALUE,\n\n /**\n * Returns the smallest of the given non-negative integers.\n *\n * @param values - The non-negative integers to compare (at least one required)\n * @returns The smallest value as an `Uint32`\n */\n min: min_,\n\n /**\n * Returns the largest of the given non-negative integers.\n *\n * @param values - The non-negative integers to compare (at least one required)\n * @returns The largest value as an `Uint32`\n */\n max: max_,\n\n /**\n * Clamps a `number` into the `Uint32` range, rounding to the nearest integer\n * and constraining the result to `[MIN_VALUE, MAX_VALUE]`.\n *\n * @param value - The value to clamp\n * @returns The clamped value as an `Uint32`\n */\n clamp,\n\n /**\n * Generates a random `Uint32` within the given range.\n *\n * The range is inclusive on both ends.\n *\n * @param min - The minimum value (inclusive)\n * @param max - The maximum value (inclusive)\n * @returns A random `Uint32` in `[min, max]`\n */\n random,\n\n /**\n * Raises `a` to the power `b`, returning `a ** b` as an `Uint32` (floored to\n * an integer).\n *\n * @param a - The base non-negative integer\n * @param b - The exponent non-negative integer\n * @returns `a ** b` as an `Uint32`\n */\n pow,\n\n /**\n * Adds two non-negative integers, returning `a + b` as an `Uint32`.\n *\n * @param a - The first non-negative integer\n * @param b - The second non-negative integer\n * @returns The sum of `a` and `b` as an `Uint32`\n */\n add,\n\n /**\n * Subtracts two non-negative integers, returning `a - b` as an `Uint32`.\n *\n * @param a - The first non-negative integer\n * @param b - The second non-negative integer\n * @returns The difference of `a` and `b` as an `Uint32`\n */\n sub,\n\n /**\n * Multiplies two non-negative integers, returning `a * b` as an `Uint32`.\n *\n * @param a - The first non-negative integer\n * @param b - The second non-negative integer\n * @returns The product of `a` and `b` as an `Uint32`\n */\n mul,\n\n /**\n * Divides two non-negative integers using floor division (`⌊a / b⌋`): the\n * result is `a / b` rounded toward negative infinity, as an `Uint32`.\n *\n * @param a - The dividend\n * @param b - The divisor (must be non-zero)\n * @returns The floored quotient as an `Uint32`\n */\n div,\n} as const;\n\nexpectType<\n keyof typeof Uint32,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'non-negative' | 'range'\n >\n>('=');\n\nexpectType<\n typeof Uint32,\n TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'non-negative' | 'range'\n >\n>('<=');\n"],"names":[],"mappings":";;AAQA,MAAM,iBAAA,GAAoB,uCAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,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,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,aAAA;AAAA,EACtB,SAAA,EAAW,CAAA;AAAA,EACX,SAAA,EAAW,KAAK,EAAA,GAAK,CAAA;AAAA,EACrB;AACF,CAAU,CAAA;AAWH,MAAM,QAAA,GAAW;AAYjB,MAAM,QAAA,GAAW;AAQjB,MAAM,MAAA,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQpB,EAAA;AAAA;AAAA;AAAA;AAAA,EAKA,SAAA;AAAA;AAAA;AAAA;AAAA,EAKA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,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,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA;AACF;;;;"}
@@ -1,139 +1,130 @@
1
1
  import { type AbsoluteValue, type Int8 as TtfImported_Int8 } from 'ts-type-forge';
2
2
  export type Int8 = TtfImported_Int8;
3
3
  /**
4
- * Type guard that checks if a value is an 8-bit signed integer.
4
+ * Type guard that checks if a value is an integer in [-128, 127].
5
5
  *
6
- * An Int8 is a signed integer in the range [-128, 127], representing values
7
- * that fit in exactly 8 bits of memory.
6
+ * Returns `true` for an integer in [-128, 127] — a value with no fractional
7
+ * component.
8
8
  *
9
9
  * @param value - The value to check
10
- * @returns `true` if the value is an Int8, `false` otherwise
10
+ * @returns `true` if the value is an integer in [-128, 127], `false` otherwise
11
11
  */
12
12
  export declare const isInt8: (x: number) => x is Int8;
13
13
  /**
14
- * Casts a number to an Int8 branded type.
14
+ * Casts a `number` to the `Int8` branded type.
15
15
  *
16
- * This function validates that the input is within the Int8 range [-128, 127]
17
- * and is an integer, then returns it with the Int8 brand.
16
+ * Validates that the value is an integer in [-128, 127] and returns it with the
17
+ * `Int8` brand. Throws a `TypeError` otherwise.
18
18
  *
19
19
  * @param value - The value to cast
20
- * @returns The value as an Int8 branded type
21
- * @throws {TypeError} If the value is not a valid 8-bit signed integer
20
+ * @returns The value as an `Int8`
21
+ * @throws {TypeError} If the value is not an integer in [-128, 127]
22
22
  */
23
23
  export declare const asInt8: (x: number) => Int8;
24
24
  /**
25
- * Namespace providing type-safe operations for Int8 (8-bit signed integer)
26
- * branded types.
25
+ * Namespace providing type-safe operations for the `Int8` branded type.
27
26
  *
28
- * Int8 represents signed integers in the range [-128, 127], equivalent to a
29
- * signed byte in many programming languages. All operations automatically clamp
30
- * results to stay within this range, preventing overflow/underflow issues.
31
- *
32
- * This type is useful for:
33
- *
34
- * - Binary data processing (signed bytes)
35
- * - Small integer values with known bounds
36
- * - Embedded systems programming
37
- * - Memory-efficient integer storage
38
- * - Image processing (signed pixel offsets)
27
+ * The `Int8` type represents an integer in [-128, 127]. Division (`div`) uses
28
+ * floor division.
39
29
  */
40
30
  export declare const Int8: {
41
31
  /**
42
- * Type guard that checks if a value is an 8-bit signed integer.
32
+ * Type guard that checks if a value is an integer in [-128, 127].
43
33
  *
44
34
  * @param value - The value to check
45
- * @returns `true` if the value is in range [-128, 127] and is an integer
35
+ * @returns `true` if the value is an integer in [-128, 127], `false` otherwise
46
36
  * @see {@link isInt8} for usage examples
47
37
  */
48
38
  readonly is: (x: number) => x is Int8;
49
39
  /**
50
- * The minimum value for an 8-bit signed integer.
51
- *
52
- * @readonly
40
+ * The smallest value representable as `Int8`.
53
41
  */
54
42
  readonly MIN_VALUE: -128;
55
43
  /**
56
- * The maximum value for an 8-bit signed integer.
57
- *
58
- * @readonly
44
+ * The largest value representable as `Int8`.
59
45
  */
60
46
  readonly MAX_VALUE: 127;
61
47
  /**
62
- * Returns the minimum value from a list of Int8 values.
48
+ * Returns the smallest of the given integers.
63
49
  *
64
- * @param values - The Int8 values to compare (at least one required)
65
- * @returns The smallest value as an Int8
50
+ * @param values - The integers to compare (at least one required)
51
+ * @returns The smallest value as an `Int8`
66
52
  */
67
53
  readonly min: (...values: readonly Int8[]) => Int8;
68
54
  /**
69
- * Returns the maximum value from a list of Int8 values.
55
+ * Returns the largest of the given integers.
70
56
  *
71
- * @param values - The Int8 values to compare (at least one required)
72
- * @returns The largest value as an Int8
57
+ * @param values - The integers to compare (at least one required)
58
+ * @returns The largest value as an `Int8`
73
59
  */
74
60
  readonly max: (...values: readonly Int8[]) => Int8;
75
61
  /**
76
- * Clamps a number to the Int8 range.
62
+ * Clamps a `number` into the `Int8` range, rounding to the nearest integer
63
+ * and constraining the result to `[MIN_VALUE, MAX_VALUE]`.
77
64
  *
78
- * @param value The number to clamp.
79
- * @returns The value clamped to [-128, 127] as an Int8.
65
+ * @param value - The value to clamp
66
+ * @returns The clamped value as an `Int8`
80
67
  */
81
68
  readonly clamp: (a: number) => Int8;
82
69
  /**
83
- * Returns the absolute value of an Int8.
70
+ * Returns the absolute value of an integer in [-128, 127].
71
+ *
72
+ * The result is non-negative and keeps the `Int8` brand.
84
73
  *
85
- * @param value The Int8 value.
86
- * @returns The absolute value as an Int8, clamped to valid range.
74
+ * @param a - The integer value
75
+ * @returns The absolute value as a non-negative `Int8`
87
76
  */
88
77
  readonly abs: <N extends Int8>(x: N) => AbsoluteValue<N>;
89
78
  /**
90
- * Generates a random Int8 value within the specified range (inclusive).
79
+ * Generates a random `Int8` within the given range.
91
80
  *
92
- * Both bounds are inclusive. If min > max, they are automatically swapped.
81
+ * The range is inclusive on both ends.
93
82
  *
94
83
  * @param min - The minimum value (inclusive)
95
84
  * @param max - The maximum value (inclusive)
96
- * @returns A random Int8 in the range [min, max]
85
+ * @returns A random `Int8` in `[min, max]`
97
86
  */
98
87
  readonly random: (min: Int8, max: Int8) => Int8;
99
88
  /**
100
- * Raises x to the power of y, clamped to Int8 range.
89
+ * Raises `a` to the power `b`, returning `a ** b` as an `Int8` (floored to an
90
+ * integer).
101
91
  *
102
- * @param x - The base
103
- * @param y - The exponent
104
- * @returns `x ** y` clamped to [-128, 127]
92
+ * @param a - The base integer
93
+ * @param b - The exponent integer
94
+ * @returns `a ** b` as an `Int8`
105
95
  */
106
96
  readonly pow: (x: Int8, y: Int8) => Int8;
107
97
  /**
108
- * Adds two Int8 values, clamped to Int8 range.
98
+ * Adds two integers, returning `a + b` as an `Int8`.
109
99
  *
110
- * @param x - First operand
111
- * @param y - Second operand
112
- * @returns `x + y` clamped to [-128, 127]
100
+ * @param a - The first integer
101
+ * @param b - The second integer
102
+ * @returns The sum of `a` and `b` as an `Int8`
113
103
  */
114
104
  readonly add: (x: Int8, y: Int8) => Int8;
115
105
  /**
116
- * Subtracts two Int8 values, clamped to Int8 range.
106
+ * Subtracts two integers, returning `a - b` as an `Int8`.
117
107
  *
118
- * @param x - First operand
119
- * @param y - Second operand
120
- * @returns `x - y` clamped to [-128, 127]
108
+ * @param a - The first integer
109
+ * @param b - The second integer
110
+ * @returns The difference of `a` and `b` as an `Int8`
121
111
  */
122
112
  readonly sub: (x: Int8, y: Int8) => Int8;
123
113
  /**
124
- * Multiplies two Int8 values, clamped to Int8 range.
114
+ * Multiplies two integers, returning `a * b` as an `Int8`.
125
115
  *
126
- * @param x - First operand
127
- * @param y - Second operand
128
- * @returns `x * y` clamped to [-128, 127]
116
+ * @param a - The first integer
117
+ * @param b - The second integer
118
+ * @returns The product of `a` and `b` as an `Int8`
129
119
  */
130
120
  readonly mul: (x: Int8, y: Int8) => Int8;
131
121
  /**
132
- * Divides two Int8 values, clamped to Int8 range.
122
+ * Divides two integers using floor division (`⌊a / b⌋`): the result is `a /
123
+ * b` rounded toward negative infinity, as an `Int8`.
133
124
  *
134
- * @param x - The dividend
135
- * @param y - The divisor (cannot be 0)
136
- * @returns `⌊x / y⌋` clamped to [-128, 127]
125
+ * @param a - The dividend
126
+ * @param b - The divisor (must be non-zero)
127
+ * @returns The floored quotient as an `Int8`
137
128
  */
138
129
  readonly div: (x: Int8, y: Exclude<Int8, 0>) => Int8;
139
130
  };
@@ -1 +1 @@
1
- {"version":3,"file":"int8.d.mts","sourceRoot":"","sources":["../../../src/number/enum/int8.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,IAAI,IAAI,gBAAgB,EAC9B,MAAM,eAAe,CAAC;AAIvB,MAAM,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAqDpC;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MAxCJ,MAAM,KAAG,CAAC,IAAI,IAwCL,CAAC;AAEzB;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,MAlDE,MAAM,KAAG,IAkDA,CAAC;AAE/B;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI;IACf;;;;;;OAMG;qBA7EU,MAAM,KAAG,CAAC,IAAI,IAAI;IAgF/B;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;;;;OAKG;8BAvFoB,SAAS,IAAI,EAAE,KAAG,IAAI;IA0F7C;;;;;OAKG;8BA5FoB,SAAS,IAAI,EAAE,KAAG,IAAI;IA+F7C;;;;;OAKG;wBA7Ga,MAAM,KAAG,IAAI;IAgH7B;;;;;OAKG;mBAnHQ,CAAC,SAAS,IAAI,KAAK,CAAC,KAAG,aAAa,CAAC,CAAC,CAAC;IAsHlD;;;;;;;;OAQG;2BA1GgB,IAAI,OAAO,IAAI,KAAG,IAAI;IA6GzC;;;;;;OAMG;sBA7HW,IAAI,KAAK,IAAI,KAAG,IAAI;IAgIlC;;;;;;OAMG;sBApIW,IAAI,KAAK,IAAI,KAAG,IAAI;IAuIlC;;;;;;OAMG;sBA3IW,IAAI,KAAK,IAAI,KAAG,IAAI;IA8IlC;;;;;;OAMG;sBAlJW,IAAI,KAAK,IAAI,KAAG,IAAI;IAqJlC;;;;;;OAMG;sBAzJW,IAAI,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC,C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36
  const asInt8 = castType;
37
37
  const Int8 = {
38
38
  /**
39
- * Type guard that checks if a value is an 8-bit signed integer.
39
+ * Type guard that checks if a value is an integer in [-128, 127].
40
40
  *
41
41
  * @param value - The value to check
42
- * @returns `true` if the value is in range [-128, 127] and is an integer
42
+ * @returns `true` if the value is an integer in [-128, 127], `false` otherwise
43
43
  * @see {@link isInt8} for usage examples
44
44
  */
45
45
  is,
46
46
  /**
47
- * The minimum value for an 8-bit signed integer.
48
- *
49
- * @readonly
47
+ * The smallest value representable as `Int8`.
50
48
  */
51
49
  MIN_VALUE,
52
50
  /**
53
- * The maximum value for an 8-bit signed integer.
54
- *
55
- * @readonly
51
+ * The largest value representable as `Int8`.
56
52
  */
57
53
  MAX_VALUE,
58
54
  /**
59
- * Returns the minimum value from a list of Int8 values.
55
+ * Returns the smallest of the given integers.
60
56
  *
61
- * @param values - The Int8 values to compare (at least one required)
62
- * @returns The smallest value as an Int8
57
+ * @param values - The integers to compare (at least one required)
58
+ * @returns The smallest value as an `Int8`
63
59
  */
64
60
  min: min_,
65
61
  /**
66
- * Returns the maximum value from a list of Int8 values.
62
+ * Returns the largest of the given integers.
67
63
  *
68
- * @param values - The Int8 values to compare (at least one required)
69
- * @returns The largest value as an Int8
64
+ * @param values - The integers to compare (at least one required)
65
+ * @returns The largest value as an `Int8`
70
66
  */
71
67
  max: max_,
72
68
  /**
73
- * Clamps a number to the Int8 range.
69
+ * Clamps a `number` into the `Int8` range, rounding to the nearest integer
70
+ * and constraining the result to `[MIN_VALUE, MAX_VALUE]`.
74
71
  *
75
- * @param value The number to clamp.
76
- * @returns The value clamped to [-128, 127] as an Int8.
72
+ * @param value - The value to clamp
73
+ * @returns The clamped value as an `Int8`
77
74
  */
78
75
  clamp,
79
76
  /**
80
- * Returns the absolute value of an Int8.
77
+ * Returns the absolute value of an integer in [-128, 127].
78
+ *
79
+ * The result is non-negative and keeps the `Int8` brand.
81
80
  *
82
- * @param value The Int8 value.
83
- * @returns The absolute value as an Int8, clamped to valid range.
81
+ * @param a - The integer value
82
+ * @returns The absolute value as a non-negative `Int8`
84
83
  */
85
84
  abs,
86
85
  /**
87
- * Generates a random Int8 value within the specified range (inclusive).
86
+ * Generates a random `Int8` within the given range.
88
87
  *
89
- * Both bounds are inclusive. If min > max, they are automatically swapped.
88
+ * The range is inclusive on both ends.
90
89
  *
91
90
  * @param min - The minimum value (inclusive)
92
91
  * @param max - The maximum value (inclusive)
93
- * @returns A random Int8 in the range [min, max]
92
+ * @returns A random `Int8` in `[min, max]`
94
93
  */
95
94
  random,
96
95
  /**
97
- * Raises x to the power of y, clamped to Int8 range.
96
+ * Raises `a` to the power `b`, returning `a ** b` as an `Int8` (floored to an
97
+ * integer).
98
98
  *
99
- * @param x - The base
100
- * @param y - The exponent
101
- * @returns `x ** y` clamped to [-128, 127]
99
+ * @param a - The base integer
100
+ * @param b - The exponent integer
101
+ * @returns `a ** b` as an `Int8`
102
102
  */
103
103
  pow,
104
104
  /**
105
- * Adds two Int8 values, clamped to Int8 range.
105
+ * Adds two integers, returning `a + b` as an `Int8`.
106
106
  *
107
- * @param x - First operand
108
- * @param y - Second operand
109
- * @returns `x + y` clamped to [-128, 127]
107
+ * @param a - The first integer
108
+ * @param b - The second integer
109
+ * @returns The sum of `a` and `b` as an `Int8`
110
110
  */
111
111
  add,
112
112
  /**
113
- * Subtracts two Int8 values, clamped to Int8 range.
113
+ * Subtracts two integers, returning `a - b` as an `Int8`.
114
114
  *
115
- * @param x - First operand
116
- * @param y - Second operand
117
- * @returns `x - y` clamped to [-128, 127]
115
+ * @param a - The first integer
116
+ * @param b - The second integer
117
+ * @returns The difference of `a` and `b` as an `Int8`
118
118
  */
119
119
  sub,
120
120
  /**
121
- * Multiplies two Int8 values, clamped to Int8 range.
121
+ * Multiplies two integers, returning `a * b` as an `Int8`.
122
122
  *
123
- * @param x - First operand
124
- * @param y - Second operand
125
- * @returns `x * y` clamped to [-128, 127]
123
+ * @param a - The first integer
124
+ * @param b - The second integer
125
+ * @returns The product of `a` and `b` as an `Int8`
126
126
  */
127
127
  mul,
128
128
  /**
129
- * Divides two Int8 values, clamped to Int8 range.
129
+ * Divides two integers using floor division (`⌊a / b⌋`): the result is `a /
130
+ * b` rounded toward negative infinity, as an `Int8`.
130
131
  *
131
- * @param x - The dividend
132
- * @param y - The divisor (cannot be 0)
133
- * @returns `⌊x / y⌋` clamped to [-128, 127]
132
+ * @param a - The dividend
133
+ * @param b - The divisor (must be non-zero)
134
+ * @returns The floored quotient as an `Int8`
134
135
  */
135
136
  div
136
137
  };
@@ -1 +1 @@
1
- {"version":3,"file":"int8.mjs","sources":["../../../src/number/enum/int8.mts"],"sourcesContent":["import {\n type AbsoluteValue,\n type Int16,\n type Int8 as TtfImported_Int8,\n} from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type Int8 = TtfImported_Int8;\n\nconst typeNameInMessage = 'an integer in [-128, 127]';\n\nconst {\n MAX_VALUE,\n MIN_VALUE,\n castType: castTypeImpl,\n clamp: clampImpl,\n is: isImpl,\n random: randomImpl,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger<\n Int16,\n -128,\n 127\n>({\n integerOrSafeInteger: 'SafeInteger',\n MIN_VALUE: -128,\n MAX_VALUE: 127,\n typeNameInMessage,\n} as const);\n\nconst is = (x: number): x is Int8 => isImpl(x);\n\nconst castType = (x: number): Int8 =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n castTypeImpl(x) as Int8;\n\nconst clamp = (a: number): Int8 => castType(clampImpl(a));\n\nconst abs = <N extends Int8>(x: N): AbsoluteValue<N> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Math.abs(x) as unknown as AbsoluteValue<N>;\n\nconst min_ = (...values: readonly Int8[]): Int8 =>\n castType(Math.min(...values));\n\nconst max_ = (...values: readonly Int8[]): Int8 =>\n castType(Math.max(...values));\n\nconst pow = (x: Int8, y: Int8): Int8 => clamp(x ** y);\n\nconst add = (x: Int8, y: Int8): Int8 => clamp(x + y);\n\nconst sub = (x: Int8, y: Int8): Int8 => clamp(x - y);\n\nconst mul = (x: Int8, y: Int8): Int8 => clamp(x * y);\n\nconst div = (x: Int8, y: Exclude<Int8, 0>): Int8 => clamp(Math.floor(x / y));\n\nconst random = (min: Int8, max: Int8): Int8 =>\n castType(randomImpl(castTypeImpl(min), castTypeImpl(max)));\n\n/**\n * Type guard that checks if a value is an 8-bit signed integer.\n *\n * An Int8 is a signed integer in the range [-128, 127], representing values\n * that fit in exactly 8 bits of memory.\n *\n * @param value - The value to check\n * @returns `true` if the value is an Int8, `false` otherwise\n */\nexport const isInt8 = is;\n\n/**\n * Casts a number to an Int8 branded type.\n *\n * This function validates that the input is within the Int8 range [-128, 127]\n * and is an integer, then returns it with the Int8 brand.\n *\n * @param value - The value to cast\n * @returns The value as an Int8 branded type\n * @throws {TypeError} If the value is not a valid 8-bit signed integer\n */\nexport const asInt8 = castType;\n\n/**\n * Namespace providing type-safe operations for Int8 (8-bit signed integer)\n * branded types.\n *\n * Int8 represents signed integers in the range [-128, 127], equivalent to a\n * signed byte in many programming languages. All operations automatically clamp\n * results to stay within this range, preventing overflow/underflow issues.\n *\n * This type is useful for:\n *\n * - Binary data processing (signed bytes)\n * - Small integer values with known bounds\n * - Embedded systems programming\n * - Memory-efficient integer storage\n * - Image processing (signed pixel offsets)\n */\nexport const Int8 = {\n /**\n * Type guard that checks if a value is an 8-bit signed integer.\n *\n * @param value - The value to check\n * @returns `true` if the value is in range [-128, 127] and is an integer\n * @see {@link isInt8} for usage examples\n */\n is,\n\n /**\n * The minimum value for an 8-bit signed integer.\n *\n * @readonly\n */\n MIN_VALUE,\n\n /**\n * The maximum value for an 8-bit signed integer.\n *\n * @readonly\n */\n MAX_VALUE,\n\n /**\n * Returns the minimum value from a list of Int8 values.\n *\n * @param values - The Int8 values to compare (at least one required)\n * @returns The smallest value as an Int8\n */\n min: min_,\n\n /**\n * Returns the maximum value from a list of Int8 values.\n *\n * @param values - The Int8 values to compare (at least one required)\n * @returns The largest value as an Int8\n */\n max: max_,\n\n /**\n * Clamps a number to the Int8 range.\n *\n * @param value The number to clamp.\n * @returns The value clamped to [-128, 127] as an Int8.\n */\n clamp,\n\n /**\n * Returns the absolute value of an Int8.\n *\n * @param value The Int8 value.\n * @returns The absolute value as an Int8, clamped to valid range.\n */\n abs,\n\n /**\n * Generates a random Int8 value within the specified range (inclusive).\n *\n * Both bounds are inclusive. If min > max, they are automatically swapped.\n *\n * @param min - The minimum value (inclusive)\n * @param max - The maximum value (inclusive)\n * @returns A random Int8 in the range [min, max]\n */\n random,\n\n /**\n * Raises x to the power of y, clamped to Int8 range.\n *\n * @param x - The base\n * @param y - The exponent\n * @returns `x ** y` clamped to [-128, 127]\n */\n pow,\n\n /**\n * Adds two Int8 values, clamped to Int8 range.\n *\n * @param x - First operand\n * @param y - Second operand\n * @returns `x + y` clamped to [-128, 127]\n */\n add,\n\n /**\n * Subtracts two Int8 values, clamped to Int8 range.\n *\n * @param x - First operand\n * @param y - Second operand\n * @returns `x - y` clamped to [-128, 127]\n */\n sub,\n\n /**\n * Multiplies two Int8 values, clamped to Int8 range.\n *\n * @param x - First operand\n * @param y - Second operand\n * @returns `x * y` clamped to [-128, 127]\n */\n mul,\n\n /**\n * Divides two Int8 values, clamped to Int8 range.\n *\n * @param x - The dividend\n * @param y - The divisor (cannot be 0)\n * @returns `⌊x / y⌋` clamped to [-128, 127]\n */\n div,\n} as const;\n\nexpectType<\n keyof typeof Int8,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n Int16,\n 'int' | 'range'\n >\n>('=');\n"],"names":[],"mappings":";;AAUA,MAAM,iBAAA,GAAoB,2BAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA,EAAU,YAAA;AAAA,EACV,KAAA,EAAO,SAAA;AAAA,EACP,EAAA,EAAI,MAAA;AAAA,EACJ,MAAA,EAA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,CAAa,GAAG,CAAC,CAAC,CAAA;AAWpD,MAAM,MAAA,GAAS;AAYf,MAAM,MAAA,GAAS;AAkBf,MAAM,IAAA,GAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlB,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,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA;AACF;;;;"}
1
+ {"version":3,"file":"int8.mjs","sources":["../../../src/number/enum/int8.mts"],"sourcesContent":["import {\n type AbsoluteValue,\n type Int16,\n type Int8 as TtfImported_Int8,\n} from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type Int8 = TtfImported_Int8;\n\nconst typeNameInMessage = 'an integer in [-128, 127]';\n\nconst {\n MAX_VALUE,\n MIN_VALUE,\n castType: castTypeImpl,\n clamp: clampImpl,\n is: isImpl,\n random: randomImpl,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger<\n Int16,\n -128,\n 127\n>({\n integerOrSafeInteger: 'SafeInteger',\n MIN_VALUE: -128,\n MAX_VALUE: 127,\n typeNameInMessage,\n} as const);\n\nconst is = (x: number): x is Int8 => isImpl(x);\n\nconst castType = (x: number): Int8 =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n castTypeImpl(x) as Int8;\n\nconst clamp = (a: number): Int8 => castType(clampImpl(a));\n\nconst abs = <N extends Int8>(x: N): AbsoluteValue<N> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Math.abs(x) as unknown as AbsoluteValue<N>;\n\nconst min_ = (...values: readonly Int8[]): Int8 =>\n castType(Math.min(...values));\n\nconst max_ = (...values: readonly Int8[]): Int8 =>\n castType(Math.max(...values));\n\nconst pow = (x: Int8, y: Int8): Int8 => clamp(x ** y);\n\nconst add = (x: Int8, y: Int8): Int8 => clamp(x + y);\n\nconst sub = (x: Int8, y: Int8): Int8 => clamp(x - y);\n\nconst mul = (x: Int8, y: Int8): Int8 => clamp(x * y);\n\nconst div = (x: Int8, y: Exclude<Int8, 0>): Int8 => clamp(Math.floor(x / y));\n\nconst random = (min: Int8, max: Int8): Int8 =>\n castType(randomImpl(castTypeImpl(min), castTypeImpl(max)));\n\n/**\n * Type guard that checks if a value is an integer in [-128, 127].\n *\n * Returns `true` for an integer in [-128, 127] — a value with no fractional\n * component.\n *\n * @param value - The value to check\n * @returns `true` if the value is an integer in [-128, 127], `false` otherwise\n */\nexport const isInt8 = is;\n\n/**\n * Casts a `number` to the `Int8` branded type.\n *\n * Validates that the value is an integer in [-128, 127] and returns it with the\n * `Int8` brand. Throws a `TypeError` otherwise.\n *\n * @param value - The value to cast\n * @returns The value as an `Int8`\n * @throws {TypeError} If the value is not an integer in [-128, 127]\n */\nexport const asInt8 = castType;\n\n/**\n * Namespace providing type-safe operations for the `Int8` branded type.\n *\n * The `Int8` type represents an integer in [-128, 127]. Division (`div`) uses\n * floor division.\n */\nexport const Int8 = {\n /**\n * Type guard that checks if a value is an integer in [-128, 127].\n *\n * @param value - The value to check\n * @returns `true` if the value is an integer in [-128, 127], `false` otherwise\n * @see {@link isInt8} for usage examples\n */\n is,\n\n /**\n * The smallest value representable as `Int8`.\n */\n MIN_VALUE,\n\n /**\n * The largest value representable as `Int8`.\n */\n MAX_VALUE,\n\n /**\n * Returns the smallest of the given integers.\n *\n * @param values - The integers to compare (at least one required)\n * @returns The smallest value as an `Int8`\n */\n min: min_,\n\n /**\n * Returns the largest of the given integers.\n *\n * @param values - The integers to compare (at least one required)\n * @returns The largest value as an `Int8`\n */\n max: max_,\n\n /**\n * Clamps a `number` into the `Int8` range, rounding to the nearest integer\n * and constraining the result to `[MIN_VALUE, MAX_VALUE]`.\n *\n * @param value - The value to clamp\n * @returns The clamped value as an `Int8`\n */\n clamp,\n\n /**\n * Returns the absolute value of an integer in [-128, 127].\n *\n * The result is non-negative and keeps the `Int8` brand.\n *\n * @param a - The integer value\n * @returns The absolute value as a non-negative `Int8`\n */\n abs,\n\n /**\n * Generates a random `Int8` within the given range.\n *\n * The range is inclusive on both ends.\n *\n * @param min - The minimum value (inclusive)\n * @param max - The maximum value (inclusive)\n * @returns A random `Int8` in `[min, max]`\n */\n random,\n\n /**\n * Raises `a` to the power `b`, returning `a ** b` as an `Int8` (floored to an\n * integer).\n *\n * @param a - The base integer\n * @param b - The exponent integer\n * @returns `a ** b` as an `Int8`\n */\n pow,\n\n /**\n * Adds two integers, returning `a + b` as an `Int8`.\n *\n * @param a - The first integer\n * @param b - The second integer\n * @returns The sum of `a` and `b` as an `Int8`\n */\n add,\n\n /**\n * Subtracts two integers, returning `a - b` as an `Int8`.\n *\n * @param a - The first integer\n * @param b - The second integer\n * @returns The difference of `a` and `b` as an `Int8`\n */\n sub,\n\n /**\n * Multiplies two integers, returning `a * b` as an `Int8`.\n *\n * @param a - The first integer\n * @param b - The second integer\n * @returns The product of `a` and `b` as an `Int8`\n */\n mul,\n\n /**\n * Divides two integers using floor division (`⌊a / b⌋`): the result is `a /\n * b` rounded toward negative infinity, as an `Int8`.\n *\n * @param a - The dividend\n * @param b - The divisor (must be non-zero)\n * @returns The floored quotient as an `Int8`\n */\n div,\n} as const;\n\nexpectType<\n keyof typeof Int8,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n Int16,\n 'int' | 'range'\n >\n>('=');\n"],"names":[],"mappings":";;AAUA,MAAM,iBAAA,GAAoB,2BAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA,EAAU,YAAA;AAAA,EACV,KAAA,EAAO,SAAA;AAAA,EACP,EAAA,EAAI,MAAA;AAAA,EACJ,MAAA,EAAQ;AACV,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,aAAA;AAAA,EACtB,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW,GAAA;AAAA,EACX;AACF,CAAU,CAAA;AAEV,MAAM,EAAA,GAAK,CAAC,CAAA,KAAyB,MAAA,CAAO,CAAC,CAAA;AAE7C,MAAM,WAAW,CAAC,CAAA;AAAA;AAAA,EAEhB,aAAa,CAAC;AAAA,CAAA;AAEhB,MAAM,QAAQ,CAAC,CAAA,KAAoB,QAAA,CAAS,SAAA,CAAU,CAAC,CAAC,CAAA;AAExD,MAAM,MAAM,CAAiB,CAAA;AAAA;AAAA,EAE3B,IAAA,CAAK,IAAI,CAAC;AAAA,CAAA;AAEZ,MAAM,IAAA,GAAO,IAAI,MAAA,KACf,QAAA,CAAS,KAAK,GAAA,CAAI,GAAG,MAAM,CAAC,CAAA;AAE9B,MAAM,IAAA,GAAO,IAAI,MAAA,KACf,QAAA,CAAS,KAAK,GAAA,CAAI,GAAG,MAAM,CAAC,CAAA;AAE9B,MAAM,MAAM,CAAC,CAAA,EAAS,CAAA,KAAkB,KAAA,CAAM,KAAK,CAAC,CAAA;AAEpD,MAAM,MAAM,CAAC,CAAA,E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