ts-data-forge 14.6.2 → 14.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/array/impl/array-utils-creation.mjs +103 -103
  2. package/dist/array/impl/array-utils-element-access.mjs +46 -46
  3. package/dist/array/impl/array-utils-iterators.mjs +54 -54
  4. package/dist/array/impl/array-utils-length-bounded-array-cast.mjs +49 -49
  5. package/dist/array/impl/array-utils-length-bounded-array-guard.mjs +40 -40
  6. package/dist/array/impl/array-utils-length-bounded-tuple-cast.mjs +42 -42
  7. package/dist/array/impl/array-utils-length-bounded-tuple-guard.mjs +46 -46
  8. package/dist/array/impl/array-utils-modification.mjs +4 -4
  9. package/dist/array/impl/array-utils-reducing-value.mjs +11 -11
  10. package/dist/array/impl/array-utils-search.mjs +6 -6
  11. package/dist/array/impl/array-utils-set-op.mjs +116 -116
  12. package/dist/array/impl/array-utils-size.mjs +6 -6
  13. package/dist/array/impl/array-utils-slice-clamped.mjs +1 -1
  14. package/dist/array/impl/array-utils-slicing.mjs +56 -56
  15. package/dist/array/impl/array-utils-transformation.mjs +156 -156
  16. package/dist/array/impl/array-utils-validation.mjs +36 -36
  17. package/dist/collections/imap-mapped.mjs +195 -195
  18. package/dist/collections/imap.mjs +143 -143
  19. package/dist/collections/iset-mapped.mjs +320 -320
  20. package/dist/collections/iset.mjs +207 -207
  21. package/dist/collections/queue.mjs +130 -130
  22. package/dist/collections/stack.mjs +125 -125
  23. package/dist/expect-type.mjs +68 -68
  24. package/dist/functional/async-result/impl/async-result-flat-map.mjs +3 -3
  25. package/dist/functional/async-result/impl/async-result-map-err.mjs +2 -2
  26. package/dist/functional/async-result/impl/async-result-map.mjs +2 -2
  27. package/dist/functional/async-result/impl/async-result-unwrap-or.mjs +31 -31
  28. package/dist/functional/optional/impl/optional-expect-to-be.mjs +1 -1
  29. package/dist/functional/optional/impl/optional-filter.mjs +1 -1
  30. package/dist/functional/optional/impl/optional-flat-map.mjs +1 -1
  31. package/dist/functional/optional/impl/optional-from-nullable.mjs +24 -24
  32. package/dist/functional/optional/impl/optional-is-none.mjs +19 -19
  33. package/dist/functional/optional/impl/optional-is-optional.mjs +18 -18
  34. package/dist/functional/optional/impl/optional-is-some.mjs +20 -20
  35. package/dist/functional/optional/impl/optional-map.mjs +2 -2
  36. package/dist/functional/optional/impl/optional-match.mjs +2 -2
  37. package/dist/functional/optional/impl/optional-none.mjs +16 -16
  38. package/dist/functional/optional/impl/optional-or-else.mjs +1 -1
  39. package/dist/functional/optional/impl/optional-some.mjs +19 -19
  40. package/dist/functional/optional/impl/optional-to-nullable.mjs +26 -26
  41. package/dist/functional/optional/impl/optional-unwrap-or.mjs +1 -1
  42. package/dist/functional/optional/impl/optional-unwrap-throw.mjs +28 -28
  43. package/dist/functional/optional/impl/optional-unwrap.mjs +1 -1
  44. package/dist/functional/optional/impl/optional-zip.mjs +32 -32
  45. package/dist/functional/optional/impl/tag.mjs +1 -1
  46. package/dist/functional/pipe.mjs +19 -19
  47. package/dist/functional/result/impl/result-err.mjs +25 -25
  48. package/dist/functional/result/impl/result-expect-to-be.mjs +2 -2
  49. package/dist/functional/result/impl/result-flat-map.mjs +4 -4
  50. package/dist/functional/result/impl/result-fold.mjs +4 -4
  51. package/dist/functional/result/impl/result-from-optional.mjs +2 -2
  52. package/dist/functional/result/impl/result-from-promise.mjs +34 -34
  53. package/dist/functional/result/impl/result-from-throwable.mjs +29 -29
  54. package/dist/functional/result/impl/result-is-err.mjs +19 -19
  55. package/dist/functional/result/impl/result-is-ok.mjs +19 -19
  56. package/dist/functional/result/impl/result-is-result.mjs +19 -19
  57. package/dist/functional/result/impl/result-map-err.mjs +4 -4
  58. package/dist/functional/result/impl/result-map.mjs +4 -4
  59. package/dist/functional/result/impl/result-match.mjs +3 -3
  60. package/dist/functional/result/impl/result-ok.mjs +25 -25
  61. package/dist/functional/result/impl/result-or-else.mjs +2 -2
  62. package/dist/functional/result/impl/result-safe-try.mjs +15 -15
  63. package/dist/functional/result/impl/result-safe-unwrap.mjs +33 -33
  64. package/dist/functional/result/impl/result-swap.mjs +20 -20
  65. package/dist/functional/result/impl/result-to-optional.mjs +27 -27
  66. package/dist/functional/result/impl/result-unwrap-err-or.mjs +2 -2
  67. package/dist/functional/result/impl/result-unwrap-err-throw.mjs +31 -31
  68. package/dist/functional/result/impl/result-unwrap-err.mjs +30 -30
  69. package/dist/functional/result/impl/result-unwrap-ok-or.mjs +2 -2
  70. package/dist/functional/result/impl/result-unwrap-ok.mjs +1 -1
  71. package/dist/functional/result/impl/result-unwrap-throw.mjs +31 -31
  72. package/dist/functional/result/impl/result-zip.mjs +29 -29
  73. package/dist/functional/result/impl/tag.mjs +1 -1
  74. package/dist/functional/ternary-result/impl/tag.mjs +2 -2
  75. package/dist/functional/ternary-result/impl/ternary-result-err.mjs +13 -13
  76. package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs +4 -4
  77. package/dist/functional/ternary-result/impl/ternary-result-fold.mjs +4 -4
  78. package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +18 -18
  79. package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +17 -17
  80. package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs +17 -17
  81. package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs +19 -19
  82. package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +19 -19
  83. package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs +18 -18
  84. package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs +2 -2
  85. package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs +3 -3
  86. package/dist/functional/ternary-result/impl/ternary-result-map.mjs +4 -4
  87. package/dist/functional/ternary-result/impl/ternary-result-ok.mjs +14 -14
  88. package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs +19 -19
  89. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs +19 -19
  90. package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs +17 -17
  91. package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs +1 -1
  92. package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs +20 -20
  93. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs +18 -18
  94. package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs +17 -17
  95. package/dist/functional/ternary-result/impl/ternary-result-warn.mjs +16 -16
  96. package/dist/functional/ternary-result/impl/ternary-result-zip.mjs +31 -31
  97. package/dist/functional/ternary-result/impl/variant-name.mjs +1 -1
  98. package/dist/guard/has-key.mjs +41 -41
  99. package/dist/guard/is-non-empty-string.mjs +37 -37
  100. package/dist/guard/is-non-null-object.mjs +34 -34
  101. package/dist/guard/is-primitive.mjs +31 -31
  102. package/dist/guard/is-record.mjs +86 -86
  103. package/dist/guard/is-type.mjs +387 -387
  104. package/dist/guard/key-is-in.mjs +40 -40
  105. package/dist/iterator/range.mjs +1 -1
  106. package/dist/json/json.mjs +289 -289
  107. package/dist/number/branded-types/finite-number.mjs +116 -116
  108. package/dist/number/branded-types/int.mjs +223 -223
  109. package/dist/number/branded-types/int16.mjs +116 -116
  110. package/dist/number/branded-types/int32.mjs +116 -116
  111. package/dist/number/branded-types/negative-finite-number.mjs +126 -126
  112. package/dist/number/branded-types/negative-int.mjs +104 -104
  113. package/dist/number/branded-types/negative-safe-int.mjs +104 -104
  114. package/dist/number/branded-types/non-negative-finite-number.mjs +132 -132
  115. package/dist/number/branded-types/non-negative-int16.mjs +113 -113
  116. package/dist/number/branded-types/non-negative-int32.mjs +113 -113
  117. package/dist/number/branded-types/non-positive-finite-number.mjs +116 -116
  118. package/dist/number/branded-types/non-positive-int.mjs +97 -97
  119. package/dist/number/branded-types/non-positive-safe-int.mjs +98 -98
  120. package/dist/number/branded-types/non-zero-finite-number.mjs +112 -112
  121. package/dist/number/branded-types/non-zero-int.mjs +82 -82
  122. package/dist/number/branded-types/non-zero-int16.mjs +95 -95
  123. package/dist/number/branded-types/non-zero-int32.mjs +95 -95
  124. package/dist/number/branded-types/non-zero-safe-int.mjs +99 -99
  125. package/dist/number/branded-types/non-zero-uint16.mjs +95 -95
  126. package/dist/number/branded-types/non-zero-uint32.mjs +95 -95
  127. package/dist/number/branded-types/positive-finite-number.mjs +134 -134
  128. package/dist/number/branded-types/positive-int.mjs +237 -237
  129. package/dist/number/branded-types/positive-int16.mjs +110 -110
  130. package/dist/number/branded-types/positive-int32.mjs +110 -110
  131. package/dist/number/branded-types/positive-safe-int.mjs +268 -268
  132. package/dist/number/branded-types/positive-uint16.mjs +110 -110
  133. package/dist/number/branded-types/positive-uint32.mjs +110 -110
  134. package/dist/number/branded-types/safe-int.mjs +259 -259
  135. package/dist/number/branded-types/safe-uint.mjs +111 -111
  136. package/dist/number/branded-types/uint.mjs +225 -225
  137. package/dist/number/branded-types/uint16.mjs +108 -108
  138. package/dist/number/branded-types/uint32.mjs +108 -108
  139. package/dist/number/enum/int8.mjs +118 -118
  140. package/dist/number/enum/uint8.mjs +109 -109
  141. package/dist/number/num-arithmetic-types.mjs +1 -1
  142. package/dist/number/num.mjs +478 -478
  143. package/dist/number/refined-number-utils.mjs +170 -170
  144. package/dist/object/object.mjs +234 -234
  145. package/dist/others/cast-mutable.mjs +33 -33
  146. package/dist/others/cast-readonly.mjs +32 -32
  147. package/dist/others/debounce-function.mjs +13 -13
  148. package/dist/others/fast-deep-equal.mjs +14 -14
  149. package/dist/others/if-then.mjs +29 -29
  150. package/dist/others/tuple.mjs +50 -50
  151. package/dist/others/unknown-to-string.mjs +38 -38
  152. package/dist/promise/promise.mjs +47 -47
  153. package/dist/string/str.mjs +177 -177
  154. package/dist/types.mjs +1 -1
  155. package/package.json +6 -6
  156. package/src/guard/is-type.test.mts +2 -2
  157. package/src/number/branded-types/finite-number.test.mts +1 -1
  158. package/src/number/branded-types/int.test.mts +1 -1
  159. package/src/number/branded-types/int16.test.mts +1 -1
  160. package/src/number/branded-types/int32.test.mts +1 -1
  161. package/src/number/branded-types/non-negative-finite-number.test.mts +1 -1
  162. package/src/number/branded-types/non-negative-int16.test.mts +1 -1
  163. package/src/number/branded-types/non-negative-int32.test.mts +1 -1
  164. package/src/number/branded-types/non-zero-finite-number.test.mts +1 -1
  165. package/src/number/branded-types/non-zero-int.test.mts +1 -1
  166. package/src/number/branded-types/non-zero-int16.test.mts +1 -1
  167. package/src/number/branded-types/non-zero-int32.test.mts +1 -1
  168. package/src/number/branded-types/non-zero-safe-int.test.mts +1 -1
  169. package/src/number/branded-types/non-zero-uint16.test.mts +1 -1
  170. package/src/number/branded-types/non-zero-uint32.test.mts +1 -1
  171. package/src/number/branded-types/positive-finite-number.test.mts +1 -1
  172. package/src/number/branded-types/positive-int.test.mts +1 -1
  173. package/src/number/branded-types/positive-int16.test.mts +1 -1
  174. package/src/number/branded-types/positive-int32.test.mts +1 -1
  175. package/src/number/branded-types/positive-safe-int.test.mts +1 -1
  176. package/src/number/branded-types/positive-uint16.test.mts +1 -1
  177. package/src/number/branded-types/positive-uint32.test.mts +1 -1
  178. package/src/number/branded-types/safe-int.test.mts +1 -1
  179. package/src/number/branded-types/safe-uint.test.mts +1 -1
  180. package/src/number/branded-types/uint.test.mts +1 -1
  181. package/src/number/branded-types/uint16.test.mts +1 -1
  182. package/src/number/branded-types/uint32.test.mts +1 -1
