@sorrell/utilities 1.1.60 → 1.2.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 (247) hide show
  1. package/Distribution/PackageExports.Generated.json +122 -0
  2. package/Distribution/Types/Array/Array.Internal.Types.d.cts +43 -0
  3. package/Distribution/Types/Array/Array.Internal.Types.d.cts.map +10 -0
  4. package/Distribution/Types/Array/Array.Internal.Types.d.mts +43 -0
  5. package/Distribution/Types/Array/Array.Internal.Types.d.mts.map +10 -0
  6. package/Distribution/Types/Array/Array.Internal.d.cts +16 -0
  7. package/Distribution/Types/Array/Array.Internal.d.cts.map +10 -0
  8. package/Distribution/Types/Array/Array.Internal.d.mts +16 -0
  9. package/Distribution/Types/Array/Array.Internal.d.mts.map +10 -0
  10. package/Distribution/Types/Array/Array.Types.d.cts +92 -0
  11. package/Distribution/Types/Array/Array.Types.d.cts.map +10 -0
  12. package/Distribution/Types/Array/Array.Types.d.mts +92 -0
  13. package/Distribution/Types/Array/Array.Types.d.mts.map +10 -0
  14. package/Distribution/Types/Array/Array.d.cts +33 -0
  15. package/Distribution/Types/Array/Array.d.cts.map +10 -0
  16. package/Distribution/Types/Array/Array.d.mts +33 -0
  17. package/Distribution/Types/Array/Array.d.mts.map +10 -0
  18. package/Distribution/Types/Array/index.d.cts +9 -0
  19. package/Distribution/Types/Array/index.d.cts.map +10 -0
  20. package/Distribution/Types/Array/index.d.mts +9 -0
  21. package/Distribution/Types/Array/index.d.mts.map +10 -0
  22. package/Distribution/Types/Async/Async.Types.d.cts +150 -0
  23. package/Distribution/Types/Async/Async.Types.d.cts.map +10 -0
  24. package/Distribution/Types/Async/Async.Types.d.mts +150 -0
  25. package/Distribution/Types/Async/Async.Types.d.mts.map +10 -0
  26. package/Distribution/Types/Async/Async.d.cts +145 -0
  27. package/Distribution/Types/Async/Async.d.cts.map +10 -0
  28. package/Distribution/Types/Async/Async.d.mts +145 -0
  29. package/Distribution/Types/Async/Async.d.mts.map +10 -0
  30. package/Distribution/Types/Async/index.d.cts +9 -0
  31. package/Distribution/Types/Async/index.d.cts.map +10 -0
  32. package/Distribution/Types/Async/index.d.mts +9 -0
  33. package/Distribution/Types/Async/index.d.mts.map +10 -0
  34. package/Distribution/Types/Effect/Effect.Types.d.cts +16 -0
  35. package/Distribution/Types/Effect/Effect.Types.d.cts.map +10 -0
  36. package/Distribution/Types/Effect/Effect.Types.d.mts +16 -0
  37. package/Distribution/Types/Effect/Effect.Types.d.mts.map +10 -0
  38. package/Distribution/Types/Effect/Effect.d.cts +8 -0
  39. package/Distribution/Types/Effect/Effect.d.cts.map +10 -0
  40. package/Distribution/Types/Effect/Effect.d.mts +8 -0
  41. package/Distribution/Types/Effect/Effect.d.mts.map +10 -0
  42. package/Distribution/Types/Effect/Index.Effect.d.cts +10 -0
  43. package/Distribution/Types/Effect/Index.Effect.d.cts.map +10 -0
  44. package/Distribution/Types/Effect/Index.Effect.d.mts +10 -0
  45. package/Distribution/Types/Effect/Index.Effect.d.mts.map +10 -0
  46. package/Distribution/Types/Effect/index.d.cts +8 -0
  47. package/Distribution/Types/Effect/index.d.cts.map +10 -0
  48. package/Distribution/Types/Effect/index.d.mts +8 -0
  49. package/Distribution/Types/Effect/index.d.mts.map +10 -0
  50. package/Distribution/Types/FileSystem/FileSystem.Types.d.cts +8 -0
  51. package/Distribution/Types/FileSystem/FileSystem.Types.d.cts.map +10 -0
  52. package/Distribution/Types/FileSystem/FileSystem.Types.d.mts +8 -0
  53. package/Distribution/Types/FileSystem/FileSystem.Types.d.mts.map +10 -0
  54. package/Distribution/Types/FileSystem/FileSystem.d.cts +55 -0
  55. package/Distribution/Types/FileSystem/FileSystem.d.cts.map +10 -0
  56. package/Distribution/Types/FileSystem/FileSystem.d.mts +55 -0
  57. package/Distribution/Types/FileSystem/FileSystem.d.mts.map +10 -0
  58. package/Distribution/Types/FileSystem/FileSystem.d.ts +20 -0
  59. package/Distribution/Types/FileSystem/FileSystem.d.ts.map +1 -1
  60. package/Distribution/Types/FileSystem/index.d.cts +9 -0
  61. package/Distribution/Types/FileSystem/index.d.cts.map +10 -0
  62. package/Distribution/Types/FileSystem/index.d.mts +9 -0
  63. package/Distribution/Types/FileSystem/index.d.mts.map +10 -0
  64. package/Distribution/Types/Functional/Functional.Internal.Types.d.cts +9 -0
  65. package/Distribution/Types/Functional/Functional.Internal.Types.d.cts.map +10 -0
  66. package/Distribution/Types/Functional/Functional.Internal.Types.d.mts +9 -0
  67. package/Distribution/Types/Functional/Functional.Internal.Types.d.mts.map +10 -0
  68. package/Distribution/Types/Functional/Functional.Internal.Types.d.ts +9 -0
  69. package/Distribution/Types/Functional/Functional.Internal.Types.d.ts.map +1 -0
  70. package/Distribution/Types/Functional/Functional.Internal.d.cts +8 -0
  71. package/Distribution/Types/Functional/Functional.Internal.d.cts.map +10 -0
  72. package/Distribution/Types/Functional/Functional.Internal.d.mts +8 -0
  73. package/Distribution/Types/Functional/Functional.Internal.d.mts.map +10 -0
  74. package/Distribution/Types/Functional/Functional.Internal.d.ts +8 -0
  75. package/Distribution/Types/Functional/Functional.Internal.d.ts.map +1 -0
  76. package/Distribution/Types/Functional/Functional.Types.d.cts +28 -0
  77. package/Distribution/Types/Functional/Functional.Types.d.cts.map +10 -0
  78. package/Distribution/Types/Functional/Functional.Types.d.mts +28 -0
  79. package/Distribution/Types/Functional/Functional.Types.d.mts.map +10 -0
  80. package/Distribution/Types/Functional/Functional.d.cts +8 -0
  81. package/Distribution/Types/Functional/Functional.d.cts.map +10 -0
  82. package/Distribution/Types/Functional/Functional.d.mts +8 -0
  83. package/Distribution/Types/Functional/Functional.d.mts.map +10 -0
  84. package/Distribution/Types/Functional/Functional.d.ts.map +1 -1
  85. package/Distribution/Types/Functional/index.d.cts +9 -0
  86. package/Distribution/Types/Functional/index.d.cts.map +10 -0
  87. package/Distribution/Types/Functional/index.d.mts +9 -0
  88. package/Distribution/Types/Functional/index.d.mts.map +10 -0
  89. package/Distribution/Types/Math/Complex.Internal.d.cts +8 -0
  90. package/Distribution/Types/Math/Complex.Internal.d.cts.map +10 -0
  91. package/Distribution/Types/Math/Complex.Internal.d.mts +8 -0
  92. package/Distribution/Types/Math/Complex.Internal.d.mts.map +10 -0
  93. package/Distribution/Types/Math/Complex.Types.d.cts +69 -0
  94. package/Distribution/Types/Math/Complex.Types.d.cts.map +10 -0
  95. package/Distribution/Types/Math/Complex.Types.d.mts +69 -0
  96. package/Distribution/Types/Math/Complex.Types.d.mts.map +10 -0
  97. package/Distribution/Types/Math/Complex.d.cts +63 -0
  98. package/Distribution/Types/Math/Complex.d.cts.map +10 -0
  99. package/Distribution/Types/Math/Complex.d.mts +63 -0
  100. package/Distribution/Types/Math/Complex.d.mts.map +10 -0
  101. package/Distribution/Types/Math/Index.Complex.d.cts +9 -0
  102. package/Distribution/Types/Math/Index.Complex.d.cts.map +10 -0
  103. package/Distribution/Types/Math/Index.Complex.d.mts +9 -0
  104. package/Distribution/Types/Math/Index.Complex.d.mts.map +10 -0
  105. package/Distribution/Types/Math/Index.Experimental.d.cts +10 -0
  106. package/Distribution/Types/Math/Index.Experimental.d.cts.map +10 -0
  107. package/Distribution/Types/Math/Index.Experimental.d.mts +10 -0
  108. package/Distribution/Types/Math/Index.Experimental.d.mts.map +10 -0
  109. package/Distribution/Types/Math/Math.Internal.Types.d.cts +41 -0
  110. package/Distribution/Types/Math/Math.Internal.Types.d.cts.map +10 -0
  111. package/Distribution/Types/Math/Math.Internal.Types.d.mts +41 -0
  112. package/Distribution/Types/Math/Math.Internal.Types.d.mts.map +10 -0
  113. package/Distribution/Types/Math/Math.Types.d.cts +90 -0
  114. package/Distribution/Types/Math/Math.Types.d.cts.map +10 -0
  115. package/Distribution/Types/Math/Math.Types.d.mts +90 -0
  116. package/Distribution/Types/Math/Math.Types.d.mts.map +10 -0
  117. package/Distribution/Types/Math/Math.d.cts +8 -0
  118. package/Distribution/Types/Math/Math.d.cts.map +10 -0
  119. package/Distribution/Types/Math/Math.d.mts +8 -0
  120. package/Distribution/Types/Math/Math.d.mts.map +10 -0
  121. package/Distribution/Types/Math/Vector.d.cts +102 -0
  122. package/Distribution/Types/Math/Vector.d.cts.map +10 -0
  123. package/Distribution/Types/Math/Vector.d.mts +102 -0
  124. package/Distribution/Types/Math/Vector.d.mts.map +10 -0
  125. package/Distribution/Types/Math/index.d.cts +15 -0
  126. package/Distribution/Types/Math/index.d.cts.map +10 -0
  127. package/Distribution/Types/Math/index.d.mts +15 -0
  128. package/Distribution/Types/Math/index.d.mts.map +10 -0
  129. package/Distribution/Types/Miscellaneous/Utility.Internal.d.cts +8 -0
  130. package/Distribution/Types/Miscellaneous/Utility.Internal.d.cts.map +10 -0
  131. package/Distribution/Types/Miscellaneous/Utility.Internal.d.mts +8 -0
  132. package/Distribution/Types/Miscellaneous/Utility.Internal.d.mts.map +10 -0
  133. package/Distribution/Types/Miscellaneous/Utility.Types.d.cts +100 -0
  134. package/Distribution/Types/Miscellaneous/Utility.Types.d.cts.map +10 -0
  135. package/Distribution/Types/Miscellaneous/Utility.Types.d.mts +100 -0
  136. package/Distribution/Types/Miscellaneous/Utility.Types.d.mts.map +10 -0
  137. package/Distribution/Types/Miscellaneous/index.d.cts +8 -0
  138. package/Distribution/Types/Miscellaneous/index.d.cts.map +10 -0
  139. package/Distribution/Types/Miscellaneous/index.d.mts +8 -0
  140. package/Distribution/Types/Miscellaneous/index.d.mts.map +10 -0
  141. package/Distribution/Types/Npm/Index.Effect.d.cts +9 -0
  142. package/Distribution/Types/Npm/Index.Effect.d.cts.map +10 -0
  143. package/Distribution/Types/Npm/Index.Effect.d.mts +9 -0
  144. package/Distribution/Types/Npm/Index.Effect.d.mts.map +10 -0
  145. package/Distribution/Types/Npm/Npm.Effect.Internal.d.cts +17 -0
  146. package/Distribution/Types/Npm/Npm.Effect.Internal.d.cts.map +10 -0
  147. package/Distribution/Types/Npm/Npm.Effect.Internal.d.mts +17 -0
  148. package/Distribution/Types/Npm/Npm.Effect.Internal.d.mts.map +10 -0
  149. package/Distribution/Types/Npm/Npm.Effect.Types.d.cts +12 -0
  150. package/Distribution/Types/Npm/Npm.Effect.Types.d.cts.map +10 -0
  151. package/Distribution/Types/Npm/Npm.Effect.Types.d.mts +12 -0
  152. package/Distribution/Types/Npm/Npm.Effect.Types.d.mts.map +10 -0
  153. package/Distribution/Types/Npm/Npm.Effect.d.cts +92 -0
  154. package/Distribution/Types/Npm/Npm.Effect.d.cts.map +10 -0
  155. package/Distribution/Types/Npm/Npm.Effect.d.mts +92 -0
  156. package/Distribution/Types/Npm/Npm.Effect.d.mts.map +10 -0
  157. package/Distribution/Types/Npm/Npm.Error.d.cts +36 -0
  158. package/Distribution/Types/Npm/Npm.Error.d.cts.map +10 -0
  159. package/Distribution/Types/Npm/Npm.Error.d.mts +36 -0
  160. package/Distribution/Types/Npm/Npm.Error.d.mts.map +10 -0
  161. package/Distribution/Types/Npm/Npm.d.cts +91 -0
  162. package/Distribution/Types/Npm/Npm.d.cts.map +10 -0
  163. package/Distribution/Types/Npm/Npm.d.mts +91 -0
  164. package/Distribution/Types/Npm/Npm.d.mts.map +10 -0
  165. package/Distribution/Types/Npm/index.d.cts +15 -0
  166. package/Distribution/Types/Npm/index.d.cts.map +10 -0
  167. package/Distribution/Types/Npm/index.d.mts +15 -0
  168. package/Distribution/Types/Npm/index.d.mts.map +10 -0
  169. package/Distribution/Types/Path/Path.d.cts +17 -0
  170. package/Distribution/Types/Path/Path.d.cts.map +10 -0
  171. package/Distribution/Types/Path/Path.d.mts +17 -0
  172. package/Distribution/Types/Path/Path.d.mts.map +10 -0
  173. package/Distribution/Types/Path/index.d.cts +8 -0
  174. package/Distribution/Types/Path/index.d.cts.map +10 -0
  175. package/Distribution/Types/Path/index.d.mts +8 -0
  176. package/Distribution/Types/Path/index.d.mts.map +10 -0
  177. package/Distribution/Types/String/String.d.cts +28 -0
  178. package/Distribution/Types/String/String.d.cts.map +10 -0
  179. package/Distribution/Types/String/String.d.mts +28 -0
  180. package/Distribution/Types/String/String.d.mts.map +10 -0
  181. package/Distribution/Types/String/index.d.cts +8 -0
  182. package/Distribution/Types/String/index.d.cts.map +10 -0
  183. package/Distribution/Types/String/index.d.mts +8 -0
  184. package/Distribution/Types/String/index.d.mts.map +10 -0
  185. package/Distribution/Types/index.d.cts +24 -0
  186. package/Distribution/Types/index.d.cts.map +10 -0
  187. package/Distribution/Types/index.d.mts +24 -0
  188. package/Distribution/Types/index.d.mts.map +10 -0
  189. package/Distribution/{CJS/array.js → array.cjs} +1 -1
  190. package/Distribution/{CJS/array.js.map → array.cjs.map} +1 -1
  191. package/Distribution/{ESM/array.js.map → array.js.map} +1 -1
  192. package/Distribution/{CJS/async.js → async.cjs} +1 -1
  193. package/Distribution/{CJS/async.js.map → async.cjs.map} +1 -1
  194. package/Distribution/{ESM/async.js.map → async.js.map} +1 -1
  195. package/Distribution/{CJS/complex.js → complex.cjs} +1 -1
  196. package/Distribution/{CJS/complex.js.map → complex.cjs.map} +1 -1
  197. package/Distribution/{ESM/complex.js.map → complex.js.map} +1 -1
  198. package/Distribution/{CJS/effect.js → effect.cjs} +1 -1
  199. package/Distribution/{CJS/effect.js.map → effect.cjs.map} +1 -1
  200. package/Distribution/{ESM/effect.js.map → effect.js.map} +1 -1
  201. package/Distribution/{CJS/fs.js → fs.cjs} +10 -6
  202. package/Distribution/fs.cjs.map +7 -0
  203. package/Distribution/{ESM/fs.js → fs.js} +9 -5
  204. package/Distribution/fs.js.map +7 -0
  205. package/Distribution/{CJS/functional.js → functional.cjs} +1 -1
  206. package/Distribution/functional.cjs.map +7 -0
  207. package/Distribution/functional.js.map +7 -0
  208. package/Distribution/{CJS/index.js → index.cjs} +15 -11
  209. package/Distribution/index.cjs.map +7 -0
  210. package/Distribution/{ESM/index.js → index.js} +14 -10
  211. package/Distribution/index.js.map +7 -0
  212. package/Distribution/{CJS/math.js → math.cjs} +1 -1
  213. package/Distribution/{CJS/math.js.map → math.cjs.map} +1 -1
  214. package/Distribution/{ESM/math.js.map → math.js.map} +1 -1
  215. package/Distribution/{CJS/misc.js → misc.cjs} +1 -1
  216. package/Distribution/{CJS/misc.js.map → misc.cjs.map} +1 -1
  217. package/Distribution/{ESM/misc.js.map → misc.js.map} +1 -1
  218. package/Distribution/{CJS/npm-effect.js → npm-effect.cjs} +1 -1
  219. package/Distribution/{CJS/npm-effect.js.map → npm-effect.cjs.map} +1 -1
  220. package/Distribution/{ESM/npm-effect.js.map → npm-effect.js.map} +1 -1
  221. package/Distribution/{CJS/npm.js → npm.cjs} +2 -2
  222. package/Distribution/npm.cjs.map +7 -0
  223. package/Distribution/{ESM/npm.js → npm.js} +1 -1
  224. package/Distribution/npm.js.map +7 -0
  225. package/Distribution/{CJS/path.js → path.cjs} +1 -1
  226. package/Distribution/{CJS/path.js.map → path.cjs.map} +1 -1
  227. package/Distribution/{ESM/path.js.map → path.js.map} +1 -1
  228. package/License.md +21 -0
  229. package/ReadMe.md +2 -2
  230. package/package.json +100 -54
  231. package/Distribution/CJS/fs.js.map +0 -7
  232. package/Distribution/CJS/functional.js.map +0 -7
  233. package/Distribution/CJS/index.js.map +0 -7
  234. package/Distribution/CJS/npm.js.map +0 -7
  235. package/Distribution/ESM/fs.js.map +0 -7
  236. package/Distribution/ESM/functional.js.map +0 -7
  237. package/Distribution/ESM/index.js.map +0 -7
  238. package/Distribution/ESM/npm.js.map +0 -7
  239. /package/Distribution/{ESM/array.js → array.js} +0 -0
  240. /package/Distribution/{ESM/async.js → async.js} +0 -0
  241. /package/Distribution/{ESM/complex.js → complex.js} +0 -0
  242. /package/Distribution/{ESM/effect.js → effect.js} +0 -0
  243. /package/Distribution/{ESM/functional.js → functional.js} +0 -0
  244. /package/Distribution/{ESM/math.js → math.js} +0 -0
  245. /package/Distribution/{ESM/misc.js → misc.js} +0 -0
  246. /package/Distribution/{ESM/npm-effect.js → npm-effect.js} +0 -0
  247. /package/Distribution/{ESM/path.js → path.js} +0 -0
