ts-data-forge 1.0.0 → 1.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 (292) hide show
  1. package/README.md +1 -1
  2. package/dist/array/array-utils.d.mts +2617 -0
  3. package/dist/array/array-utils.d.mts.map +1 -0
  4. package/dist/array/array-utils.mjs +2915 -0
  5. package/dist/array/array-utils.mjs.map +1 -0
  6. package/dist/array/index.d.mts +3 -0
  7. package/dist/array/index.d.mts.map +1 -0
  8. package/dist/array/index.mjs +3 -0
  9. package/dist/array/index.mjs.map +1 -0
  10. package/dist/array/tuple-utils.d.mts +421 -0
  11. package/dist/array/tuple-utils.d.mts.map +1 -0
  12. package/dist/array/tuple-utils.mjs +391 -0
  13. package/dist/array/tuple-utils.mjs.map +1 -0
  14. package/dist/collections/imap-mapped.d.mts +445 -0
  15. package/dist/collections/imap-mapped.d.mts.map +1 -0
  16. package/dist/collections/imap-mapped.mjs +424 -0
  17. package/dist/collections/imap-mapped.mjs.map +1 -0
  18. package/dist/collections/imap.d.mts +359 -0
  19. package/dist/collections/imap.d.mts.map +1 -0
  20. package/dist/collections/imap.mjs +338 -0
  21. package/dist/collections/imap.mjs.map +1 -0
  22. package/dist/collections/index.d.mts +7 -0
  23. package/dist/collections/index.d.mts.map +1 -0
  24. package/dist/collections/index.mjs +7 -0
  25. package/dist/collections/index.mjs.map +1 -0
  26. package/dist/collections/iset-mapped.d.mts +576 -0
  27. package/dist/collections/iset-mapped.d.mts.map +1 -0
  28. package/dist/collections/iset-mapped.mjs +522 -0
  29. package/dist/collections/iset-mapped.mjs.map +1 -0
  30. package/dist/collections/iset.d.mts +426 -0
  31. package/dist/collections/iset.d.mts.map +1 -0
  32. package/dist/collections/iset.mjs +437 -0
  33. package/dist/collections/iset.mjs.map +1 -0
  34. package/dist/collections/queue.d.mts +190 -0
  35. package/dist/collections/queue.d.mts.map +1 -0
  36. package/dist/collections/queue.mjs +317 -0
  37. package/dist/collections/queue.mjs.map +1 -0
  38. package/dist/collections/stack.d.mts +210 -0
  39. package/dist/collections/stack.d.mts.map +1 -0
  40. package/dist/collections/stack.mjs +353 -0
  41. package/dist/collections/stack.mjs.map +1 -0
  42. package/dist/expect-type.d.mts +199 -0
  43. package/dist/expect-type.d.mts.map +1 -0
  44. package/dist/expect-type.mjs +201 -0
  45. package/dist/expect-type.mjs.map +1 -0
  46. package/dist/functional/index.d.mts +5 -0
  47. package/dist/functional/index.d.mts.map +1 -0
  48. package/dist/functional/index.mjs +5 -0
  49. package/dist/functional/index.mjs.map +1 -0
  50. package/dist/functional/match.d.mts +215 -0
  51. package/dist/functional/match.d.mts.map +1 -0
  52. package/dist/functional/match.mjs +139 -0
  53. package/dist/functional/match.mjs.map +1 -0
  54. package/dist/functional/optional.d.mts +517 -0
  55. package/dist/functional/optional.d.mts.map +1 -0
  56. package/dist/functional/optional.mjs +532 -0
  57. package/dist/functional/optional.mjs.map +1 -0
  58. package/dist/functional/pipe.d.mts +185 -0
  59. package/dist/functional/pipe.d.mts.map +1 -0
  60. package/dist/functional/pipe.mjs +129 -0
  61. package/dist/functional/pipe.mjs.map +1 -0
  62. package/dist/functional/result.d.mts +796 -0
  63. package/dist/functional/result.d.mts.map +1 -0
  64. package/dist/functional/result.mjs +844 -0
  65. package/dist/functional/result.mjs.map +1 -0
  66. package/dist/globals.d.mts +38 -0
  67. package/dist/guard/has-key.d.mts +100 -0
  68. package/dist/guard/has-key.d.mts.map +1 -0
  69. package/dist/guard/has-key.mjs +94 -0
  70. package/dist/guard/has-key.mjs.map +1 -0
  71. package/dist/guard/index.d.mts +8 -0
  72. package/dist/guard/index.d.mts.map +1 -0
  73. package/dist/guard/index.mjs +8 -0
  74. package/dist/guard/index.mjs.map +1 -0
  75. package/dist/guard/is-non-empty-string.d.mts +106 -0
  76. package/dist/guard/is-non-empty-string.d.mts.map +1 -0
  77. package/dist/guard/is-non-empty-string.mjs +108 -0
  78. package/dist/guard/is-non-empty-string.mjs.map +1 -0
  79. package/dist/guard/is-non-null-object.d.mts +105 -0
  80. package/dist/guard/is-non-null-object.d.mts.map +1 -0
  81. package/dist/guard/is-non-null-object.mjs +108 -0
  82. package/dist/guard/is-non-null-object.mjs.map +1 -0
  83. package/dist/guard/is-primitive.d.mts +146 -0
  84. package/dist/guard/is-primitive.d.mts.map +1 -0
  85. package/dist/guard/is-primitive.mjs +161 -0
  86. package/dist/guard/is-primitive.mjs.map +1 -0
  87. package/dist/guard/is-record.d.mts +151 -0
  88. package/dist/guard/is-record.d.mts.map +1 -0
  89. package/dist/guard/is-record.mjs +155 -0
  90. package/dist/guard/is-record.mjs.map +1 -0
  91. package/dist/guard/is-type.d.mts +430 -0
  92. package/dist/guard/is-type.d.mts.map +1 -0
  93. package/dist/guard/is-type.mjs +432 -0
  94. package/dist/guard/is-type.mjs.map +1 -0
  95. package/dist/guard/key-is-in.d.mts +158 -0
  96. package/dist/guard/key-is-in.d.mts.map +1 -0
  97. package/dist/guard/key-is-in.mjs +160 -0
  98. package/dist/guard/key-is-in.mjs.map +1 -0
  99. package/dist/index.d.mts +11 -0
  100. package/dist/index.d.mts.map +1 -0
  101. package/dist/index.mjs +61 -0
  102. package/dist/index.mjs.map +1 -0
  103. package/dist/iterator/index.d.mts +2 -0
  104. package/dist/iterator/index.d.mts.map +1 -0
  105. package/dist/iterator/index.mjs +2 -0
  106. package/dist/iterator/index.mjs.map +1 -0
  107. package/dist/iterator/range.d.mts +97 -0
  108. package/dist/iterator/range.d.mts.map +1 -0
  109. package/dist/iterator/range.mjs +130 -0
  110. package/dist/iterator/range.mjs.map +1 -0
  111. package/dist/json/index.d.mts +2 -0
  112. package/dist/json/index.d.mts.map +1 -0
  113. package/dist/json/index.mjs +2 -0
  114. package/dist/json/index.mjs.map +1 -0
  115. package/dist/json/json.d.mts +597 -0
  116. package/dist/json/json.d.mts.map +1 -0
  117. package/dist/json/json.mjs +687 -0
  118. package/dist/json/json.mjs.map +1 -0
  119. package/dist/number/branded-types/finite-number.d.mts +291 -0
  120. package/dist/number/branded-types/finite-number.d.mts.map +1 -0
  121. package/dist/number/branded-types/finite-number.mjs +296 -0
  122. package/dist/number/branded-types/finite-number.mjs.map +1 -0
  123. package/dist/number/branded-types/index.d.mts +27 -0
  124. package/dist/number/branded-types/index.d.mts.map +1 -0
  125. package/dist/number/branded-types/index.mjs +27 -0
  126. package/dist/number/branded-types/index.mjs.map +1 -0
  127. package/dist/number/branded-types/int.d.mts +242 -0
  128. package/dist/number/branded-types/int.d.mts.map +1 -0
  129. package/dist/number/branded-types/int.mjs +239 -0
  130. package/dist/number/branded-types/int.mjs.map +1 -0
  131. package/dist/number/branded-types/int16.d.mts +162 -0
  132. package/dist/number/branded-types/int16.d.mts.map +1 -0
  133. package/dist/number/branded-types/int16.mjs +141 -0
  134. package/dist/number/branded-types/int16.mjs.map +1 -0
  135. package/dist/number/branded-types/int32.d.mts +155 -0
  136. package/dist/number/branded-types/int32.d.mts.map +1 -0
  137. package/dist/number/branded-types/int32.mjs +142 -0
  138. package/dist/number/branded-types/int32.mjs.map +1 -0
  139. package/dist/number/branded-types/non-negative-finite-number.d.mts +165 -0
  140. package/dist/number/branded-types/non-negative-finite-number.d.mts.map +1 -0
  141. package/dist/number/branded-types/non-negative-finite-number.mjs +160 -0
  142. package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -0
  143. package/dist/number/branded-types/non-negative-int16.d.mts +160 -0
  144. package/dist/number/branded-types/non-negative-int16.d.mts.map +1 -0
  145. package/dist/number/branded-types/non-negative-int16.mjs +138 -0
  146. package/dist/number/branded-types/non-negative-int16.mjs.map +1 -0
  147. package/dist/number/branded-types/non-negative-int32.d.mts +156 -0
  148. package/dist/number/branded-types/non-negative-int32.d.mts.map +1 -0
  149. package/dist/number/branded-types/non-negative-int32.mjs +138 -0
  150. package/dist/number/branded-types/non-negative-int32.mjs.map +1 -0
  151. package/dist/number/branded-types/non-zero-finite-number.d.mts +154 -0
  152. package/dist/number/branded-types/non-zero-finite-number.d.mts.map +1 -0
  153. package/dist/number/branded-types/non-zero-finite-number.mjs +160 -0
  154. package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -0
  155. package/dist/number/branded-types/non-zero-int.d.mts +131 -0
  156. package/dist/number/branded-types/non-zero-int.d.mts.map +1 -0
  157. package/dist/number/branded-types/non-zero-int.mjs +128 -0
  158. package/dist/number/branded-types/non-zero-int.mjs.map +1 -0
  159. package/dist/number/branded-types/non-zero-int16.d.mts +166 -0
  160. package/dist/number/branded-types/non-zero-int16.d.mts.map +1 -0
  161. package/dist/number/branded-types/non-zero-int16.mjs +145 -0
  162. package/dist/number/branded-types/non-zero-int16.mjs.map +1 -0
  163. package/dist/number/branded-types/non-zero-int32.d.mts +158 -0
  164. package/dist/number/branded-types/non-zero-int32.d.mts.map +1 -0
  165. package/dist/number/branded-types/non-zero-int32.mjs +145 -0
  166. package/dist/number/branded-types/non-zero-int32.mjs.map +1 -0
  167. package/dist/number/branded-types/non-zero-safe-int.d.mts +148 -0
  168. package/dist/number/branded-types/non-zero-safe-int.d.mts.map +1 -0
  169. package/dist/number/branded-types/non-zero-safe-int.mjs +145 -0
  170. package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -0
  171. package/dist/number/branded-types/non-zero-uint16.d.mts +160 -0
  172. package/dist/number/branded-types/non-zero-uint16.d.mts.map +1 -0
  173. package/dist/number/branded-types/non-zero-uint16.mjs +140 -0
  174. package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -0
  175. package/dist/number/branded-types/non-zero-uint32.d.mts +156 -0
  176. package/dist/number/branded-types/non-zero-uint32.d.mts.map +1 -0
  177. package/dist/number/branded-types/non-zero-uint32.mjs +140 -0
  178. package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -0
  179. package/dist/number/branded-types/positive-finite-number.d.mts +171 -0
  180. package/dist/number/branded-types/positive-finite-number.d.mts.map +1 -0
  181. package/dist/number/branded-types/positive-finite-number.mjs +165 -0
  182. package/dist/number/branded-types/positive-finite-number.mjs.map +1 -0
  183. package/dist/number/branded-types/positive-int.d.mts +270 -0
  184. package/dist/number/branded-types/positive-int.d.mts.map +1 -0
  185. package/dist/number/branded-types/positive-int.mjs +257 -0
  186. package/dist/number/branded-types/positive-int.mjs.map +1 -0
  187. package/dist/number/branded-types/positive-int16.d.mts +162 -0
  188. package/dist/number/branded-types/positive-int16.d.mts.map +1 -0
  189. package/dist/number/branded-types/positive-int16.mjs +139 -0
  190. package/dist/number/branded-types/positive-int16.mjs.map +1 -0
  191. package/dist/number/branded-types/positive-int32.d.mts +158 -0
  192. package/dist/number/branded-types/positive-int32.d.mts.map +1 -0
  193. package/dist/number/branded-types/positive-int32.mjs +139 -0
  194. package/dist/number/branded-types/positive-int32.mjs.map +1 -0
  195. package/dist/number/branded-types/positive-safe-int.d.mts +152 -0
  196. package/dist/number/branded-types/positive-safe-int.d.mts.map +1 -0
  197. package/dist/number/branded-types/positive-safe-int.mjs +138 -0
  198. package/dist/number/branded-types/positive-safe-int.mjs.map +1 -0
  199. package/dist/number/branded-types/positive-uint16.d.mts +160 -0
  200. package/dist/number/branded-types/positive-uint16.d.mts.map +1 -0
  201. package/dist/number/branded-types/positive-uint16.mjs +139 -0
  202. package/dist/number/branded-types/positive-uint16.mjs.map +1 -0
  203. package/dist/number/branded-types/positive-uint32.d.mts +156 -0
  204. package/dist/number/branded-types/positive-uint32.d.mts.map +1 -0
  205. package/dist/number/branded-types/positive-uint32.mjs +139 -0
  206. package/dist/number/branded-types/positive-uint32.mjs.map +1 -0
  207. package/dist/number/branded-types/safe-int.d.mts +243 -0
  208. package/dist/number/branded-types/safe-int.d.mts.map +1 -0
  209. package/dist/number/branded-types/safe-int.mjs +240 -0
  210. package/dist/number/branded-types/safe-int.mjs.map +1 -0
  211. package/dist/number/branded-types/safe-uint.d.mts +151 -0
  212. package/dist/number/branded-types/safe-uint.d.mts.map +1 -0
  213. package/dist/number/branded-types/safe-uint.mjs +138 -0
  214. package/dist/number/branded-types/safe-uint.mjs.map +1 -0
  215. package/dist/number/branded-types/uint.d.mts +144 -0
  216. package/dist/number/branded-types/uint.d.mts.map +1 -0
  217. package/dist/number/branded-types/uint.mjs +132 -0
  218. package/dist/number/branded-types/uint.mjs.map +1 -0
  219. package/dist/number/branded-types/uint16.d.mts +157 -0
  220. package/dist/number/branded-types/uint16.d.mts.map +1 -0
  221. package/dist/number/branded-types/uint16.mjs +137 -0
  222. package/dist/number/branded-types/uint16.mjs.map +1 -0
  223. package/dist/number/branded-types/uint32.d.mts +185 -0
  224. package/dist/number/branded-types/uint32.d.mts.map +1 -0
  225. package/dist/number/branded-types/uint32.mjs +169 -0
  226. package/dist/number/branded-types/uint32.mjs.map +1 -0
  227. package/dist/number/enum/index.d.mts +3 -0
  228. package/dist/number/enum/index.d.mts.map +1 -0
  229. package/dist/number/enum/index.mjs +3 -0
  230. package/dist/number/enum/index.mjs.map +1 -0
  231. package/dist/number/enum/int8.d.mts +202 -0
  232. package/dist/number/enum/int8.d.mts.map +1 -0
  233. package/dist/number/enum/int8.mjs +296 -0
  234. package/dist/number/enum/int8.mjs.map +1 -0
  235. package/dist/number/enum/uint8.d.mts +128 -0
  236. package/dist/number/enum/uint8.d.mts.map +1 -0
  237. package/dist/number/enum/uint8.mjs +251 -0
  238. package/dist/number/enum/uint8.mjs.map +1 -0
  239. package/dist/number/index.d.mts +5 -0
  240. package/dist/number/index.d.mts.map +1 -0
  241. package/dist/number/index.mjs +31 -0
  242. package/dist/number/index.mjs.map +1 -0
  243. package/dist/number/num.d.mts +515 -0
  244. package/dist/number/num.d.mts.map +1 -0
  245. package/dist/number/num.mjs +513 -0
  246. package/dist/number/num.mjs.map +1 -0
  247. package/dist/number/refined-number-utils.d.mts +191 -0
  248. package/dist/number/refined-number-utils.d.mts.map +1 -0
  249. package/dist/number/refined-number-utils.mjs +179 -0
  250. package/dist/number/refined-number-utils.mjs.map +1 -0
  251. package/dist/object/index.d.mts +2 -0
  252. package/dist/object/index.d.mts.map +1 -0
  253. package/dist/object/index.mjs +2 -0
  254. package/dist/object/index.mjs.map +1 -0
  255. package/dist/object/object.d.mts +296 -0
  256. package/dist/object/object.d.mts.map +1 -0
  257. package/dist/object/object.mjs +295 -0
  258. package/dist/object/object.mjs.map +1 -0
  259. package/dist/others/cast-mutable.d.mts +110 -0
  260. package/dist/others/cast-mutable.d.mts.map +1 -0
  261. package/dist/others/cast-mutable.mjs +114 -0
  262. package/dist/others/cast-mutable.mjs.map +1 -0
  263. package/dist/others/cast-readonly.d.mts +189 -0
  264. package/dist/others/cast-readonly.d.mts.map +1 -0
  265. package/dist/others/cast-readonly.mjs +193 -0
  266. package/dist/others/cast-readonly.mjs.map +1 -0
  267. package/dist/others/if-then.d.mts +98 -0
  268. package/dist/others/if-then.d.mts.map +1 -0
  269. package/dist/others/if-then.mjs +100 -0
  270. package/dist/others/if-then.mjs.map +1 -0
  271. package/dist/others/index.d.mts +8 -0
  272. package/dist/others/index.d.mts.map +1 -0
  273. package/dist/others/index.mjs +8 -0
  274. package/dist/others/index.mjs.map +1 -0
  275. package/dist/others/map-nullable.d.mts +151 -0
  276. package/dist/others/map-nullable.d.mts.map +1 -0
  277. package/dist/others/map-nullable.mjs +159 -0
  278. package/dist/others/map-nullable.mjs.map +1 -0
  279. package/dist/others/memoize-function.d.mts +173 -0
  280. package/dist/others/memoize-function.d.mts.map +1 -0
  281. package/dist/others/memoize-function.mjs +189 -0
  282. package/dist/others/memoize-function.mjs.map +1 -0
  283. package/dist/others/tuple.d.mts +159 -0
  284. package/dist/others/tuple.d.mts.map +1 -0
  285. package/dist/others/tuple.mjs +161 -0
  286. package/dist/others/tuple.mjs.map +1 -0
  287. package/dist/others/unknown-to-string.d.mts +180 -0
  288. package/dist/others/unknown-to-string.d.mts.map +1 -0
  289. package/dist/others/unknown-to-string.mjs +211 -0
  290. package/dist/others/unknown-to-string.mjs.map +1 -0
  291. package/dist/tsconfig.json +1 -0
  292. package/package.json +16 -14