@@ -1,158 +1,158 @@
1
- /**
2
- * Namespace providing type guards and runtime-checked casts for the branded
3
- * length-constrained string types (`MinLengthString`, `MaxLengthString`,
4
- * `BoundedLengthString`, `FixedLengthString`).
5
- *
6
- * Lengths are measured in UTF-16 code units (the same unit as
7
- * `String.prototype.length`), so characters outside the Basic Multilingual
8
- * Plane (e.g. emoji) count as 2.
9
- */
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
10
  export var Str;
11
11
  (function (Str) {
12
- /**
13
- * Type guard that checks if a string has at least `minLength` characters.
14
- *
15
- * **Type Narrowing Behavior:**
16
- *
17
- * - Narrows the input to `MinLengthString<MinLength>` while preserving the
18
- * original string type (e.g. literal types) via intersection.
19
- * - The result participates in the length-constraint subtyping relation: for
20
- * example, a value narrowed to `MinLengthString<3>` is assignable to
21
- * `MinLengthString<1>` (= `NonEmptyString`).
22
- *
23
- * @example
24
- *
25
- * ```ts
26
- * const input: string = 'very-secret-password';
27
- *
28
- * assert.isTrue(Str.isMinLengthString(12, input));
29
- *
30
- * assert.isFalse(Str.isMinLengthString(12, 'short'));
31
- *
32
- * if (Str.isMinLengthString(12, input)) {
33
- * const nonEmpty: NonEmptyString = input; // OK (12 >= 1)
34
- *
35
- * assert.isTrue(nonEmpty.length >= 12);
36
- * }
37
- * ```
38
- *
39
- * @template MinLength - The minimum number of characters (inclusive).
40
- * @template S - The input string type (literal types are preserved).
41
- * @param minLength - The minimum number of characters (inclusive).
42
- * @param s - The string to check.
43
- * @returns `true` if `s.length >= minLength`, `false` otherwise. When `true`,
44
- * TypeScript narrows `s` to `MinLengthString<MinLength> & S`.
45
- */
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
46
  Str.isMinLengthString = (minLength, s) => s.length >= minLength;
47
- /**
48
- * Type guard that checks if a string has at most `maxLength` characters.
49
- *
50
- * **Type Narrowing Behavior:**
51
- *
52
- * - Narrows the input to `MaxLengthString<MaxLength>` while preserving the
53
- * original string type (e.g. literal types) via intersection.
54
- * - The result participates in the length-constraint subtyping relation: for
55
- * example, a value narrowed to `MaxLengthString<16>` is assignable to
56
- * `MaxLengthString<32>`.
57
- *
58
- * @example
59
- *
60
- * ```ts
61
- * const input: string = 'noshiro';
62
- *
63
- * assert.isTrue(Str.isMaxLengthString(32, input));
64
- *
65
- * assert.isFalse(Str.isMaxLengthString(3, input));
66
- *
67
- * if (Str.isMaxLengthString(32, input)) {
68
- * const relaxed: MaxLengthString<64> = input; // OK (32 <= 64)
69
- *
70
- * assert.isTrue(relaxed.length <= 32);
71
- * }
72
- * ```
73
- *
74
- * @template MaxLength - The maximum number of characters (inclusive).
75
- * @template S - The input string type (literal types are preserved).
76
- * @param maxLength - The maximum number of characters (inclusive).
77
- * @param s - The string to check.
78
- * @returns `true` if `s.length <= maxLength`, `false` otherwise. When `true`,
79
- * TypeScript narrows `s` to `MaxLengthString<MaxLength> & S`.
80
- */
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
81
  Str.isMaxLengthString = (maxLength, s) => s.length <= maxLength;
82
- /**
83
- * Type guard that checks if a string's length is within the inclusive range
84
- * `[minLength, maxLength]`.
85
- *
86
- * **Type Narrowing Behavior:**
87
- *
88
- * - Narrows the input to `BoundedLengthString<MinLength, MaxLength>` while
89
- * preserving the original string type (e.g. literal types) via intersection.
90
- * - Since `BoundedLengthString` is the intersection of `MinLengthString` and
91
- * `MaxLengthString`, the narrowed value is assignable to both, and both
92
- * bounds can be weakened independently.
93
- *
94
- * @example
95
- *
96
- * ```ts
97
- * const input: string = 'user-12345678';
98
- *
99
- * assert.isTrue(Str.isBoundedLengthString(8, 16, input));
100
- *
101
- * assert.isFalse(Str.isBoundedLengthString(8, 16, 'user'));
102
- *
103
- * if (Str.isBoundedLengthString(8, 16, input)) {
104
- * const userId: BoundedLengthString<1, 255> = input; // OK ([8, 16] ⊆ [1, 255])
105
- *
106
- * assert.isTrue(userId.length >= 8 && userId.length <= 16);
107
- * }
108
- * ```
109
- *
110
- * @template MinLength - The minimum number of characters (inclusive).
111
- * @template MaxLength - The maximum number of characters (inclusive).
112
- * @template S - The input string type (literal types are preserved).
113
- * @param minLength - The minimum number of characters (inclusive).
114
- * @param maxLength - The maximum number of characters (inclusive).
115
- * @param s - The string to check.
116
- * @returns `true` if `minLength <= s.length && s.length <= maxLength`, `false`
117
- * otherwise. When `true`, TypeScript narrows `s` to
118
- * `BoundedLengthString<MinLength, MaxLength> & S`.
119
- */
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
120
  Str.isBoundedLengthString = (minLength, maxLength, s) => s.length >= minLength && s.length <= maxLength;
121
- /**
122
- * Type guard that checks if a string has exactly `length` characters.
123
- *
124
- * **Type Narrowing Behavior:**
125
- *
126
- * - Narrows the input to `FixedLengthString<Length>` while preserving the
127
- * original string type (e.g. literal types) via intersection.
128
- * - Since `FixedLengthString<Length>` is defined as
129
- * `BoundedLengthString<Length, Length>`, the narrowed value is assignable to
130
- * any `MinLengthString<N>` with `N <= Length` and any `MaxLengthString<N>`
131
- * with `N >= Length`.
132
- *
133
- * @example
134
- *
135
- * ```ts
136
- * const input: string = 'JP';
137
- *
138
- * assert.isTrue(Str.isFixedLengthString(2, input));
139
- *
140
- * assert.isFalse(Str.isFixedLengthString(3, input));
141
- *
142
- * if (Str.isFixedLengthString(2, input)) {
143
- * const atMost5: MaxLengthString<5> = input; // OK (2 <= 5)
144
- *
145
- * assert.isTrue(atMost5.length === 2);
146
- * }
147
- * ```
148
- *
149
- * @template Length - The exact number of characters.
150
- * @template S - The input string type (literal types are preserved).
151
- * @param length - The exact number of characters.
152
- * @param s - The string to check.
153
- * @returns `true` if `s.length === length`, `false` otherwise. When `true`,
154
- * TypeScript narrows `s` to `FixedLengthString<Length> & S`.
155
- */
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
156
  Str.isFixedLengthString = (length, s) => s.length === length;
157
157
  function asMinLengthString(...args) {
158
158
  switch (args.length) {
@@ -218,33 +218,33 @@ export var Str;
218
218
  }
219
219
  return s;
220
220
  };
221
- /**
222
- * Casts a string to `NonEmptyString` after checking that it has at least one
223
- * character.
224
- *
225
- * `NonEmptyString` is an alias of `MinLengthString<1>`, so this is the
226
- * length-1 specialization of {@link asMinLengthString}. Use this instead of
227
- * writing `s as unknown as NonEmptyString`: the length is verified at
228
- * runtime, and the original string type (e.g. literal types) is preserved
229
- * via intersection.
230
- *
231
- * @example
232
- *
233
- * ```ts
234
- * const name = Str.asNonEmptyString('noshiro');
235
- *
236
- * const nonEmpty: NonEmptyString = name; // OK
237
- *
238
- * assert.isTrue(nonEmpty.length >= 1);
239
- *
240
- * assert.throws(() => Str.asNonEmptyString('')); // length 0 < 1
241
- * ```
242
- *
243
- * @template S - The input string type (literal types are preserved).
244
- * @param s - The string to cast.
245
- * @returns `s` typed as `NonEmptyString & S`.
246
- * @throws {TypeError} If `s` is empty.
247
- */
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
248
  Str.asNonEmptyString = (s) => {
249
249
  if (!Str.isMinLengthString(1, s)) {
250
250
  throw new TypeError('Expected a non-empty string, got an empty string');
package/dist/types.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  export {};
2
- // #endregion Result
2
+
3
3
  //# sourceMappingURL=types.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-data-forge",
3
- "version": "14.6.2",
3
+ "version": "14.6.3",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "typescript",
@@ -42,20 +42,20 @@
42
42
  "devDependencies": {
43
43
  "@emotion/react": "11.14.0",
44
44
  "@emotion/styled": "11.14.1",
45
- "@mui/material": "9.3.1",
45
+ "@mui/material": "9.4.0",
46
46
  "@types/react": "19.2.18",
47
47
  "@vitest/browser-playwright": "4.1.11",
48
48
  "dedent": "1.7.2",
49
- "eslint-config-typed": "5.10.5",
50
- "eslint-plugin-ts-fortress": "1.1.0",
51
- "eslint-plugin-ts-type-forge": "0.8.0",
49
+ "eslint-config-typed": "5.11.1",
50
+ "eslint-plugin-ts-fortress": "1.2.0",
51
+ "eslint-plugin-ts-type-forge": "0.8.1",
52
52
  "immer": "11.1.18",
53
53
  "playwright": "1.62.1",
54
54
  "prettier": "3.9.6",
55
55
  "prettier-plugin-organize-imports": "4.3.0",
56
56
  "prettier-plugin-packagejson": "3.0.2",
57
57
  "react": "19.2.8",
58
- "ts-repo-utils": "10.5.0",
58
+ "ts-repo-utils": "10.6.0",
59
59
  "typedoc": "0.28.20",
60
60
  "typedoc-github-theme": "0.4.0",
61
61
  "vite": "8.2.2"
@@ -124,7 +124,7 @@ describe(isString, () => {
124
124
 
125
125
  assert.isTrue(isString('123'));
126
126
 
127
- assert.isTrue(isString(`template`));
127
+ assert.isTrue(isString('template'));
128
128
  });
129
129
 
130
130
  test('should return false for non-strings', () => {
@@ -408,7 +408,7 @@ describe(isNotString, () => {
408
408
 
409
409
  assert.isFalse(isNotString('123'));
410
410
 
411
- assert.isFalse(isNotString(`template`));
411
+ assert.isFalse(isNotString('template'));
412
412
  });
413
413
 
414
414
  test('should return true for non-string values', () => {
@@ -42,7 +42,7 @@ describe('FiniteNumber test', () => {
42
42
  { name: 'Number.POSITIVE_INFINITY', value: Number.POSITIVE_INFINITY },
43
43
  { name: 'Number.NEGATIVE_INFINITY', value: Number.NEGATIVE_INFINITY },
44
44
  ] as const)(
45
- `asFiniteNumber($name) should throw a TypeError`,
45
+ 'asFiniteNumber($name) should throw a TypeError',
46
46
  ({ value }) => {
47
47
  expect(() => asFiniteNumber(value)).toThrow(
48
48
  new TypeError(`Expected a finite number, got: ${value}`),
@@ -47,7 +47,7 @@ describe('Int test', () => {
47
47
  { name: 'Number.NEGATIVE_INFINITY', value: Number.NEGATIVE_INFINITY },
48
48
  { name: '1.2', value: 1.2 },
49
49
  { name: '-3.4', value: -3.4 },
50
- ] as const)(`asInt($name) should throw a TypeError`, ({ value }) => {
50
+ ] as const)('asInt($name) should throw a TypeError', ({ value }) => {
51
51
  expect(() => asInt(value)).toThrow(
52
52
  new TypeError(`Expected an integer, got: ${value}`),
53
53
  );
@@ -57,7 +57,7 @@ describe('Int16 test', () => {
57
57
  { name: 'Number.NEGATIVE_INFINITY', value: Number.NEGATIVE_INFINITY },
58
58
  { name: '1.2', value: 1.2 },
59
59
  { name: '-3.4', value: -3.4 },
60
- ] as const)(`asInt16($name) should throw a TypeError`, ({ value }) => {
60
+ ] as const)('asInt16($name) should throw a TypeError', ({ value }) => {
61
61
  expect(() => asInt16(value)).toThrow(
62
62
  new TypeError(`Expected an integer in [-2^15, 2^15), got: ${value}`),
63
63
  );
@@ -57,7 +57,7 @@ describe('Int32 test', () => {
57
57
  { name: 'Number.NEGATIVE_INFINITY', value: Number.NEGATIVE_INFINITY },
58
58
  { name: '1.2', value: 1.2 },
59
59
  { name: '-3.4', value: -3.4 },
60
- ] as const)(`asInt32($name) should throw a TypeError`, ({ value }) => {
60
+ ] as const)('asInt32($name) should throw a TypeError', ({ value }) => {
61
61
  expect(() => asInt32(value)).toThrow(
62
62
  new TypeError(`Expected an integer in [-2^31, 2^31), got: ${value}`),
63
63
  );
@@ -56,7 +56,7 @@ describe('NonNegativeFiniteNumber test', () => {
56
56
  { name: 'Number.NEGATIVE_INFINITY', value: Number.NEGATIVE_INFINITY },
57
57
  { name: '-1.2', value: -1.2 },
58
58
  ] as const)(
59
- `asNonNegativeFiniteNumber($name) should throw a TypeError`,
59
+ 'asNonNegativeFiniteNumber($name) should throw a TypeError',
60
60
  ({ value }) => {
61
61
  expect(() => asNonNegativeFiniteNumber(value)).toThrow(
62
62
  new TypeError(`Expected a non-negative finite number, got: ${value}`),
@@ -66,7 +66,7 @@ describe('NonNegativeInt16 test', () => {
66
66
  { name: '-1', value: -1 },
67
67
  { name: '32768', value: 32_768 },
68
68
  ] as const)(
69
- `asNonNegativeInt16($name) should throw a TypeError`,
69
+ 'asNonNegativeInt16($name) should throw a TypeError',
70
70
  ({ value }) => {
71
71
  expect(() => asNonNegativeInt16(value)).toThrow(
72
72
  new TypeError(
@@ -66,7 +66,7 @@ describe('NonNegativeInt32 test', () => {
66
66
  { name: '-1', value: -1 },
67
67
  { name: '2147483648', value: 2_147_483_648 },
68
68
  ] as const)(
69
- `asNonNegativeInt32($name) should throw a TypeError`,
69
+ 'asNonNegativeInt32($name) should throw a TypeError',
70
70
  ({ value }) => {
71
71
  expect(() => asNonNegativeInt32(value)).toThrow(
72
72
  new TypeError(
@@ -58,7 +58,7 @@ describe('NonZeroFiniteNumber test', () => {
58
58
  { name: 'Number.NEGATIVE_INFINITY', value: Number.NEGATIVE_INFINITY },
59
59
  { name: '0', value: 0 },
60
60
  ] as const)(
61
- `asNonZeroFiniteNumber($name) should throw a TypeError`,
61
+ 'asNonZeroFiniteNumber($name) should throw a TypeError',
62
62
  ({ value }) => {
63
63
  expect(() => asNonZeroFiniteNumber(value)).toThrow(
64
64
  new TypeError(`Expected a non-zero finite number, got: ${value}`),
@@ -51,7 +51,7 @@ describe('NonZeroInt test', () => {
51
51
  { name: '1.2', value: 1.2 },
52
52
  { name: '-3.4', value: -3.4 },
53
53
  { name: '0', value: 0 },
54
- ] as const)(`asNonZeroInt($name) should throw a TypeError`, ({ value }) => {
54
+ ] as const)('asNonZeroInt($name) should throw a TypeError', ({ value }) => {
55
55
  expect(() => asNonZeroInt(value)).toThrow(
56
56
  new TypeError(`Expected a non-zero integer, got: ${value}`),
57
57
  );
@@ -64,7 +64,7 @@ describe('NonZeroInt16 test', () => {
64
64
  { name: '32768', value: 32_768 },
65
65
  { name: '-32769', value: -32_769 },
66
66
  ] as const)(
67
- `asNonZeroInt16($name) should throw a TypeError`,
67
+ 'asNonZeroInt16($name) should throw a TypeError',
68
68
  ({ value }) => {
69
69
  expect(() => asNonZeroInt16(value)).toThrow(
70
70
  new TypeError(
@@ -64,7 +64,7 @@ describe('NonZeroInt32 test', () => {
64
64
  { name: '2147483648', value: 2_147_483_648 },
65
65
  { name: '-2147483649', value: -2_147_483_649 },
66
66
  ] as const)(
67
- `asNonZeroInt32($name) should throw a TypeError`,
67
+ 'asNonZeroInt32($name) should throw a TypeError',
68
68
  ({ value }) => {
69
69
  expect(() => asNonZeroInt32(value)).toThrow(
70
70
  new TypeError(
@@ -74,7 +74,7 @@ describe('NonZeroSafeInt test', () => {
74
74
  { name: '-3.4', value: -3.4 },
75
75
  { name: '0', value: 0 },
76
76
  ] as const)(
77
- `asNonZeroSafeInt($name) should throw a TypeError`,
77
+ 'asNonZeroSafeInt($name) should throw a TypeError',
78
78
  ({ value }) => {
79
79
  expect(() => asNonZeroSafeInt(value)).toThrow(
80
80
  new TypeError(`Expected a non-zero safe integer, got: ${value}`),
@@ -68,7 +68,7 @@ describe('NonZeroUint16 test', () => {
68
68
  { name: '-1', value: -1 },
69
69
  { name: '65536', value: 65_536 },
70
70
  ] as const)(
71
- `asNonZeroUint16($name) should throw a TypeError`,
71
+ 'asNonZeroUint16($name) should throw a TypeError',
72
72
  ({ value }) => {
73
73
  expect(() => asNonZeroUint16(value)).toThrow(
74
74
  new TypeError(
@@ -68,7 +68,7 @@ describe('NonZeroUint32 test', () => {
68
68
  { name: '-1', value: -1 },
69
69
  { name: '4294967296', value: 4_294_967_296 },
70
70
  ] as const)(
71
- `asNonZeroUint32($name) should throw a TypeError`,
71
+ 'asNonZeroUint32($name) should throw a TypeError',
72
72
  ({ value }) => {
73
73
  expect(() => asNonZeroUint32(value)).toThrow(
74
74
  new TypeError(
@@ -62,7 +62,7 @@ describe('PositiveFiniteNumber test', () => {
62
62
  { name: 'Number.NEGATIVE_INFINITY', value: Number.NEGATIVE_INFINITY },
63
63
  { name: '-1.2', value: -1.2 },
64
64
  ] as const)(
65
- `asPositiveFiniteNumber($name) should throw a TypeError`,
65
+ 'asPositiveFiniteNumber($name) should throw a TypeError',
66
66
  ({ value }) => {
67
67
  expect(() => asPositiveFiniteNumber(value)).toThrow(
68
68
  new TypeError(`Expected a positive finite number, got: ${value}`),
@@ -59,7 +59,7 @@ describe('PositiveInt test', () => {
59
59
  { name: '0', value: 0 },
60
60
  { name: '-1', value: -1 },
61
61
  ] as const)(
62
- `asPositiveInt($name) should throw a TypeError`,
62
+ 'asPositiveInt($name) should throw a TypeError',
63
63
  ({ value }) => {
64
64
  expect(() => asPositiveInt(value)).toThrow(
65
65
  new TypeError(`Expected a positive integer, got: ${value}`),
@@ -66,7 +66,7 @@ describe('PositiveInt16 test', () => {
66
66
  { name: '-1', value: -1 },
67
67
  { name: '32768', value: 32_768 },
68
68
  ] as const)(
69
- `asPositiveInt16($name) should throw a TypeError`,
69
+ 'asPositiveInt16($name) should throw a TypeError',
70
70
  ({ value }) => {
71
71
  expect(() => asPositiveInt16(value)).toThrow(
72
72
  new TypeError(
@@ -66,7 +66,7 @@ describe('PositiveInt32 test', () => {
66
66
  { name: '-1', value: -1 },
67
67
  { name: '2147483648', value: 2_147_483_648 },
68
68
  ] as const)(
69
- `asPositiveInt32($name) should throw a TypeError`,
69
+ 'asPositiveInt32($name) should throw a TypeError',
70
70
  ({ value }) => {
71
71
  expect(() => asPositiveInt32(value)).toThrow(
72
72
  new TypeError(
@@ -77,7 +77,7 @@ describe('PositiveSafeInt test', () => {
77
77
  { name: '0', value: 0 },
78
78
  { name: '-1', value: -1 },
79
79
  ] as const)(
80
- `asPositiveSafeInt($name) should throw a TypeError`,
80
+ 'asPositiveSafeInt($name) should throw a TypeError',
81
81
  ({ value }) => {
82
82
  expect(() => asPositiveSafeInt(value)).toThrow(
83
83
  new TypeError(`Expected a positive safe integer, got: ${value}`),
@@ -68,7 +68,7 @@ describe('PositiveUint16 test', () => {
68
68
  { name: '-1', value: -1 },
69
69
  { name: '65536', value: 65_536 },
70
70
  ] as const)(
71
- `asPositiveUint16($name) should throw a TypeError`,
71
+ 'asPositiveUint16($name) should throw a TypeError',
72
72
  ({ value }) => {
73
73
  expect(() => asPositiveUint16(value)).toThrow(
74
74
  new TypeError(
@@ -68,7 +68,7 @@ describe('PositiveUint32 test', () => {
68
68
  { name: '-1', value: -1 },
69
69
  { name: '4294967296', value: 4_294_967_296 },
70
70
  ] as const)(
71
- `asPositiveUint32($name) should throw a TypeError`,
71
+ 'asPositiveUint32($name) should throw a TypeError',
72
72
  ({ value }) => {
73
73
  expect(() => asPositiveUint32(value)).toThrow(
74
74
  new TypeError(
@@ -60,7 +60,7 @@ describe('SafeInt test', () => {
60
60
  { name: 'Number.NEGATIVE_INFINITY', value: Number.NEGATIVE_INFINITY },
61
61
  { name: '1.2', value: 1.2 },
62
62
  { name: '-3.4', value: -3.4 },
63
- ] as const)(`asSafeInt($name) should throw a TypeError`, ({ value }) => {
63
+ ] as const)('asSafeInt($name) should throw a TypeError', ({ value }) => {
64
64
  expect(() => asSafeInt(value)).toThrow(
65
65
  new TypeError(`Expected a safe integer, got: ${value}`),
66
66
  );