@@ -0,0 +1,122 @@
1
+ {
2
+ ".": {
3
+ "import": {
4
+ "default": "./Distribution/index.js",
5
+ "types": "./Distribution/index.d.mts"
6
+ },
7
+ "require": {
8
+ "default": "./Distribution/index.cjs",
9
+ "types": "./Distribution/index.d.cts"
10
+ }
11
+ },
12
+ "./array": {
13
+ "import": {
14
+ "default": "./Distribution/array.js",
15
+ "types": "./Distribution/array.d.mts"
16
+ },
17
+ "require": {
18
+ "default": "./Distribution/array.cjs",
19
+ "types": "./Distribution/array.d.cts"
20
+ }
21
+ },
22
+ "./async": {
23
+ "import": {
24
+ "default": "./Distribution/async.js",
25
+ "types": "./Distribution/async.d.mts"
26
+ },
27
+ "require": {
28
+ "default": "./Distribution/async.cjs",
29
+ "types": "./Distribution/async.d.cts"
30
+ }
31
+ },
32
+ "./complex": {
33
+ "import": {
34
+ "default": "./Distribution/complex.js",
35
+ "types": "./Distribution/complex.d.mts"
36
+ },
37
+ "require": {
38
+ "default": "./Distribution/complex.cjs",
39
+ "types": "./Distribution/complex.d.cts"
40
+ }
41
+ },
42
+ "./effect": {
43
+ "import": {
44
+ "default": "./Distribution/effect.js",
45
+ "types": "./Distribution/effect.d.mts"
46
+ },
47
+ "require": {
48
+ "default": "./Distribution/effect.cjs",
49
+ "types": "./Distribution/effect.d.cts"
50
+ }
51
+ },
52
+ "./fs": {
53
+ "import": {
54
+ "default": "./Distribution/fs.js",
55
+ "types": "./Distribution/fs.d.mts"
56
+ },
57
+ "require": {
58
+ "default": "./Distribution/fs.cjs",
59
+ "types": "./Distribution/fs.d.cts"
60
+ }
61
+ },
62
+ "./functional": {
63
+ "import": {
64
+ "default": "./Distribution/functional.js",
65
+ "types": "./Distribution/functional.d.mts"
66
+ },
67
+ "require": {
68
+ "default": "./Distribution/functional.cjs",
69
+ "types": "./Distribution/functional.d.cts"
70
+ }
71
+ },
72
+ "./math": {
73
+ "import": {
74
+ "default": "./Distribution/math.js",
75
+ "types": "./Distribution/math.d.mts"
76
+ },
77
+ "require": {
78
+ "default": "./Distribution/math.cjs",
79
+ "types": "./Distribution/math.d.cts"
80
+ }
81
+ },
82
+ "./misc": {
83
+ "import": {
84
+ "default": "./Distribution/misc.js",
85
+ "types": "./Distribution/misc.d.mts"
86
+ },
87
+ "require": {
88
+ "default": "./Distribution/misc.cjs",
89
+ "types": "./Distribution/misc.d.cts"
90
+ }
91
+ },
92
+ "./npm": {
93
+ "import": {
94
+ "default": "./Distribution/npm.js",
95
+ "types": "./Distribution/npm.d.mts"
96
+ },
97
+ "require": {
98
+ "default": "./Distribution/npm.cjs",
99
+ "types": "./Distribution/npm.d.cts"
100
+ }
101
+ },
102
+ "./npm-effect": {
103
+ "import": {
104
+ "default": "./Distribution/npm-effect.js",
105
+ "types": "./Distribution/npm-effect.d.mts"
106
+ },
107
+ "require": {
108
+ "default": "./Distribution/npm-effect.cjs",
109
+ "types": "./Distribution/npm-effect.d.cts"
110
+ }
111
+ },
112
+ "./path": {
113
+ "import": {
114
+ "default": "./Distribution/path.js",
115
+ "types": "./Distribution/path.d.mts"
116
+ },
117
+ "require": {
118
+ "default": "./Distribution/path.cjs",
119
+ "types": "./Distribution/path.d.cts"
120
+ }
121
+ }
122
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @file Array.Internal.Types.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { Options, TArrayType } from "./Array.Types.cjs";
8
+ import type { NoOptions } from "../Miscellaneous/Utility.Types.cjs";
9
+ /**
10
+ * @module Array.Internal
11
+ * Internal types for the {@link Array} module.
12
+ *
13
+ * @internal
14
+ */
15
+ type TBuildStaticTArrayReadonly<ElementType, ArraySize extends number, Accumulator extends ReadonlyArray<ElementType> = readonly []> = Accumulator["length"] extends ArraySize ? Accumulator : TBuildStaticTArrayReadonly<ElementType, ArraySize, readonly [...Accumulator, ElementType]>;
16
+ export type TBuildStaticTArrayMutable<ElementType, ArraySize extends number, Accumulator extends Array<ElementType> = []> = Accumulator["length"] extends ArraySize ? Accumulator : TBuildStaticTArrayMutable<ElementType, ArraySize, [
17
+ ...Accumulator,
18
+ ElementType
19
+ ]>;
20
+ /**
21
+ * Used to define {@link Array.TStaticArray}.
22
+ * @template ElementType - The type of this, or the type of this `Array`.
23
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`. The
24
+ * @template ReadonlyType - Whether the built {@link Array} type will be `readonly`.
25
+ * this type.
26
+ * @internal
27
+ */
28
+ export type TBuildStaticTArrayBase<ElementType, ArraySize extends number, ReadonlyType extends boolean> = ReadonlyType extends true ? TBuildStaticTArrayReadonly<ElementType, ArraySize> : ReadonlyType extends false ? TBuildStaticTArrayMutable<ElementType, ArraySize> : never;
29
+ export type TBuildStaticTArray<ElementType, ArraySize extends number, OptionsType extends Options = NoOptions> = Options.DefinedOnly extends OptionsType ? Options.MaybeDefined extends OptionsType ? never : Options.Readonly extends OptionsType ? TBuildStaticTArrayReadonly<Exclude<ElementType, undefined>, ArraySize> : TBuildStaticTArrayMutable<Exclude<ElementType, undefined>, ArraySize> : Options.MaybeDefined extends OptionsType ? Options.Readonly extends OptionsType ? TBuildStaticTArrayReadonly<ElementType | undefined, ArraySize> : TBuildStaticTArrayMutable<ElementType | undefined, ArraySize> : Options.Readonly extends OptionsType ? TBuildStaticTArrayReadonly<ElementType, ArraySize> : TBuildStaticTArrayMutable<ElementType, ArraySize>;
30
+ /**
31
+ * Wrap a `TArrayType` type with this to change the {@link ElementType} to `ElementType | undefined`.
32
+ *
33
+ * @template ArrayType - The type of `TArrayType` to transform.
34
+ */
35
+ export type TWithUndefined<ArrayType> = ArrayType extends TArrayType<infer ElementType, infer OptionsType, infer ArraySize> ? TArrayType<ElementType | undefined, OptionsType, ArraySize> : never;
36
+ /**
37
+ * The opposite of {@link TWithUndefined}.
38
+ *
39
+ * @template ArrayType - The type of `TArrayType` to transform.
40
+ */
41
+ export type TWithDefined<ArrayType> = ArrayType extends TArrayType<infer ElementType, infer OptionsType, infer ArraySize> ? TArrayType<Exclude<ElementType, undefined>, OptionsType, ArraySize> : never;
42
+ export {};
43
+ //# sourceMappingURL=Array.Internal.Types.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.Internal.Types.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.Internal.Types.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE;;;;;GAKG;AAEH,KAAK,0BAA0B,CAC3B,WAAW,EACX,SAAS,SAAS,MAAM,EACxB,WAAW,SAAS,aAAa,CAAC,WAAW,CAAC,GAAG,SAAS,EAAG,IAE7D,WAAW,CAAC,QAAQ,CAAC,SAAS,SAAS,GACjC,WAAW,GACX,0BAA0B,CACxB,WAAW,EACX,SAAS,EACT,SAAS,CAAE,GAAG,WAAW,EAAE,WAAW,CAAE,CAC3C,CAAC;AAEV,MAAM,MAAM,yBAAyB,CACjC,WAAW,EACX,SAAS,SAAS,MAAM,EACxB,WAAW,SAAS,KAAK,CAAC,WAAW,CAAC,GAAG,EAAG,IAE5C,WAAW,CAAC,QAAQ,CAAC,SAAS,SAAS,GACjC,WAAW,GACX,yBAAyB,CACvB,WAAW,EACX,SAAS,EACT;IAAE,GAAG,WAAW;IAAE,WAAW;CAAE,CAClC,CAAC;AAEV;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,CAC9B,WAAW,EACX,SAAS,SAAS,MAAM,EACxB,YAAY,SAAS,OAAO,IAE5B,YAAY,SAAS,IAAI,GACnB,0BAA0B,CAAC,WAAW,EAAE,SAAS,CAAC,GAClD,YAAY,SAAS,KAAK,GACtB,yBAAyB,CAAC,WAAW,EAAE,SAAS,CAAC,GACjD,KAAK,CAAC;AAEpB,MAAM,MAAM,kBAAkB,CAC1B,WAAW,EACX,SAAS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 * @license MIT
6
+ */
7
+ import type { Options, TArrayType } from "./Array.Types.mjs";
8
+ import type { NoOptions } from "../Miscellaneous/Utility.Types.mjs";
9
+ /**
10
+ * @module Array.Internal
11
+ * Internal types for the {@link Array} module.
12
+ *
13
+ * @internal
14
+ */
15
+ type TBuildStaticTArrayReadonly<ElementType, ArraySize extends number, Accumulator extends ReadonlyArray<ElementType> = readonly []> = Accumulator["length"] extends ArraySize ? Accumulator : TBuildStaticTArrayReadonly<ElementType, ArraySize, readonly [...Accumulator, ElementType]>;
16
+ export type TBuildStaticTArrayMutable<ElementType, ArraySize extends number, Accumulator extends Array<ElementType> = []> = Accumulator["length"] extends ArraySize ? Accumulator : TBuildStaticTArrayMutable<ElementType, ArraySize, [
17
+ ...Accumulator,
18
+ ElementType
19
+ ]>;
20
+ /**
21
+ * Used to define {@link Array.TStaticArray}.
22
+ * @template ElementType - The type of this, or the type of this `Array`.
23
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`. The
24
+ * @template ReadonlyType - Whether the built {@link Array} type will be `readonly`.
25
+ * this type.
26
+ * @internal
27
+ */
28
+ export type TBuildStaticTArrayBase<ElementType, ArraySize extends number, ReadonlyType extends boolean> = ReadonlyType extends true ? TBuildStaticTArrayReadonly<ElementType, ArraySize> : ReadonlyType extends false ? TBuildStaticTArrayMutable<ElementType, ArraySize> : never;
29
+ export type TBuildStaticTArray<ElementType, ArraySize extends number, OptionsType extends Options = NoOptions> = Options.DefinedOnly extends OptionsType ? Options.MaybeDefined extends OptionsType ? never : Options.Readonly extends OptionsType ? TBuildStaticTArrayReadonly<Exclude<ElementType, undefined>, ArraySize> : TBuildStaticTArrayMutable<Exclude<ElementType, undefined>, ArraySize> : Options.MaybeDefined extends OptionsType ? Options.Readonly extends OptionsType ? TBuildStaticTArrayReadonly<ElementType | undefined, ArraySize> : TBuildStaticTArrayMutable<ElementType | undefined, ArraySize> : Options.Readonly extends OptionsType ? TBuildStaticTArrayReadonly<ElementType, ArraySize> : TBuildStaticTArrayMutable<ElementType, ArraySize>;
30
+ /**
31
+ * Wrap a `TArrayType` type with this to change the {@link ElementType} to `ElementType | undefined`.
32
+ *
33
+ * @template ArrayType - The type of `TArrayType` to transform.
34
+ */
35
+ export type TWithUndefined<ArrayType> = ArrayType extends TArrayType<infer ElementType, infer OptionsType, infer ArraySize> ? TArrayType<ElementType | undefined, OptionsType, ArraySize> : never;
36
+ /**
37
+ * The opposite of {@link TWithUndefined}.
38
+ *
39
+ * @template ArrayType - The type of `TArrayType` to transform.
40
+ */
41
+ export type TWithDefined<ArrayType> = ArrayType extends TArrayType<infer ElementType, infer OptionsType, infer ArraySize> ? TArrayType<Exclude<ElementType, undefined>, OptionsType, ArraySize> : never;
42
+ export {};
43
+ //# sourceMappingURL=Array.Internal.Types.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.Internal.Types.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.Internal.Types.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE;;;;;GAKG;AAEH,KAAK,0BAA0B,CAC3B,WAAW,EACX,SAAS,SAAS,MAAM,EACxB,WAAW,SAAS,aAAa,CAAC,WAAW,CAAC,GAAG,SAAS,EAAG,IAE7D,WAAW,CAAC,QAAQ,CAAC,SAAS,SAAS,GACjC,WAAW,GACX,0BAA0B,CACxB,WAAW,EACX,SAAS,EACT,SAAS,CAAE,GAAG,WAAW,EAAE,WAAW,CAAE,CAC3C,CAAC;AAEV,MAAM,MAAM,yBAAyB,CACjC,WAAW,EACX,SAAS,SAAS,MAAM,EACxB,WAAW,SAAS,KAAK,CAAC,WAAW,CAAC,GAAG,EAAG,IAE5C,WAAW,CAAC,QAAQ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W,GAAG,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,GAC3D,KAAK,CAAC;AAEhB;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,SAAS,IAC9B,SAAS,SAAS,UAAU,CAAC,MAAM,WAAW,EAAE,MAAM,WAAW,EAAE,MAAM,SAAS,CAAC,GAC7E,UAAU,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,WAAW,EAAE,SAAS,CAAC,GACnE,KAAK,CAAC"
10
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @file Array.Internal.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ /**
8
+ * @module Array.Internal
9
+ * Internal content for the {@link Array} module.
10
+ *
11
+ * @internal
12
+ */
13
+ export declare const ReadonlyOption: unique symbol;
14
+ export declare const DefinedOnlyOption: unique symbol;
15
+ export declare const MaybeDefinedOption: unique symbol;
16
+ //# sourceMappingURL=Array.Internal.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.Internal.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.Internal.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH;;;;;GAKG;AAEH,eAIA,MAAM,cAAc,EAAE,OAAO,MAAiC,CAAC;AAE/D,eAIA,MAAM,iBAAiB,EAAE,OAAO,MAAoC,CAAC;AAErE,eAIA,MAAM,kBAAkB,EAAE,OAAO,MAAqC,CAAC"
10
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @file Array.Internal.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ /**
8
+ * @module Array.Internal
9
+ * Internal content for the {@link Array} module.
10
+ *
11
+ * @internal
12
+ */
13
+ export declare const ReadonlyOption: unique symbol;
14
+ export declare const DefinedOnlyOption: unique symbol;
15
+ export declare const MaybeDefinedOption: unique symbol;
16
+ //# sourceMappingURL=Array.Internal.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.Internal.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.Internal.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH;;;;;GAKG;AAEH,eAIA,MAAM,cAAc,EAAE,OAAO,MAAiC,CAAC;AAE/D,eAIA,MAAM,iBAAiB,EAAE,OAAO,MAAoC,CAAC;AAErE,eAIA,MAAM,kBAAkB,EAAE,OAAO,MAAqC,CAAC"
10
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @file Array.Types.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { DefinedOnlyOption, MaybeDefinedOption, ReadonlyOption } from "./Array.Internal.cjs";
8
+ import type { NoOptions, TOptions } from "../Miscellaneous/Utility.Types.cjs";
9
+ import type { TBuildStaticTArray } from "./Array.Internal.Types.cjs";
10
+ import type { TIsNonNegativeInteger } from "../Math/Math.Types.cjs";
11
+ /**
12
+ * An `Array` type, which is optionally customizable via an {@link OptionsType}.
13
+ *
14
+ * @template ElementType - The type of the elements in the array.
15
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
16
+ */
17
+ export type TArray<ElementType, OptionsType extends Options = NoOptions> = Options.DefinedOnly extends OptionsType ? Options.MaybeDefined extends OptionsType ? never : Options.Readonly extends OptionsType ? ReadonlyArray<Exclude<ElementType, undefined>> : Array<Exclude<ElementType, undefined>> : Options.MaybeDefined extends OptionsType ? Options.Readonly extends OptionsType ? ReadonlyArray<ElementType | undefined> : Array<ElementType | undefined> : Options.Readonly extends OptionsType ? ReadonlyArray<ElementType> : Array<ElementType>;
18
+ /**
19
+ * The union of all `Array` types exported by the `@sorrell/utilities` {@link Array}
20
+ * module, as well as the built-in `Array` type.
21
+ *
22
+ * @note This union does *not* include {@link TMaybeArray}.
23
+ * If you wish to include {@link TMaybeArray}, use {@link TArrayTypeUnsafe}.
24
+ *
25
+ * @template ElementType - The type of the elements in the array.
26
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
27
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`. The
28
+ * only type in this union that uses this type parameter is {@link TStaticArray}.
29
+ */
30
+ export type TArrayType<ElementType = unknown, OptionsType extends Options = NoOptions, ArraySize extends number = number> = TArray<ElementType, OptionsType> | TNonemptyArray<ElementType, OptionsType> | TStaticArray<ElementType, ArraySize, OptionsType> | Array<ElementType>;
31
+ /**
32
+ * The union of all `Array` types exported by the `@sorrell/utilities` {@link Array}
33
+ * module, as well as the built-in `Array` type.
34
+ *
35
+ * @note This union includes {@link TMaybeArray}. If you do not wish to include
36
+ * {@link TMaybeArray} in the union, use {@link TArrayType} instead.
37
+ *
38
+ * @template ElementType - The type of the elements in the array.
39
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
40
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`. The
41
+ * only type in this union that uses this type parameter is {@link TStaticArray}.
42
+ */
43
+ export type TArrayTypeUnsafe<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number> = TArrayType<ElementType, OptionsType, ArraySize> | TMaybeArray<ElementType>;
44
+ /**
45
+ * The union of a given {@link ElementType}, and `Array<ElementType>`.
46
+ *
47
+ * @template ElementType - The type of this, or the type of this `Array`.
48
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
49
+ */
50
+ export type TMaybeArray<ElementType, OptionsType extends Options = NoOptions> = ElementType | TArray<ElementType, OptionsType>;
51
+ /**
52
+ * The union of a given {@link ElementType}, and `Array<ElementType>`.
53
+ *
54
+ * @template ElementType - The type of this, or the type of this `Array`.
55
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`.
56
+ * This must be an integer.
57
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
58
+ */
59
+ export type TStaticArray<ElementType, ArraySize extends number, OptionsType extends Options = NoOptions> = ArraySize extends ArraySize ? number extends ArraySize ? TArray<ElementType, OptionsType> : TIsNonNegativeInteger<ArraySize> extends true ? TBuildStaticTArray<ElementType, ArraySize, OptionsType> : never : never;
60
+ /**
61
+ * An `Array<ElementType>` that is nonempty.
62
+ *
63
+ * @template ElementType - The type of the elements in the array.
64
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
65
+ */
66
+ export type TNonemptyArray<ElementType, OptionsType extends Options = NoOptions> = Options.DefinedOnly extends OptionsType ? Options.MaybeDefined extends OptionsType ? never : Options.Readonly extends OptionsType ? readonly [Exclude<ElementType, undefined>, ...Array<Exclude<ElementType, undefined>>] : [Exclude<ElementType, undefined>, ...Array<Exclude<ElementType, undefined>>] : Options.MaybeDefined extends OptionsType ? Options.Readonly extends OptionsType ? readonly [ElementType | undefined, ...Array<ElementType | undefined>] : [ElementType | undefined, ...Array<ElementType | undefined>] : Options.Readonly extends OptionsType ? readonly [ElementType, ...Array<ElementType>] : [ElementType, ...Array<ElementType>];
67
+ /**
68
+ * Options for the types defined in the {@link Array} module.
69
+ *
70
+ * The only invalid combinations are those that contain both
71
+ * {@link Options!DefinedOnly} *and* {@link Options!MaybeDefined}.
72
+ */
73
+ export type Options = TOptions<Options.Readonly | Options.DefinedOnly | Options.MaybeDefined>;
74
+ export declare namespace Options {
75
+ /**
76
+ * Specifies that the given array type in the `@sorrell/utilities` `Array` module
77
+ * should use `ReadonlyArray` internally.
78
+ */
79
+ type Readonly = typeof ReadonlyOption;
80
+ /** Specifies that `undefined` must extend the given `ElementType`. */
81
+ type MaybeDefined = typeof MaybeDefinedOption;
82
+ /** Specifies that the given `ElementType` must *not* include `undefined`. */
83
+ type DefinedOnly = typeof DefinedOnlyOption;
84
+ type None = NoOptions;
85
+ }
86
+ /**
87
+ * The type returned by {@link FilterDefined}.
88
+ *
89
+ * @template ElementType - The type of the elements in the array.
90
+ */
91
+ export type FilteredArray<ElementType> = TArray<Exclude<ElementType, undefined>>;
92
+ //# sourceMappingURL=Array.Types.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.Types.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.Types.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,MAAM,CACd,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,IAEvC,OAAO,CAAC,WAAW,SAAS,WAAW,GACjC,OAAO,CAAC,YAAY,SAAS,WAAW,GACpC,KAAK,GACL,OAAO,CAAC,QAAQ,SAAS,WAAW,GAChC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,GAC9C,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,GAC9C,OAAO,CAAC,YAAY,SAAS,WAAW,GACpC,OAAO,CAAC,QAAQ,SAAS,WAAW,GAChC,aAAa,CAAC,WAAW,GAAG,SAAS,CAAC,GACtC,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC,GAClC,OAAO,CAAC,QAAQ,SAAS,WAAW,GAChC,aAAa,CAAC,WAAW,CAAC,GAC1B,KAAK,CAAC,WAAW,CAAC,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,MAAM,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right (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { DefinedOnlyOption, MaybeDefinedOption, ReadonlyOption } from "./Array.Internal.mjs";
8
+ import type { NoOptions, TOptions } from "../Miscellaneous/Utility.Types.mjs";
9
+ import type { TBuildStaticTArray } from "./Array.Internal.Types.mjs";
10
+ import type { TIsNonNegativeInteger } from "../Math/Math.Types.mjs";
11
+ /**
12
+ * An `Array` type, which is optionally customizable via an {@link OptionsType}.
13
+ *
14
+ * @template ElementType - The type of the elements in the array.
15
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
16
+ */
17
+ export type TArray<ElementType, OptionsType extends Options = NoOptions> = Options.DefinedOnly extends OptionsType ? Options.MaybeDefined extends OptionsType ? never : Options.Readonly extends OptionsType ? ReadonlyArray<Exclude<ElementType, undefined>> : Array<Exclude<ElementType, undefined>> : Options.MaybeDefined extends OptionsType ? Options.Readonly extends OptionsType ? ReadonlyArray<ElementType | undefined> : Array<ElementType | undefined> : Options.Readonly extends OptionsType ? ReadonlyArray<ElementType> : Array<ElementType>;
18
+ /**
19
+ * The union of all `Array` types exported by the `@sorrell/utilities` {@link Array}
20
+ * module, as well as the built-in `Array` type.
21
+ *
22
+ * @note This union does *not* include {@link TMaybeArray}.
23
+ * If you wish to include {@link TMaybeArray}, use {@link TArrayTypeUnsafe}.
24
+ *
25
+ * @template ElementType - The type of the elements in the array.
26
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
27
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`. The
28
+ * only type in this union that uses this type parameter is {@link TStaticArray}.
29
+ */
30
+ export type TArrayType<ElementType = unknown, OptionsType extends Options = NoOptions, ArraySize extends number = number> = TArray<ElementType, OptionsType> | TNonemptyArray<ElementType, OptionsType> | TStaticArray<ElementType, ArraySize, OptionsType> | Array<ElementType>;
31
+ /**
32
+ * The union of all `Array` types exported by the `@sorrell/utilities` {@link Array}
33
+ * module, as well as the built-in `Array` type.
34
+ *
35
+ * @note This union includes {@link TMaybeArray}. If you do not wish to include
36
+ * {@link TMaybeArray} in the union, use {@link TArrayType} instead.
37
+ *
38
+ * @template ElementType - The type of the elements in the array.
39
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
40
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`. The
41
+ * only type in this union that uses this type parameter is {@link TStaticArray}.
42
+ */
43
+ export type TArrayTypeUnsafe<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number> = TArrayType<ElementType, OptionsType, ArraySize> | TMaybeArray<ElementType>;
44
+ /**
45
+ * The union of a given {@link ElementType}, and `Array<ElementType>`.
46
+ *
47
+ * @template ElementType - The type of this, or the type of this `Array`.
48
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
49
+ */
50
+ export type TMaybeArray<ElementType, OptionsType extends Options = NoOptions> = ElementType | TArray<ElementType, OptionsType>;
51
+ /**
52
+ * The union of a given {@link ElementType}, and `Array<ElementType>`.
53
+ *
54
+ * @template ElementType - The type of this, or the type of this `Array`.
55
+ * @template ArraySize - The number of {@link ElementType | ElementTypes} in this `Array`.
56
+ * This must be an integer.
57
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
58
+ */
59
+ export type TStaticArray<ElementType, ArraySize extends number, OptionsType extends Options = NoOptions> = ArraySize extends ArraySize ? number extends ArraySize ? TArray<ElementType, OptionsType> : TIsNonNegativeInteger<ArraySize> extends true ? TBuildStaticTArray<ElementType, ArraySize, OptionsType> : never : never;
60
+ /**
61
+ * An `Array<ElementType>` that is nonempty.
62
+ *
63
+ * @template ElementType - The type of the elements in the array.
64
+ * @template OptionsType - *(Optional)* The {@link Options:type | options type} for this type.
65
+ */
66
+ export type TNonemptyArray<ElementType, OptionsType extends Options = NoOptions> = Options.DefinedOnly extends OptionsType ? Options.MaybeDefined extends OptionsType ? never : Options.Readonly extends OptionsType ? readonly [Exclude<ElementType, undefined>, ...Array<Exclude<ElementType, undefined>>] : [Exclude<ElementType, undefined>, ...Array<Exclude<ElementType, undefined>>] : Options.MaybeDefined extends OptionsType ? Options.Readonly extends OptionsType ? readonly [ElementType | undefined, ...Array<ElementType | undefined>] : [ElementType | undefined, ...Array<ElementType | undefined>] : Options.Readonly extends OptionsType ? readonly [ElementType, ...Array<ElementType>] : [ElementType, ...Array<ElementType>];
67
+ /**
68
+ * Options for the types defined in the {@link Array} module.
69
+ *
70
+ * The only invalid combinations are those that contain both
71
+ * {@link Options!DefinedOnly} *and* {@link Options!MaybeDefined}.
72
+ */
73
+ export type Options = TOptions<Options.Readonly | Options.DefinedOnly | Options.MaybeDefined>;
74
+ export declare namespace Options {
75
+ /**
76
+ * Specifies that the given array type in the `@sorrell/utilities` `Array` module
77
+ * should use `ReadonlyArray` internally.
78
+ */
79
+ type Readonly = typeof ReadonlyOption;
80
+ /** Specifies that `undefined` must extend the given `ElementType`. */
81
+ type MaybeDefined = typeof MaybeDefinedOption;
82
+ /** Specifies that the given `ElementType` must *not* include `undefined`. */
83
+ type DefinedOnly = typeof DefinedOnlyOption;
84
+ type None = NoOptions;
85
+ }
86
+ /**
87
+ * The type returned by {@link FilterDefined}.
88
+ *
89
+ * @template ElementType - The type of the elements in the array.
90
+ */
91
+ export type FilteredArray<ElementType> = TArray<Exclude<ElementType, undefined>>;
92
+ //# sourceMappingURL=Array.Types.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.Types.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.Types.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;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AAC,WAAW,CAAC,CAAE,GAC/C,CAAE,WAAW,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,CAAE,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GACf,QAAQ,CACF,OAAO,CAAC,QAAQ,GAChB,OAAO,CAAC,WAAW,GACnB,OAAO,CAAC,YAAY,CACzB,CAAC;AAEN,yBAAiB,OAAO,CACxB;IACI;;;OAGG;IACH,KAAY,QAAQ,GAAG,OAAO,cAAc,CAAC;IAE7C,sEAAsE;IACtE,KAAY,YAAY,GAAG,OAAO,kBAAkB,CAAC;IAErD,6EAA6E;IAC7E,KAAY,WAAW,GAAG,OAAO,iBAAiB,CAAC;IAEnD,KAAY,IAAI,GAAG,SAAS,CAAC;CAChC;AAID;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,WAAW,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC"
10
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @file Array.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { FilteredArray, Options, TArrayType } from "./Array.Types.cjs";
8
+ import type { NoOptions } from "../Miscellaneous/Utility.Types.cjs";
9
+ /**
10
+ * Filter out all instances of `undefined` from a given {@link Array:param}.
11
+ * @param Array - The array to filter.
12
+ *
13
+ * @template ElementType - The type of the elements in the array.
14
+ *
15
+ * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}
16
+ * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given
17
+ * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.
18
+ *
19
+ * @example With the given {@link ElementType} including `undefined`.
20
+ * ```typescript
21
+ * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];
22
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
23
+ * ```
24
+ * @example With the given {@link OptionsType} including `Options.MaybeDefined`.
25
+ * ```typescript
26
+ * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];
27
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
28
+ * ```
29
+ */
30
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
31
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;
32
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
33
+ //# sourceMappingURL=Array.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,EACX,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,EACX,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC"
10
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @file Array.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ import type { FilteredArray, Options, TArrayType } from "./Array.Types.mjs";
8
+ import type { NoOptions } from "../Miscellaneous/Utility.Types.mjs";
9
+ /**
10
+ * Filter out all instances of `undefined` from a given {@link Array:param}.
11
+ * @param Array - The array to filter.
12
+ *
13
+ * @template ElementType - The type of the elements in the array.
14
+ *
15
+ * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}
16
+ * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given
17
+ * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.
18
+ *
19
+ * @example With the given {@link ElementType} including `undefined`.
20
+ * ```typescript
21
+ * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];
22
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
23
+ * ```
24
+ * @example With the given {@link OptionsType} including `Options.MaybeDefined`.
25
+ * ```typescript
26
+ * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];
27
+ * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);
28
+ * ```
29
+ */
30
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
31
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;
32
+ export declare function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;
33
+ //# sourceMappingURL=Array.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "Array.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/Array.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,EACX,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,EACX,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CACzB,WAAW,EACX,WAAW,SAAS,OAAO,GAAG,SAAS,EACvC,SAAS,SAAS,MAAM,GAAG,MAAM,EAEjC,KAAK,EAAE,UAAU,CACb,WAAW,GAAG,SAAS,EACvB,WAAW,GAAG,OAAO,CAAC,YAAY,EAClC,SAAS,CACZ,GACF,aAAa,CAAC,WAAW,CAAC,CAAC"
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file index.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ export * from "./Array.cjs";
8
+ export * from "./Array.Types.cjs";
9
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/Array/index.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"
10
+ }