@@ -0,0 +1,576 @@
1
+ /**
2
+ * Interface for an immutable set with custom element mapping and O(1) membership testing.
3
+ *
4
+ * ISetMapped allows you to use complex objects as set elements by providing transformation functions
5
+ * that convert between your custom element type `K` and a primitive `MapSetKeyType` `KM` that can
6
+ * be efficiently stored in JavaScript's native Set. This enables high-performance set operations
7
+ * on complex elements while maintaining type safety and immutability.
8
+ *
9
+ * **Key Features:**
10
+ * - **Custom Element Types**: Use any type as set elements by providing `toKey`/`fromKey` functions
11
+ * - **O(1) Performance**: Maintains O(1) average-case performance for membership testing and mutations
12
+ * - **Immutable**: All operations return new instances, preserving immutability
13
+ * - **Set Operations**: Full support for union, intersection, difference, subset/superset checks
14
+ * - **Type Safe**: Full TypeScript support with generic element types
15
+ *
16
+ * **Performance Characteristics:**
17
+ * - has/add/delete: O(1) average case (plus element transformation overhead)
18
+ * - Set operations (union, intersection, difference): O(n)
19
+ * - map/filter operations: O(n)
20
+ * - Iteration: O(n) (plus element transformation overhead)
21
+ *
22
+ * @template K The type of the custom elements in the set.
23
+ * @template KM The type of the mapped primitive keys (string, number, etc.).
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Example with complex object elements
28
+ * type User = { id: number; department: string; email: string };
29
+ *
30
+ * // Define transformation functions
31
+ * const userToKey = (user: User): string => `${user.department}:${user.id}`;
32
+ * const keyToUser = (key: string): User => {
33
+ * const [department, idStr] = key.split(':');
34
+ * // In practice, you might fetch from a cache or reconstruct more robustly
35
+ * return { id: Number(idStr), department, email: `user${idStr}@${department}.com` };
36
+ * };
37
+ *
38
+ * declare const activeUsers: ISetMapped<User, string>;
39
+ *
40
+ * // All operations work with the complex element type
41
+ * const user: User = { id: 123, department: "engineering", email: "alice@engineering.com" };
42
+ * const hasUser = activeUsers.has(user); // O(1)
43
+ * const withNewUser = activeUsers.add(user); // O(1) - returns new ISetMapped
44
+ * const withoutUser = activeUsers.delete(user); // O(1) - returns new ISetMapped
45
+ * ```
46
+ */
47
+ type ISetMappedInterface<K, KM extends MapSetKeyType> = Readonly<{
48
+ /**
49
+ * Creates a new ISetMapped instance.
50
+ * @param iterable An iterable of elements.
51
+ * @param toKey A function that converts an element of type `K` to `KM`.
52
+ * @param fromKey A function that converts a mapped key of type `KM` back to `K`.
53
+ */
54
+ new (iterable: Iterable<K>, toKey: (a: K) => KM, fromKey: (k: KM) => K): void;
55
+ /** The number of elements in the set. */
56
+ size: SizeType.Arr;
57
+ /** Checks if the set is empty. */
58
+ isEmpty: boolean;
59
+ /**
60
+ * Checks if an element exists in the set.
61
+ * @param key The element to check.
62
+ * @returns `true` if the element exists, `false` otherwise.
63
+ */
64
+ has: (key: K) => boolean;
65
+ /**
66
+ * Checks if all elements in the set satisfy a predicate.
67
+ * @param predicate A function to test each element.
68
+ * @returns `true` if all elements satisfy the predicate, `false` otherwise.
69
+ */
70
+ every: ((predicate: (key: K) => boolean) => boolean) &
71
+ /**
72
+ * Checks if all elements in the set satisfy a type predicate.
73
+ * Narrows the type of elements in the set if the predicate returns true for all elements.
74
+ * @template L The narrowed type of the elements.
75
+ * @param predicate A type predicate function.
76
+ * @returns `true` if all elements satisfy the predicate, `false` otherwise.
77
+ */
78
+ (<L extends K>(predicate: (key: K) => key is L) => this is ISetMapped<L, KM>);
79
+ /**
80
+ * Checks if at least one element in the set satisfies a predicate.
81
+ * @param predicate A function to test each element.
82
+ * @returns `true` if at least one element satisfies the predicate, `false` otherwise.
83
+ */
84
+ some: (predicate: (key: K) => boolean) => boolean;
85
+ /**
86
+ * Adds an element to the set.
87
+ * @param key The element to add.
88
+ * @returns A new ISetMapped instance with the element added.
89
+ */
90
+ add: (key: K) => ISetMapped<K, KM>;
91
+ /**
92
+ * Deletes an element from the set.
93
+ * @param key The element to delete.
94
+ * @returns A new ISetMapped instance without the specified element.
95
+ */
96
+ delete: (key: K) => ISetMapped<K, KM>;
97
+ /**
98
+ * Applies a series of mutations to the set.
99
+ * @param actions An array of mutation actions (add or delete).
100
+ * @returns A new ISetMapped instance with all mutations applied.
101
+ */
102
+ withMutations: (actions: readonly Readonly<{
103
+ type: 'add';
104
+ key: K;
105
+ } | {
106
+ type: 'delete';
107
+ key: K;
108
+ }>[]) => ISetMapped<K, KM>;
109
+ /**
110
+ * Maps the elements of the set to new elements.
111
+ * Note: The element type `K` cannot be changed because `toKey` and `fromKey` would become unusable if the mapped type `KM` changes.
112
+ * @param mapFn A function that maps an element to a new element of the same type `K`.
113
+ * @returns A new ISetMapped instance with mapped elements.
114
+ */
115
+ map: (mapFn: (key: K) => K) => ISetMapped<K, KM>;
116
+ /**
117
+ * Filters the elements of the set based on a predicate.
118
+ * @param predicate A function to test each element.
119
+ * @returns A new ISetMapped instance with elements that satisfy the predicate.
120
+ */
121
+ filter: (predicate: (value: K) => boolean) => ISetMapped<K, KM>;
122
+ /**
123
+ * Filters the elements of the set by excluding elements for which the predicate returns true.
124
+ * @param predicate A function to test each element.
125
+ * @returns A new ISetMapped instance with elements for which the predicate returned `false`.
126
+ */
127
+ filterNot: (predicate: (key: K) => boolean) => ISetMapped<K, KM>;
128
+ /**
129
+ * Executes a callback function for each element in the set.
130
+ * @param callbackfn A function to execute for each element.
131
+ */
132
+ forEach: (callbackfn: (key: K) => void) => void;
133
+ /**
134
+ * Checks if this set is a subset of another set.
135
+ * @param set The other set.
136
+ * @returns `true` if this set is a subset of the other set, `false` otherwise.
137
+ */
138
+ isSubsetOf: (set: ISetMapped<K, KM>) => boolean;
139
+ /**
140
+ * Checks if this set is a superset of another set.
141
+ * @param set The other set.
142
+ * @returns `true` if this set is a superset of the other set, `false` otherwise.
143
+ */
144
+ isSupersetOf: (set: ISetMapped<K, KM>) => boolean;
145
+ /**
146
+ * Returns a new set with elements that are in this set but not in another set.
147
+ * @param set The other set.
148
+ * @returns A new ISetMapped instance representing the set difference.
149
+ */
150
+ subtract: (set: ISetMapped<K, KM>) => ISetMapped<K, KM>;
151
+ /**
152
+ * Returns a new set with elements that are common to both this set and another set.
153
+ * @param set The other set.
154
+ * @returns A new ISetMapped instance representing the set intersection.
155
+ */
156
+ intersect: (set: ISetMapped<K, KM>) => ISetMapped<K, KM>;
157
+ /**
158
+ * Returns a new set with all elements from both this set and another set.
159
+ * @param set The other set.
160
+ * @returns A new ISetMapped instance representing the set union.
161
+ */
162
+ union: (set: ISetMapped<K, KM>) => ISetMapped<K, KM>;
163
+ /**
164
+ * Returns an iterator for the elements in the set (alias for values).
165
+ * @returns An iterable iterator of elements.
166
+ */
167
+ keys: () => IterableIterator<K>;
168
+ /**
169
+ * Returns an iterator for the elements in the set.
170
+ * @returns An iterable iterator of elements.
171
+ */
172
+ values: () => IterableIterator<K>;
173
+ /**
174
+ * Returns an iterator for the entries (element-element pairs) in the set.
175
+ * @returns An iterable iterator of entries.
176
+ */
177
+ entries: () => IterableIterator<readonly [K, K]>;
178
+ /**
179
+ * Converts the elements of the set to an array.
180
+ * @returns A readonly array of elements.
181
+ */
182
+ toArray: () => readonly K[];
183
+ /**
184
+ * Returns the underlying readonly JavaScript Set of mapped keys.
185
+ * @returns The raw ReadonlySet instance.
186
+ */
187
+ toRawSet: () => ReadonlySet<KM>;
188
+ }>;
189
+ /**
190
+ * Represents an immutable set with custom element transformation and high-performance operations.
191
+ *
192
+ * ISetMapped is a specialized persistent data structure that enables using complex objects as set elements
193
+ * while maintaining the performance benefits of JavaScript's native Set. It achieves this by requiring
194
+ * bidirectional transformation functions that convert between your custom element type and a primitive type
195
+ * that can be efficiently stored and compared for uniqueness.
196
+ *
197
+ * **Key Features:**
198
+ * - **Complex Elements**: Use objects, arrays, or any custom type as set elements
199
+ * - **High Performance**: O(1) operations through efficient element transformation
200
+ * - **Immutable**: All mutation operations return new instances
201
+ * - **Type Safe**: Full TypeScript support with compile-time element type checking
202
+ * - **Bidirectional**: Maintains ability to reconstruct original elements from mapped keys
203
+ * - **Set Algebra**: Complete support for mathematical set operations
204
+ *
205
+ * **Use Cases:**
206
+ * - Sets of entities with complex identifiers
207
+ * - Deduplication of objects based on specific properties
208
+ * - Performance-critical sets with non-primitive elements
209
+ * - Mathematical set operations on complex data structures
210
+ *
211
+ * @template K The type of the custom elements in the set.
212
+ * @template KM The type of the mapped primitive keys (string, number, etc.).
213
+ *
214
+ * @example
215
+ * ```typescript
216
+ * // Example: User management with composite identity
217
+ * type User = { id: number; department: string; username: string; email: string };
218
+ *
219
+ * // Define bidirectional transformation functions
220
+ * const userToKey = (user: User): string => `${user.department}:${user.id}`;
221
+ * const keyToUser = (key: string): User => {
222
+ * const [department, idStr] = key.split(':');
223
+ * const id = Number(idStr);
224
+ * // In practice, this might fetch from a user service or cache
225
+ * return {
226
+ * id,
227
+ * department,
228
+ * username: `user${id}`,
229
+ * email: `user${id}@${department}.company.com`
230
+ * };
231
+ * };
232
+ *
233
+ * // Create a set with complex elements
234
+ * let activeUsers = ISetMapped.create<User, string>([], userToKey, keyToUser);
235
+ *
236
+ * // Use complex objects as elements naturally
237
+ * const alice: User = { id: 1, department: "engineering", username: "alice", email: "alice@engineering.company.com" };
238
+ * const bob: User = { id: 2, department: "marketing", username: "bob", email: "bob@marketing.company.com" };
239
+ * const charlie: User = { id: 3, department: "engineering", username: "charlie", email: "charlie@engineering.company.com" };
240
+ *
241
+ * activeUsers = activeUsers
242
+ * .add(alice)
243
+ * .add(bob)
244
+ * .add(charlie);
245
+ *
246
+ * // All operations work with the original element type
247
+ * console.log(activeUsers.has(alice)); // Output: true
248
+ * console.log(activeUsers.size); // Output: 3
249
+ *
250
+ * // Set operations preserve element types
251
+ * const engineeringUsers = ISetMapped.create<User, string>([alice, charlie], userToKey, keyToUser);
252
+ * const marketingUsers = ISetMapped.create<User, string>([bob], userToKey, keyToUser);
253
+ *
254
+ * const allUsers = ISetMapped.union(engineeringUsers, marketingUsers);
255
+ * const engineeringOnly = activeUsers.intersect(engineeringUsers);
256
+ *
257
+ * // Iteration preserves original element types
258
+ * for (const user of engineeringOnly) {
259
+ * console.log(`${user.username} works in ${user.department}`);
260
+ * }
261
+ * // Output:
262
+ * // alice works in engineering
263
+ * // charlie works in engineering
264
+ *
265
+ * // Functional transformations work seamlessly
266
+ * const updatedUsers = activeUsers.map(user => ({
267
+ * ...user,
268
+ * email: user.email.replace('.company.com', '.example.com')
269
+ * }));
270
+ * ```
271
+ */
272
+ export type ISetMapped<K, KM extends MapSetKeyType> = Iterable<K> & Readonly<ISetMappedInterface<K, KM>>;
273
+ /**
274
+ * Provides utility functions for ISetMapped.
275
+ */
276
+ export declare namespace ISetMapped {
277
+ /**
278
+ * Creates a new ISetMapped instance with custom element transformation functions.
279
+ *
280
+ * This factory function creates an immutable set that can use complex objects as elements
281
+ * by providing bidirectional transformation functions. The `toKey` function converts
282
+ * your custom element type to a primitive type that can be efficiently stored, while
283
+ * `fromKey` reconstructs the original element type for iteration and access.
284
+ *
285
+ * **Performance:** O(n) where n is the number of elements in the iterable.
286
+ *
287
+ * @template K The type of the custom elements.
288
+ * @template KM The type of the mapped primitive keys.
289
+ * @param iterable An iterable of elements using the custom element type.
290
+ * @param toKey A function that converts a custom element `K` to a primitive key `KM`.
291
+ * This function must be deterministic and produce unique values for unique elements.
292
+ * @param fromKey A function that converts a primitive key `KM` back to the custom element `K`.
293
+ * This should be the inverse of `toKey`.
294
+ * @returns A new ISetMapped instance containing all unique elements from the iterable.
295
+ *
296
+ * @example
297
+ * ```typescript
298
+ * // Example 1: Product catalog with SKU-based identity
299
+ * type Product = { sku: string; name: string; price: number; category: string };
300
+ *
301
+ * const productToKey = (product: Product): string => product.sku;
302
+ * const keyToProduct = (sku: string): Product => {
303
+ * // In practice, this might fetch from a product service or cache
304
+ * return {
305
+ * sku,
306
+ * name: `Product ${sku}`,
307
+ * price: 0,
308
+ * category: "unknown"
309
+ * };
310
+ * };
311
+ *
312
+ * const productSet = ISetMapped.create<Product, string>(
313
+ * [
314
+ * { sku: "LAPTOP-001", name: "Gaming Laptop", price: 1299, category: "electronics" },
315
+ * { sku: "MOUSE-002", name: "Wireless Mouse", price: 49, category: "accessories" },
316
+ * { sku: "LAPTOP-001", name: "Gaming Laptop", price: 1299, category: "electronics" } // Duplicate SKU
317
+ * ],
318
+ * productToKey,
319
+ * keyToProduct
320
+ * );
321
+ *
322
+ * console.log(productSet.size); // Output: 2 (duplicate removed)
323
+ * console.log(productSet.has({ sku: "LAPTOP-001", name: "Gaming Laptop", price: 1299, category: "electronics" })); // true
324
+ *
325
+ * // Example 2: Geographic locations with coordinate-based identity
326
+ * type Location = { name: string; lat: number; lng: number; type: string };
327
+ *
328
+ * const locationToKey = (loc: Location): string => `${loc.lat.toFixed(6)},${loc.lng.toFixed(6)}`;
329
+ * const keyToLocation = (key: string): Location => {
330
+ * const [latStr, lngStr] = key.split(',');
331
+ * return {
332
+ * name: "Unknown Location",
333
+ * lat: parseFloat(latStr),
334
+ * lng: parseFloat(lngStr),
335
+ * type: "point"
336
+ * };
337
+ * };
338
+ *
339
+ * const locationSet = ISetMapped.create<Location, string>(
340
+ * [
341
+ * { name: "Statue of Liberty", lat: 40.689247, lng: -74.044502, type: "monument" },
342
+ * { name: "Empire State Building", lat: 40.748817, lng: -73.985428, type: "building" }
343
+ * ],
344
+ * locationToKey,
345
+ * keyToLocation
346
+ * );
347
+ *
348
+ * // Example 3: User entities with multi-part identity
349
+ * type User = { id: number; tenant: string; email: string; active: boolean };
350
+ *
351
+ * const userToKey = (user: User): string => `${user.tenant}:${user.id}`;
352
+ * const keyToUser = (key: string): User => {
353
+ * const [tenant, idStr] = key.split(':');
354
+ * return {
355
+ * id: Number(idStr),
356
+ * tenant,
357
+ * email: `user${idStr}@${tenant}.com`,
358
+ * active: true
359
+ * };
360
+ * };
361
+ *
362
+ * const userSet = ISetMapped.create<User, string>(
363
+ * [],
364
+ * userToKey,
365
+ * keyToUser
366
+ * )
367
+ * .add({ id: 1, tenant: "acme", email: "alice@acme.com", active: true })
368
+ * .add({ id: 2, tenant: "acme", email: "bob@acme.com", active: false });
369
+ *
370
+ * console.log(userSet.size); // Output: 2
371
+ *
372
+ * // Example 4: Empty set with type specification
373
+ * const emptyProductSet = ISetMapped.create<Product, string>(
374
+ * [],
375
+ * productToKey,
376
+ * keyToProduct
377
+ * );
378
+ * console.log(emptyProductSet.isEmpty); // Output: true
379
+ * ```
380
+ */
381
+ const create: <K, KM extends MapSetKeyType>(iterable: Iterable<K>, toKey: (a: K) => KM, fromKey: (k: KM) => K) => ISetMapped<K, KM>;
382
+ /**
383
+ * Checks if two ISetMapped instances are structurally equal.
384
+ *
385
+ * Two ISetMapped instances are considered equal if they have the same size and contain
386
+ * exactly the same elements. The comparison is performed on the underlying mapped keys,
387
+ * so the transformation functions themselves don't need to be identical. Elements are
388
+ * compared based on their mapped key representations.
389
+ *
390
+ * **Performance:** O(n) where n is the size of the smaller set.
391
+ *
392
+ * @template K The type of the custom elements.
393
+ * @template KM The type of the mapped primitive keys.
394
+ * @param a The first ISetMapped instance to compare.
395
+ * @param b The second ISetMapped instance to compare.
396
+ * @returns `true` if the sets contain exactly the same elements, `false` otherwise.
397
+ *
398
+ * @example
399
+ * ```typescript
400
+ * // Example with coordinate-based elements
401
+ * type Point = { x: number; y: number; label?: string };
402
+ * const pointToKey = (p: Point): string => `${p.x},${p.y}`;
403
+ * const keyToPoint = (s: string): Point => {
404
+ * const [x, y] = s.split(',').map(Number);
405
+ * return { x, y };
406
+ * };
407
+ *
408
+ * const set1 = ISetMapped.create<Point, string>(
409
+ * [{ x: 1, y: 2, label: "A" }, { x: 3, y: 4, label: "B" }],
410
+ * pointToKey,
411
+ * keyToPoint
412
+ * );
413
+ *
414
+ * const set2 = ISetMapped.create<Point, string>(
415
+ * [{ x: 3, y: 4, label: "Different" }, { x: 1, y: 2, label: "Labels" }], // Order doesn't matter
416
+ * pointToKey,
417
+ * keyToPoint
418
+ * );
419
+ *
420
+ * const set3 = ISetMapped.create<Point, string>(
421
+ * [{ x: 1, y: 2 }, { x: 5, y: 6 }], // Different point
422
+ * pointToKey,
423
+ * keyToPoint
424
+ * );
425
+ *
426
+ * console.log(ISetMapped.equal(set1, set2)); // true (same coordinates, labels don't affect equality)
427
+ * console.log(ISetMapped.equal(set1, set3)); // false (different coordinates)
428
+ *
429
+ * // Example with user entities
430
+ * type User = { id: number; department: string; name: string };
431
+ * const userToKey = (u: User): string => `${u.department}:${u.id}`;
432
+ * const keyToUser = (k: string): User => {
433
+ * const [department, idStr] = k.split(':');
434
+ * return { id: Number(idStr), department, name: "" };
435
+ * };
436
+ *
437
+ * const users1 = ISetMapped.create<User, string>(
438
+ * [
439
+ * { id: 1, department: "eng", name: "Alice" },
440
+ * { id: 2, department: "sales", name: "Bob" }
441
+ * ],
442
+ * userToKey,
443
+ * keyToUser
444
+ * );
445
+ *
446
+ * const users2 = ISetMapped.create<User, string>(
447
+ * [
448
+ * { id: 2, department: "sales", name: "Robert" }, // Different name, same identity
449
+ * { id: 1, department: "eng", name: "Alicia" } // Different name, same identity
450
+ * ],
451
+ * userToKey,
452
+ * keyToUser
453
+ * );
454
+ *
455
+ * console.log(ISetMapped.equal(users1, users2)); // true (same department:id combinations)
456
+ *
457
+ * // Empty sets
458
+ * const empty1 = ISetMapped.create<Point, string>([], pointToKey, keyToPoint);
459
+ * const empty2 = ISetMapped.create<Point, string>([], pointToKey, keyToPoint);
460
+ * console.log(ISetMapped.equal(empty1, empty2)); // true
461
+ *
462
+ * // Sets with different transformation functions but same logical content
463
+ * const alternativePointToKey = (p: Point): string => `(${p.x},${p.y})`; // Different format
464
+ * const alternativeKeyToPoint = (s: string): Point => {
465
+ * const match = s.match(/\((\d+),(\d+)\)/)!;
466
+ * return { x: Number(match[1]), y: Number(match[2]) };
467
+ * };
468
+ *
469
+ * const set4 = ISetMapped.create<Point, string>(
470
+ * [{ x: 1, y: 2 }, { x: 3, y: 4 }],
471
+ * alternativePointToKey,
472
+ * alternativeKeyToPoint
473
+ * );
474
+ *
475
+ * // This would be false because the underlying mapped keys are different
476
+ * console.log(ISetMapped.equal(set1, set4)); // false
477
+ * ```
478
+ */
479
+ const equal: <K, KM extends MapSetKeyType>(a: ISetMapped<K, KM>, b: ISetMapped<K, KM>) => boolean;
480
+ /**
481
+ * Computes the difference between two ISetMapped instances.
482
+ * @template K The type of the elements.
483
+ * @template KM The type of the mapped keys.
484
+ * @param oldSet The original set.
485
+ * @param newSet The new set.
486
+ * @returns An object containing sets of added and deleted elements.
487
+ * @example
488
+ * ```typescript
489
+ * type Tag = { name: string };
490
+ * const tagToKey = (t: Tag): string => t.name;
491
+ * const keyToTag = (name: string): Tag => ({ name });
492
+ *
493
+ * const oldTags = ISetMapped.create<Tag, string>(
494
+ * [{ name: "typescript" }, { name: "javascript" }],
495
+ * tagToKey,
496
+ * keyToTag
497
+ * );
498
+ * const newTags = ISetMapped.create<Tag, string>(
499
+ * [{ name: "javascript" }, { name: "react" }, { name: "nextjs" }],
500
+ * tagToKey,
501
+ * keyToTag
502
+ * );
503
+ *
504
+ * const diffResult = ISetMapped.diff(oldTags, newTags);
505
+ *
506
+ * console.log("Deleted tags:", diffResult.deleted.toArray().map(t => t.name));
507
+ * // Output: Deleted tags: ["typescript"]
508
+ *
509
+ * console.log("Added tags:", diffResult.added.toArray().map(t => t.name));
510
+ * // Output: Added tags: ["react", "nextjs"]
511
+ * ```
512
+ */
513
+ const diff: <K, KM extends MapSetKeyType>(oldSet: ISetMapped<K, KM>, newSet: ISetMapped<K, KM>) => ReadonlyRecord<"added" | "deleted", ISetMapped<K, KM>>;
514
+ /**
515
+ * Computes the intersection of two ISetMapped instances.
516
+ * @template K The type of the elements.
517
+ * @template KM The type of the mapped keys.
518
+ * @param a The first set.
519
+ * @param b The second set.
520
+ * @returns A new ISetMapped instance representing the intersection.
521
+ * @example
522
+ * ```typescript
523
+ * type Permission = { id: string };
524
+ * const permToKey = (p: Permission): string => p.id;
525
+ * const keyToPerm = (id: string): Permission => ({ id });
526
+ *
527
+ * const userPermissions = ISetMapped.create<Permission, string>(
528
+ * [{ id: "read" }, { id: "write" }, { id: "delete" }],
529
+ * permToKey,
530
+ * keyToPerm
531
+ * );
532
+ * const rolePermissions = ISetMapped.create<Permission, string>(
533
+ * [{ id: "read" }, { id: "comment" }, { id: "write" }],
534
+ * permToKey,
535
+ * keyToPerm
536
+ * );
537
+ *
538
+ * const commonPermissions = ISetMapped.intersection(userPermissions, rolePermissions);
539
+ * console.log(commonPermissions.toArray().map(p => p.id)); // Output: ["read", "write"]
540
+ * ```
541
+ */
542
+ const intersection: <K, KM extends MapSetKeyType>(a: ISetMapped<K, KM>, b: ISetMapped<K, KM>) => ISetMapped<K, KM>;
543
+ /**
544
+ * Computes the union of two ISetMapped instances.
545
+ * @template K The type of the elements.
546
+ * @template KM The type of the mapped keys.
547
+ * @param a The first set.
548
+ * @param b The second set.
549
+ * @returns A new ISetMapped instance representing the union.
550
+ * @example
551
+ * ```typescript
552
+ * type FeatureFlag = { flagName: string };
553
+ * const flagToKey = (f: FeatureFlag): string => f.flagName;
554
+ * const keyToFlag = (name: string): FeatureFlag => ({ flagName: name });
555
+ *
556
+ * const setA = ISetMapped.create<FeatureFlag, string>(
557
+ * [{ flagName: "newUI" }, { flagName: "betaFeature" }],
558
+ * flagToKey,
559
+ * keyToFlag
560
+ * );
561
+ * const setB = ISetMapped.create<FeatureFlag, string>(
562
+ * [{ flagName: "betaFeature" }, { flagName: "darkMode" }],
563
+ * flagToKey,
564
+ * keyToFlag
565
+ * );
566
+ *
567
+ * const combinedFlags = ISetMapped.union(setA, setB);
568
+ * // The order might vary as sets are unordered internally.
569
+ * console.log(combinedFlags.toArray().map(f => f.flagName).sort());
570
+ * // Output: ["betaFeature", "darkMode", "newUI"]
571
+ * ```
572
+ */
573
+ const union: <K, KM extends MapSetKeyType>(a: ISetMapped<K, KM>, b: ISetMapped<K, KM>) => ISetMapped<K, KM>;
574
+ }
575
+ export {};
576
+ //# sourceMappingURL=iset-mapped.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iset-mapped.d.mts","sourceRoot":"","sources":["../../src/collections/iset-mapped.mts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,KAAK,mBAAmB,CAAC,CAAC,EAAE,EAAE,SAAS,aAA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