data-structure-typed 2.1.0 → 2.1.2

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 (711) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/COMMANDS.md +13 -3
  3. package/README.md +21 -38
  4. package/benchmark/report.html +1 -1
  5. package/benchmark/report.json +101 -101
  6. package/dist/cjs/index.cjs +13062 -0
  7. package/dist/cjs/index.cjs.map +1 -0
  8. package/dist/esm/index.mjs +12984 -0
  9. package/dist/esm/index.mjs.map +1 -0
  10. package/dist/{cjs → types}/data-structures/binary-tree/avl-tree-counter.d.ts +5 -5
  11. package/dist/{esm → types}/data-structures/binary-tree/avl-tree-multi-map.d.ts +6 -6
  12. package/dist/{esm → types}/data-structures/binary-tree/avl-tree.d.ts +5 -5
  13. package/dist/{esm → types}/data-structures/binary-tree/binary-tree.d.ts +6 -6
  14. package/dist/{esm → types}/data-structures/binary-tree/bst.d.ts +6 -6
  15. package/dist/{esm → types}/data-structures/binary-tree/red-black-tree.d.ts +6 -6
  16. package/dist/{cjs → types}/data-structures/binary-tree/tree-counter.d.ts +5 -5
  17. package/dist/{cjs → types}/data-structures/binary-tree/tree-multi-map.d.ts +6 -6
  18. package/dist/{esm → types}/data-structures/heap/heap.d.ts +4 -4
  19. package/dist/{esm → types}/data-structures/linked-list/singly-linked-list.d.ts +1 -1
  20. package/dist/{esm → types}/interfaces/binary-tree.d.ts +3 -3
  21. package/dist/umd/data-structure-typed.js +97 -174
  22. package/dist/umd/data-structure-typed.js.map +1 -0
  23. package/dist/umd/data-structure-typed.min.js +2 -2
  24. package/dist/umd/data-structure-typed.min.js.map +1 -1
  25. package/jest.integration.config.js +8 -1
  26. package/package.json +20 -14
  27. package/src/data-structures/binary-tree/avl-tree-counter.ts +8 -11
  28. package/src/data-structures/binary-tree/avl-tree-multi-map.ts +6 -11
  29. package/src/data-structures/binary-tree/avl-tree.ts +6 -8
  30. package/src/data-structures/binary-tree/binary-tree.ts +18 -20
  31. package/src/data-structures/binary-tree/bst.ts +6 -11
  32. package/src/data-structures/binary-tree/red-black-tree.ts +6 -11
  33. package/src/data-structures/binary-tree/tree-counter.ts +8 -13
  34. package/src/data-structures/binary-tree/tree-multi-map.ts +6 -11
  35. package/src/data-structures/heap/heap.ts +5 -5
  36. package/src/data-structures/linked-list/singly-linked-list.ts +2 -2
  37. package/src/interfaces/binary-tree.ts +3 -3
  38. package/test/integration/all-in-one.test.ts +1 -1
  39. package/test/integration/compile.test.mjs +159 -0
  40. package/test/integration/compile.test.ts +176 -0
  41. package/test/integration/heap.test.js +1 -1
  42. package/test/integration/index.html +1 -1
  43. package/test/performance/data-structures/comparison/comparison.test.ts +27 -57
  44. package/test/unit/data-structures/binary-tree/binary-tree.test.ts +3 -3
  45. package/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +109 -1
  46. package/tsconfig.base.json +23 -0
  47. package/tsconfig.test.json +9 -0
  48. package/tsconfig.types.json +15 -0
  49. package/tsup.config.js +12 -24
  50. package/tsup.node.config.js +37 -0
  51. package/dist/cjs/common/index.js +0 -29
  52. package/dist/cjs/common/index.js.map +0 -1
  53. package/dist/cjs/data-structures/base/index.js +0 -19
  54. package/dist/cjs/data-structures/base/index.js.map +0 -1
  55. package/dist/cjs/data-structures/base/iterable-element-base.js +0 -244
  56. package/dist/cjs/data-structures/base/iterable-element-base.js.map +0 -1
  57. package/dist/cjs/data-structures/base/iterable-entry-base.js +0 -184
  58. package/dist/cjs/data-structures/base/iterable-entry-base.js.map +0 -1
  59. package/dist/cjs/data-structures/base/linear-base.js +0 -416
  60. package/dist/cjs/data-structures/base/linear-base.js.map +0 -1
  61. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js +0 -375
  62. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  63. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -135
  64. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js +0 -251
  65. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  66. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +0 -291
  67. package/dist/cjs/data-structures/binary-tree/avl-tree.js +0 -612
  68. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +0 -1
  69. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js +0 -295
  70. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  71. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +0 -754
  72. package/dist/cjs/data-structures/binary-tree/binary-tree.js +0 -1926
  73. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +0 -1
  74. package/dist/cjs/data-structures/binary-tree/bst.d.ts +0 -413
  75. package/dist/cjs/data-structures/binary-tree/bst.js +0 -904
  76. package/dist/cjs/data-structures/binary-tree/bst.js.map +0 -1
  77. package/dist/cjs/data-structures/binary-tree/index.js +0 -27
  78. package/dist/cjs/data-structures/binary-tree/index.js.map +0 -1
  79. package/dist/cjs/data-structures/binary-tree/red-black-tree.d.ts +0 -208
  80. package/dist/cjs/data-structures/binary-tree/red-black-tree.js +0 -547
  81. package/dist/cjs/data-structures/binary-tree/red-black-tree.js.map +0 -1
  82. package/dist/cjs/data-structures/binary-tree/segment-tree.js +0 -298
  83. package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +0 -1
  84. package/dist/cjs/data-structures/binary-tree/tree-counter.js +0 -414
  85. package/dist/cjs/data-structures/binary-tree/tree-counter.js.map +0 -1
  86. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +0 -385
  87. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  88. package/dist/cjs/data-structures/graph/abstract-graph.js +0 -897
  89. package/dist/cjs/data-structures/graph/abstract-graph.js.map +0 -1
  90. package/dist/cjs/data-structures/graph/directed-graph.js +0 -526
  91. package/dist/cjs/data-structures/graph/directed-graph.js.map +0 -1
  92. package/dist/cjs/data-structures/graph/index.js +0 -21
  93. package/dist/cjs/data-structures/graph/index.js.map +0 -1
  94. package/dist/cjs/data-structures/graph/map-graph.js +0 -108
  95. package/dist/cjs/data-structures/graph/map-graph.js.map +0 -1
  96. package/dist/cjs/data-structures/graph/undirected-graph.js +0 -425
  97. package/dist/cjs/data-structures/graph/undirected-graph.js.map +0 -1
  98. package/dist/cjs/data-structures/hash/hash-map.js +0 -693
  99. package/dist/cjs/data-structures/hash/hash-map.js.map +0 -1
  100. package/dist/cjs/data-structures/hash/index.js +0 -18
  101. package/dist/cjs/data-structures/hash/index.js.map +0 -1
  102. package/dist/cjs/data-structures/heap/heap.d.ts +0 -503
  103. package/dist/cjs/data-structures/heap/heap.js +0 -902
  104. package/dist/cjs/data-structures/heap/heap.js.map +0 -1
  105. package/dist/cjs/data-structures/heap/index.js +0 -20
  106. package/dist/cjs/data-structures/heap/index.js.map +0 -1
  107. package/dist/cjs/data-structures/heap/max-heap.js +0 -41
  108. package/dist/cjs/data-structures/heap/max-heap.js.map +0 -1
  109. package/dist/cjs/data-structures/heap/min-heap.js +0 -32
  110. package/dist/cjs/data-structures/heap/min-heap.js.map +0 -1
  111. package/dist/cjs/data-structures/index.js +0 -29
  112. package/dist/cjs/data-structures/index.js.map +0 -1
  113. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +0 -1112
  114. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  115. package/dist/cjs/data-structures/linked-list/index.js +0 -20
  116. package/dist/cjs/data-structures/linked-list/index.js.map +0 -1
  117. package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +0 -451
  118. package/dist/cjs/data-structures/linked-list/singly-linked-list.js +0 -851
  119. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +0 -1
  120. package/dist/cjs/data-structures/linked-list/skip-linked-list.js +0 -145
  121. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +0 -1
  122. package/dist/cjs/data-structures/matrix/index.js +0 -19
  123. package/dist/cjs/data-structures/matrix/index.js.map +0 -1
  124. package/dist/cjs/data-structures/matrix/matrix.js +0 -449
  125. package/dist/cjs/data-structures/matrix/matrix.js.map +0 -1
  126. package/dist/cjs/data-structures/matrix/navigator.js +0 -112
  127. package/dist/cjs/data-structures/matrix/navigator.js.map +0 -1
  128. package/dist/cjs/data-structures/priority-queue/index.js +0 -20
  129. package/dist/cjs/data-structures/priority-queue/index.js.map +0 -1
  130. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js +0 -35
  131. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  132. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js +0 -25
  133. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  134. package/dist/cjs/data-structures/priority-queue/priority-queue.js +0 -21
  135. package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +0 -1
  136. package/dist/cjs/data-structures/queue/deque.js +0 -880
  137. package/dist/cjs/data-structures/queue/deque.js.map +0 -1
  138. package/dist/cjs/data-structures/queue/index.js +0 -19
  139. package/dist/cjs/data-structures/queue/index.js.map +0 -1
  140. package/dist/cjs/data-structures/queue/queue.js +0 -474
  141. package/dist/cjs/data-structures/queue/queue.js.map +0 -1
  142. package/dist/cjs/data-structures/stack/index.js +0 -18
  143. package/dist/cjs/data-structures/stack/index.js.map +0 -1
  144. package/dist/cjs/data-structures/stack/stack.js +0 -402
  145. package/dist/cjs/data-structures/stack/stack.js.map +0 -1
  146. package/dist/cjs/data-structures/tree/index.js +0 -18
  147. package/dist/cjs/data-structures/tree/index.js.map +0 -1
  148. package/dist/cjs/data-structures/tree/tree.js +0 -108
  149. package/dist/cjs/data-structures/tree/tree.js.map +0 -1
  150. package/dist/cjs/data-structures/trie/index.js +0 -18
  151. package/dist/cjs/data-structures/trie/index.js.map +0 -1
  152. package/dist/cjs/data-structures/trie/trie.js +0 -611
  153. package/dist/cjs/data-structures/trie/trie.js.map +0 -1
  154. package/dist/cjs/index.js +0 -22
  155. package/dist/cjs/index.js.map +0 -1
  156. package/dist/cjs/interfaces/binary-tree.d.ts +0 -59
  157. package/dist/cjs/interfaces/binary-tree.js +0 -3
  158. package/dist/cjs/interfaces/binary-tree.js.map +0 -1
  159. package/dist/cjs/interfaces/doubly-linked-list.js +0 -3
  160. package/dist/cjs/interfaces/doubly-linked-list.js.map +0 -1
  161. package/dist/cjs/interfaces/graph.js +0 -3
  162. package/dist/cjs/interfaces/graph.js.map +0 -1
  163. package/dist/cjs/interfaces/heap.js +0 -3
  164. package/dist/cjs/interfaces/heap.js.map +0 -1
  165. package/dist/cjs/interfaces/index.js +0 -25
  166. package/dist/cjs/interfaces/index.js.map +0 -1
  167. package/dist/cjs/interfaces/navigator.js +0 -3
  168. package/dist/cjs/interfaces/navigator.js.map +0 -1
  169. package/dist/cjs/interfaces/priority-queue.js +0 -3
  170. package/dist/cjs/interfaces/priority-queue.js.map +0 -1
  171. package/dist/cjs/interfaces/segment-tree.js +0 -3
  172. package/dist/cjs/interfaces/segment-tree.js.map +0 -1
  173. package/dist/cjs/interfaces/singly-linked-list.js +0 -3
  174. package/dist/cjs/interfaces/singly-linked-list.js.map +0 -1
  175. package/dist/cjs/types/common.js +0 -3
  176. package/dist/cjs/types/common.js.map +0 -1
  177. package/dist/cjs/types/data-structures/base/base.js +0 -3
  178. package/dist/cjs/types/data-structures/base/base.js.map +0 -1
  179. package/dist/cjs/types/data-structures/base/index.js +0 -18
  180. package/dist/cjs/types/data-structures/base/index.js.map +0 -1
  181. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.js +0 -3
  182. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  183. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js +0 -3
  184. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  185. package/dist/cjs/types/data-structures/binary-tree/avl-tree.js +0 -3
  186. package/dist/cjs/types/data-structures/binary-tree/avl-tree.js.map +0 -1
  187. package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js +0 -3
  188. package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  189. package/dist/cjs/types/data-structures/binary-tree/binary-tree.js +0 -3
  190. package/dist/cjs/types/data-structures/binary-tree/binary-tree.js.map +0 -1
  191. package/dist/cjs/types/data-structures/binary-tree/bst.js +0 -3
  192. package/dist/cjs/types/data-structures/binary-tree/bst.js.map +0 -1
  193. package/dist/cjs/types/data-structures/binary-tree/index.js +0 -26
  194. package/dist/cjs/types/data-structures/binary-tree/index.js.map +0 -1
  195. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.js +0 -3
  196. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.js.map +0 -1
  197. package/dist/cjs/types/data-structures/binary-tree/segment-tree.js +0 -3
  198. package/dist/cjs/types/data-structures/binary-tree/segment-tree.js.map +0 -1
  199. package/dist/cjs/types/data-structures/binary-tree/tree-counter.js +0 -3
  200. package/dist/cjs/types/data-structures/binary-tree/tree-counter.js.map +0 -1
  201. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.js +0 -3
  202. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  203. package/dist/cjs/types/data-structures/graph/abstract-graph.js +0 -3
  204. package/dist/cjs/types/data-structures/graph/abstract-graph.js.map +0 -1
  205. package/dist/cjs/types/data-structures/graph/directed-graph.js +0 -3
  206. package/dist/cjs/types/data-structures/graph/directed-graph.js.map +0 -1
  207. package/dist/cjs/types/data-structures/graph/index.js +0 -20
  208. package/dist/cjs/types/data-structures/graph/index.js.map +0 -1
  209. package/dist/cjs/types/data-structures/graph/map-graph.js +0 -3
  210. package/dist/cjs/types/data-structures/graph/map-graph.js.map +0 -1
  211. package/dist/cjs/types/data-structures/graph/undirected-graph.js +0 -3
  212. package/dist/cjs/types/data-structures/graph/undirected-graph.js.map +0 -1
  213. package/dist/cjs/types/data-structures/hash/hash-map.js +0 -3
  214. package/dist/cjs/types/data-structures/hash/hash-map.js.map +0 -1
  215. package/dist/cjs/types/data-structures/hash/index.js +0 -18
  216. package/dist/cjs/types/data-structures/hash/index.js.map +0 -1
  217. package/dist/cjs/types/data-structures/heap/heap.js +0 -3
  218. package/dist/cjs/types/data-structures/heap/heap.js.map +0 -1
  219. package/dist/cjs/types/data-structures/heap/index.js +0 -18
  220. package/dist/cjs/types/data-structures/heap/index.js.map +0 -1
  221. package/dist/cjs/types/data-structures/heap/max-heap.js +0 -3
  222. package/dist/cjs/types/data-structures/heap/max-heap.js.map +0 -1
  223. package/dist/cjs/types/data-structures/heap/min-heap.js +0 -3
  224. package/dist/cjs/types/data-structures/heap/min-heap.js.map +0 -1
  225. package/dist/cjs/types/data-structures/index.js +0 -29
  226. package/dist/cjs/types/data-structures/index.js.map +0 -1
  227. package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js +0 -3
  228. package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  229. package/dist/cjs/types/data-structures/linked-list/index.js +0 -20
  230. package/dist/cjs/types/data-structures/linked-list/index.js.map +0 -1
  231. package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js +0 -3
  232. package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
  233. package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js +0 -3
  234. package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
  235. package/dist/cjs/types/data-structures/matrix/index.js +0 -19
  236. package/dist/cjs/types/data-structures/matrix/index.js.map +0 -1
  237. package/dist/cjs/types/data-structures/matrix/matrix.js +0 -3
  238. package/dist/cjs/types/data-structures/matrix/matrix.js.map +0 -1
  239. package/dist/cjs/types/data-structures/matrix/navigator.js +0 -3
  240. package/dist/cjs/types/data-structures/matrix/navigator.js.map +0 -1
  241. package/dist/cjs/types/data-structures/priority-queue/index.js +0 -20
  242. package/dist/cjs/types/data-structures/priority-queue/index.js.map +0 -1
  243. package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js +0 -3
  244. package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  245. package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js +0 -3
  246. package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  247. package/dist/cjs/types/data-structures/priority-queue/priority-queue.js +0 -3
  248. package/dist/cjs/types/data-structures/priority-queue/priority-queue.js.map +0 -1
  249. package/dist/cjs/types/data-structures/queue/deque.js +0 -3
  250. package/dist/cjs/types/data-structures/queue/deque.js.map +0 -1
  251. package/dist/cjs/types/data-structures/queue/index.js +0 -19
  252. package/dist/cjs/types/data-structures/queue/index.js.map +0 -1
  253. package/dist/cjs/types/data-structures/queue/queue.js +0 -3
  254. package/dist/cjs/types/data-structures/queue/queue.js.map +0 -1
  255. package/dist/cjs/types/data-structures/stack/index.js +0 -18
  256. package/dist/cjs/types/data-structures/stack/index.js.map +0 -1
  257. package/dist/cjs/types/data-structures/stack/stack.js +0 -3
  258. package/dist/cjs/types/data-structures/stack/stack.js.map +0 -1
  259. package/dist/cjs/types/data-structures/tree/index.js +0 -18
  260. package/dist/cjs/types/data-structures/tree/index.js.map +0 -1
  261. package/dist/cjs/types/data-structures/tree/tree.js +0 -3
  262. package/dist/cjs/types/data-structures/tree/tree.js.map +0 -1
  263. package/dist/cjs/types/data-structures/trie/index.js +0 -18
  264. package/dist/cjs/types/data-structures/trie/index.js.map +0 -1
  265. package/dist/cjs/types/data-structures/trie/trie.js +0 -3
  266. package/dist/cjs/types/data-structures/trie/trie.js.map +0 -1
  267. package/dist/cjs/types/index.js +0 -20
  268. package/dist/cjs/types/index.js.map +0 -1
  269. package/dist/cjs/types/utils/index.js +0 -19
  270. package/dist/cjs/types/utils/index.js.map +0 -1
  271. package/dist/cjs/types/utils/utils.js +0 -3
  272. package/dist/cjs/types/utils/utils.js.map +0 -1
  273. package/dist/cjs/types/utils/validate-type.js +0 -3
  274. package/dist/cjs/types/utils/validate-type.js.map +0 -1
  275. package/dist/cjs/utils/index.js +0 -19
  276. package/dist/cjs/utils/index.js.map +0 -1
  277. package/dist/cjs/utils/number.js +0 -24
  278. package/dist/cjs/utils/number.js.map +0 -1
  279. package/dist/cjs/utils/utils.js +0 -354
  280. package/dist/cjs/utils/utils.js.map +0 -1
  281. package/dist/esm/common/index.d.ts +0 -12
  282. package/dist/esm/common/index.js +0 -29
  283. package/dist/esm/common/index.js.map +0 -1
  284. package/dist/esm/data-structures/base/index.d.ts +0 -2
  285. package/dist/esm/data-structures/base/index.js +0 -3
  286. package/dist/esm/data-structures/base/index.js.map +0 -1
  287. package/dist/esm/data-structures/base/iterable-element-base.d.ts +0 -219
  288. package/dist/esm/data-structures/base/iterable-element-base.js +0 -247
  289. package/dist/esm/data-structures/base/iterable-element-base.js.map +0 -1
  290. package/dist/esm/data-structures/base/iterable-entry-base.d.ts +0 -144
  291. package/dist/esm/data-structures/base/iterable-entry-base.js +0 -180
  292. package/dist/esm/data-structures/base/iterable-entry-base.js.map +0 -1
  293. package/dist/esm/data-structures/base/linear-base.d.ts +0 -335
  294. package/dist/esm/data-structures/base/linear-base.js +0 -412
  295. package/dist/esm/data-structures/base/linear-base.js.map +0 -1
  296. package/dist/esm/data-structures/binary-tree/avl-tree-counter.d.ts +0 -182
  297. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js +0 -369
  298. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  299. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js +0 -244
  300. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  301. package/dist/esm/data-structures/binary-tree/avl-tree.js +0 -607
  302. package/dist/esm/data-structures/binary-tree/avl-tree.js.map +0 -1
  303. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -174
  304. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.js +0 -296
  305. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  306. package/dist/esm/data-structures/binary-tree/binary-tree.js +0 -1922
  307. package/dist/esm/data-structures/binary-tree/binary-tree.js.map +0 -1
  308. package/dist/esm/data-structures/binary-tree/bst.js +0 -901
  309. package/dist/esm/data-structures/binary-tree/bst.js.map +0 -1
  310. package/dist/esm/data-structures/binary-tree/index.d.ts +0 -10
  311. package/dist/esm/data-structures/binary-tree/index.js +0 -11
  312. package/dist/esm/data-structures/binary-tree/index.js.map +0 -1
  313. package/dist/esm/data-structures/binary-tree/red-black-tree.js +0 -540
  314. package/dist/esm/data-structures/binary-tree/red-black-tree.js.map +0 -1
  315. package/dist/esm/data-structures/binary-tree/segment-tree.d.ts +0 -160
  316. package/dist/esm/data-structures/binary-tree/segment-tree.js +0 -295
  317. package/dist/esm/data-structures/binary-tree/segment-tree.js.map +0 -1
  318. package/dist/esm/data-structures/binary-tree/tree-counter.d.ts +0 -190
  319. package/dist/esm/data-structures/binary-tree/tree-counter.js +0 -412
  320. package/dist/esm/data-structures/binary-tree/tree-counter.js.map +0 -1
  321. package/dist/esm/data-structures/binary-tree/tree-multi-map.d.ts +0 -270
  322. package/dist/esm/data-structures/binary-tree/tree-multi-map.js +0 -378
  323. package/dist/esm/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  324. package/dist/esm/data-structures/graph/abstract-graph.d.ts +0 -340
  325. package/dist/esm/data-structures/graph/abstract-graph.js +0 -892
  326. package/dist/esm/data-structures/graph/abstract-graph.js.map +0 -1
  327. package/dist/esm/data-structures/graph/directed-graph.d.ts +0 -207
  328. package/dist/esm/data-structures/graph/directed-graph.js +0 -521
  329. package/dist/esm/data-structures/graph/directed-graph.js.map +0 -1
  330. package/dist/esm/data-structures/graph/index.d.ts +0 -4
  331. package/dist/esm/data-structures/graph/index.js +0 -5
  332. package/dist/esm/data-structures/graph/index.js.map +0 -1
  333. package/dist/esm/data-structures/graph/map-graph.d.ts +0 -78
  334. package/dist/esm/data-structures/graph/map-graph.js +0 -105
  335. package/dist/esm/data-structures/graph/map-graph.js.map +0 -1
  336. package/dist/esm/data-structures/graph/undirected-graph.d.ts +0 -188
  337. package/dist/esm/data-structures/graph/undirected-graph.js +0 -418
  338. package/dist/esm/data-structures/graph/undirected-graph.js.map +0 -1
  339. package/dist/esm/data-structures/hash/hash-map.d.ts +0 -345
  340. package/dist/esm/data-structures/hash/hash-map.js +0 -691
  341. package/dist/esm/data-structures/hash/hash-map.js.map +0 -1
  342. package/dist/esm/data-structures/hash/index.d.ts +0 -1
  343. package/dist/esm/data-structures/hash/index.js +0 -2
  344. package/dist/esm/data-structures/hash/index.js.map +0 -1
  345. package/dist/esm/data-structures/heap/heap.js +0 -894
  346. package/dist/esm/data-structures/heap/heap.js.map +0 -1
  347. package/dist/esm/data-structures/heap/index.d.ts +0 -3
  348. package/dist/esm/data-structures/heap/index.js +0 -4
  349. package/dist/esm/data-structures/heap/index.js.map +0 -1
  350. package/dist/esm/data-structures/heap/max-heap.d.ts +0 -32
  351. package/dist/esm/data-structures/heap/max-heap.js +0 -40
  352. package/dist/esm/data-structures/heap/max-heap.js.map +0 -1
  353. package/dist/esm/data-structures/heap/min-heap.d.ts +0 -33
  354. package/dist/esm/data-structures/heap/min-heap.js +0 -28
  355. package/dist/esm/data-structures/heap/min-heap.js.map +0 -1
  356. package/dist/esm/data-structures/index.d.ts +0 -12
  357. package/dist/esm/data-structures/index.js +0 -13
  358. package/dist/esm/data-structures/index.js.map +0 -1
  359. package/dist/esm/data-structures/linked-list/doubly-linked-list.d.ts +0 -769
  360. package/dist/esm/data-structures/linked-list/doubly-linked-list.js +0 -1109
  361. package/dist/esm/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  362. package/dist/esm/data-structures/linked-list/index.d.ts +0 -3
  363. package/dist/esm/data-structures/linked-list/index.js +0 -4
  364. package/dist/esm/data-structures/linked-list/index.js.map +0 -1
  365. package/dist/esm/data-structures/linked-list/singly-linked-list.js +0 -847
  366. package/dist/esm/data-structures/linked-list/singly-linked-list.js.map +0 -1
  367. package/dist/esm/data-structures/linked-list/skip-linked-list.d.ts +0 -27
  368. package/dist/esm/data-structures/linked-list/skip-linked-list.js +0 -143
  369. package/dist/esm/data-structures/linked-list/skip-linked-list.js.map +0 -1
  370. package/dist/esm/data-structures/matrix/index.d.ts +0 -2
  371. package/dist/esm/data-structures/matrix/index.js +0 -3
  372. package/dist/esm/data-structures/matrix/index.js.map +0 -1
  373. package/dist/esm/data-structures/matrix/matrix.d.ts +0 -168
  374. package/dist/esm/data-structures/matrix/matrix.js +0 -444
  375. package/dist/esm/data-structures/matrix/matrix.js.map +0 -1
  376. package/dist/esm/data-structures/matrix/navigator.d.ts +0 -55
  377. package/dist/esm/data-structures/matrix/navigator.js +0 -114
  378. package/dist/esm/data-structures/matrix/navigator.js.map +0 -1
  379. package/dist/esm/data-structures/priority-queue/index.d.ts +0 -3
  380. package/dist/esm/data-structures/priority-queue/index.js +0 -4
  381. package/dist/esm/data-structures/priority-queue/index.js.map +0 -1
  382. package/dist/esm/data-structures/priority-queue/max-priority-queue.d.ts +0 -27
  383. package/dist/esm/data-structures/priority-queue/max-priority-queue.js +0 -34
  384. package/dist/esm/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  385. package/dist/esm/data-structures/priority-queue/min-priority-queue.d.ts +0 -26
  386. package/dist/esm/data-structures/priority-queue/min-priority-queue.js +0 -21
  387. package/dist/esm/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  388. package/dist/esm/data-structures/priority-queue/priority-queue.d.ts +0 -15
  389. package/dist/esm/data-structures/priority-queue/priority-queue.js +0 -17
  390. package/dist/esm/data-structures/priority-queue/priority-queue.js.map +0 -1
  391. package/dist/esm/data-structures/queue/deque.d.ts +0 -431
  392. package/dist/esm/data-structures/queue/deque.js +0 -880
  393. package/dist/esm/data-structures/queue/deque.js.map +0 -1
  394. package/dist/esm/data-structures/queue/index.d.ts +0 -2
  395. package/dist/esm/data-structures/queue/index.js +0 -3
  396. package/dist/esm/data-structures/queue/index.js.map +0 -1
  397. package/dist/esm/data-structures/queue/queue.d.ts +0 -308
  398. package/dist/esm/data-structures/queue/queue.js +0 -467
  399. package/dist/esm/data-structures/queue/queue.js.map +0 -1
  400. package/dist/esm/data-structures/stack/index.d.ts +0 -1
  401. package/dist/esm/data-structures/stack/index.js +0 -2
  402. package/dist/esm/data-structures/stack/index.js.map +0 -1
  403. package/dist/esm/data-structures/stack/stack.d.ts +0 -306
  404. package/dist/esm/data-structures/stack/stack.js +0 -398
  405. package/dist/esm/data-structures/stack/stack.js.map +0 -1
  406. package/dist/esm/data-structures/tree/index.d.ts +0 -1
  407. package/dist/esm/data-structures/tree/index.js +0 -2
  408. package/dist/esm/data-structures/tree/index.js.map +0 -1
  409. package/dist/esm/data-structures/tree/tree.d.ts +0 -62
  410. package/dist/esm/data-structures/tree/tree.js +0 -107
  411. package/dist/esm/data-structures/tree/tree.js.map +0 -1
  412. package/dist/esm/data-structures/trie/index.d.ts +0 -1
  413. package/dist/esm/data-structures/trie/index.js +0 -2
  414. package/dist/esm/data-structures/trie/index.js.map +0 -1
  415. package/dist/esm/data-structures/trie/trie.d.ts +0 -350
  416. package/dist/esm/data-structures/trie/trie.js +0 -613
  417. package/dist/esm/data-structures/trie/trie.js.map +0 -1
  418. package/dist/esm/index.d.ts +0 -5
  419. package/dist/esm/index.js +0 -6
  420. package/dist/esm/index.js.map +0 -1
  421. package/dist/esm/interfaces/binary-tree.js +0 -2
  422. package/dist/esm/interfaces/binary-tree.js.map +0 -1
  423. package/dist/esm/interfaces/doubly-linked-list.d.ts +0 -1
  424. package/dist/esm/interfaces/doubly-linked-list.js +0 -2
  425. package/dist/esm/interfaces/doubly-linked-list.js.map +0 -1
  426. package/dist/esm/interfaces/graph.d.ts +0 -21
  427. package/dist/esm/interfaces/graph.js +0 -2
  428. package/dist/esm/interfaces/graph.js.map +0 -1
  429. package/dist/esm/interfaces/heap.d.ts +0 -1
  430. package/dist/esm/interfaces/heap.js +0 -2
  431. package/dist/esm/interfaces/heap.js.map +0 -1
  432. package/dist/esm/interfaces/index.d.ts +0 -8
  433. package/dist/esm/interfaces/index.js +0 -9
  434. package/dist/esm/interfaces/index.js.map +0 -1
  435. package/dist/esm/interfaces/navigator.d.ts +0 -1
  436. package/dist/esm/interfaces/navigator.js +0 -2
  437. package/dist/esm/interfaces/navigator.js.map +0 -1
  438. package/dist/esm/interfaces/priority-queue.d.ts +0 -1
  439. package/dist/esm/interfaces/priority-queue.js +0 -2
  440. package/dist/esm/interfaces/priority-queue.js.map +0 -1
  441. package/dist/esm/interfaces/segment-tree.d.ts +0 -1
  442. package/dist/esm/interfaces/segment-tree.js +0 -2
  443. package/dist/esm/interfaces/segment-tree.js.map +0 -1
  444. package/dist/esm/interfaces/singly-linked-list.d.ts +0 -1
  445. package/dist/esm/interfaces/singly-linked-list.js +0 -2
  446. package/dist/esm/interfaces/singly-linked-list.js.map +0 -1
  447. package/dist/esm/types/common.d.ts +0 -15
  448. package/dist/esm/types/common.js +0 -2
  449. package/dist/esm/types/common.js.map +0 -1
  450. package/dist/esm/types/data-structures/base/base.d.ts +0 -13
  451. package/dist/esm/types/data-structures/base/base.js +0 -2
  452. package/dist/esm/types/data-structures/base/base.js.map +0 -1
  453. package/dist/esm/types/data-structures/base/index.d.ts +0 -1
  454. package/dist/esm/types/data-structures/base/index.js +0 -2
  455. package/dist/esm/types/data-structures/base/index.js.map +0 -1
  456. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -2
  457. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.js +0 -2
  458. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  459. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -2
  460. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.js +0 -2
  461. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  462. package/dist/esm/types/data-structures/binary-tree/avl-tree.d.ts +0 -2
  463. package/dist/esm/types/data-structures/binary-tree/avl-tree.js +0 -2
  464. package/dist/esm/types/data-structures/binary-tree/avl-tree.js.map +0 -1
  465. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -1
  466. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.js +0 -2
  467. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  468. package/dist/esm/types/data-structures/binary-tree/binary-tree.d.ts +0 -29
  469. package/dist/esm/types/data-structures/binary-tree/binary-tree.js +0 -2
  470. package/dist/esm/types/data-structures/binary-tree/binary-tree.js.map +0 -1
  471. package/dist/esm/types/data-structures/binary-tree/bst.d.ts +0 -12
  472. package/dist/esm/types/data-structures/binary-tree/bst.js +0 -2
  473. package/dist/esm/types/data-structures/binary-tree/bst.js.map +0 -1
  474. package/dist/esm/types/data-structures/binary-tree/index.d.ts +0 -9
  475. package/dist/esm/types/data-structures/binary-tree/index.js +0 -10
  476. package/dist/esm/types/data-structures/binary-tree/index.js.map +0 -1
  477. package/dist/esm/types/data-structures/binary-tree/red-black-tree.d.ts +0 -3
  478. package/dist/esm/types/data-structures/binary-tree/red-black-tree.js +0 -2
  479. package/dist/esm/types/data-structures/binary-tree/red-black-tree.js.map +0 -1
  480. package/dist/esm/types/data-structures/binary-tree/segment-tree.d.ts +0 -1
  481. package/dist/esm/types/data-structures/binary-tree/segment-tree.js +0 -2
  482. package/dist/esm/types/data-structures/binary-tree/segment-tree.js.map +0 -1
  483. package/dist/esm/types/data-structures/binary-tree/tree-counter.d.ts +0 -2
  484. package/dist/esm/types/data-structures/binary-tree/tree-counter.js +0 -2
  485. package/dist/esm/types/data-structures/binary-tree/tree-counter.js.map +0 -1
  486. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.d.ts +0 -2
  487. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.js +0 -2
  488. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  489. package/dist/esm/types/data-structures/graph/abstract-graph.d.ts +0 -14
  490. package/dist/esm/types/data-structures/graph/abstract-graph.js +0 -2
  491. package/dist/esm/types/data-structures/graph/abstract-graph.js.map +0 -1
  492. package/dist/esm/types/data-structures/graph/directed-graph.d.ts +0 -1
  493. package/dist/esm/types/data-structures/graph/directed-graph.js +0 -2
  494. package/dist/esm/types/data-structures/graph/directed-graph.js.map +0 -1
  495. package/dist/esm/types/data-structures/graph/index.d.ts +0 -3
  496. package/dist/esm/types/data-structures/graph/index.js +0 -4
  497. package/dist/esm/types/data-structures/graph/index.js.map +0 -1
  498. package/dist/esm/types/data-structures/graph/map-graph.d.ts +0 -1
  499. package/dist/esm/types/data-structures/graph/map-graph.js +0 -2
  500. package/dist/esm/types/data-structures/graph/map-graph.js.map +0 -1
  501. package/dist/esm/types/data-structures/graph/undirected-graph.d.ts +0 -1
  502. package/dist/esm/types/data-structures/graph/undirected-graph.js +0 -2
  503. package/dist/esm/types/data-structures/graph/undirected-graph.js.map +0 -1
  504. package/dist/esm/types/data-structures/hash/hash-map.d.ts +0 -19
  505. package/dist/esm/types/data-structures/hash/hash-map.js +0 -2
  506. package/dist/esm/types/data-structures/hash/hash-map.js.map +0 -1
  507. package/dist/esm/types/data-structures/hash/index.d.ts +0 -2
  508. package/dist/esm/types/data-structures/hash/index.js +0 -2
  509. package/dist/esm/types/data-structures/hash/index.js.map +0 -1
  510. package/dist/esm/types/data-structures/heap/heap.d.ts +0 -5
  511. package/dist/esm/types/data-structures/heap/heap.js +0 -2
  512. package/dist/esm/types/data-structures/heap/heap.js.map +0 -1
  513. package/dist/esm/types/data-structures/heap/index.d.ts +0 -1
  514. package/dist/esm/types/data-structures/heap/index.js +0 -2
  515. package/dist/esm/types/data-structures/heap/index.js.map +0 -1
  516. package/dist/esm/types/data-structures/heap/max-heap.d.ts +0 -1
  517. package/dist/esm/types/data-structures/heap/max-heap.js +0 -2
  518. package/dist/esm/types/data-structures/heap/max-heap.js.map +0 -1
  519. package/dist/esm/types/data-structures/heap/min-heap.d.ts +0 -1
  520. package/dist/esm/types/data-structures/heap/min-heap.js +0 -2
  521. package/dist/esm/types/data-structures/heap/min-heap.js.map +0 -1
  522. package/dist/esm/types/data-structures/index.d.ts +0 -12
  523. package/dist/esm/types/data-structures/index.js +0 -13
  524. package/dist/esm/types/data-structures/index.js.map +0 -1
  525. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -2
  526. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.js +0 -2
  527. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  528. package/dist/esm/types/data-structures/linked-list/index.d.ts +0 -3
  529. package/dist/esm/types/data-structures/linked-list/index.js +0 -4
  530. package/dist/esm/types/data-structures/linked-list/index.js.map +0 -1
  531. package/dist/esm/types/data-structures/linked-list/singly-linked-list.d.ts +0 -2
  532. package/dist/esm/types/data-structures/linked-list/singly-linked-list.js +0 -2
  533. package/dist/esm/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
  534. package/dist/esm/types/data-structures/linked-list/skip-linked-list.d.ts +0 -4
  535. package/dist/esm/types/data-structures/linked-list/skip-linked-list.js +0 -2
  536. package/dist/esm/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
  537. package/dist/esm/types/data-structures/matrix/index.d.ts +0 -2
  538. package/dist/esm/types/data-structures/matrix/index.js +0 -3
  539. package/dist/esm/types/data-structures/matrix/index.js.map +0 -1
  540. package/dist/esm/types/data-structures/matrix/matrix.d.ts +0 -7
  541. package/dist/esm/types/data-structures/matrix/matrix.js +0 -2
  542. package/dist/esm/types/data-structures/matrix/matrix.js.map +0 -1
  543. package/dist/esm/types/data-structures/matrix/navigator.d.ts +0 -14
  544. package/dist/esm/types/data-structures/matrix/navigator.js +0 -2
  545. package/dist/esm/types/data-structures/matrix/navigator.js.map +0 -1
  546. package/dist/esm/types/data-structures/priority-queue/index.d.ts +0 -3
  547. package/dist/esm/types/data-structures/priority-queue/index.js +0 -4
  548. package/dist/esm/types/data-structures/priority-queue/index.js.map +0 -1
  549. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -1
  550. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.js +0 -2
  551. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  552. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -1
  553. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.js +0 -2
  554. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  555. package/dist/esm/types/data-structures/priority-queue/priority-queue.d.ts +0 -2
  556. package/dist/esm/types/data-structures/priority-queue/priority-queue.js +0 -2
  557. package/dist/esm/types/data-structures/priority-queue/priority-queue.js.map +0 -1
  558. package/dist/esm/types/data-structures/queue/deque.d.ts +0 -4
  559. package/dist/esm/types/data-structures/queue/deque.js +0 -2
  560. package/dist/esm/types/data-structures/queue/deque.js.map +0 -1
  561. package/dist/esm/types/data-structures/queue/index.d.ts +0 -2
  562. package/dist/esm/types/data-structures/queue/index.js +0 -3
  563. package/dist/esm/types/data-structures/queue/index.js.map +0 -1
  564. package/dist/esm/types/data-structures/queue/queue.d.ts +0 -4
  565. package/dist/esm/types/data-structures/queue/queue.js +0 -2
  566. package/dist/esm/types/data-structures/queue/queue.js.map +0 -1
  567. package/dist/esm/types/data-structures/stack/index.d.ts +0 -1
  568. package/dist/esm/types/data-structures/stack/index.js +0 -2
  569. package/dist/esm/types/data-structures/stack/index.js.map +0 -1
  570. package/dist/esm/types/data-structures/stack/stack.d.ts +0 -2
  571. package/dist/esm/types/data-structures/stack/stack.js +0 -2
  572. package/dist/esm/types/data-structures/stack/stack.js.map +0 -1
  573. package/dist/esm/types/data-structures/tree/index.d.ts +0 -1
  574. package/dist/esm/types/data-structures/tree/index.js +0 -2
  575. package/dist/esm/types/data-structures/tree/index.js.map +0 -1
  576. package/dist/esm/types/data-structures/tree/tree.d.ts +0 -1
  577. package/dist/esm/types/data-structures/tree/tree.js +0 -2
  578. package/dist/esm/types/data-structures/tree/tree.js.map +0 -1
  579. package/dist/esm/types/data-structures/trie/index.d.ts +0 -1
  580. package/dist/esm/types/data-structures/trie/index.js +0 -2
  581. package/dist/esm/types/data-structures/trie/index.js.map +0 -1
  582. package/dist/esm/types/data-structures/trie/trie.d.ts +0 -4
  583. package/dist/esm/types/data-structures/trie/trie.js +0 -2
  584. package/dist/esm/types/data-structures/trie/trie.js.map +0 -1
  585. package/dist/esm/types/index.d.ts +0 -3
  586. package/dist/esm/types/index.js +0 -4
  587. package/dist/esm/types/index.js.map +0 -1
  588. package/dist/esm/types/utils/index.d.ts +0 -2
  589. package/dist/esm/types/utils/index.js +0 -3
  590. package/dist/esm/types/utils/index.js.map +0 -1
  591. package/dist/esm/types/utils/utils.d.ts +0 -22
  592. package/dist/esm/types/utils/utils.js +0 -2
  593. package/dist/esm/types/utils/utils.js.map +0 -1
  594. package/dist/esm/types/utils/validate-type.d.ts +0 -19
  595. package/dist/esm/types/utils/validate-type.js +0 -2
  596. package/dist/esm/types/utils/validate-type.js.map +0 -1
  597. package/dist/esm/utils/index.d.ts +0 -2
  598. package/dist/esm/utils/index.js +0 -3
  599. package/dist/esm/utils/index.js.map +0 -1
  600. package/dist/esm/utils/number.d.ts +0 -14
  601. package/dist/esm/utils/number.js +0 -21
  602. package/dist/esm/utils/number.js.map +0 -1
  603. package/dist/esm/utils/utils.d.ts +0 -209
  604. package/dist/esm/utils/utils.js +0 -325
  605. package/dist/esm/utils/utils.js.map +0 -1
  606. package/test/integration/compile.js +0 -144
  607. package/test/integration/compile.mjs +0 -135
  608. package/test/integration/compile.ts +0 -171
  609. package/tsconfig-base.json +0 -24
  610. package/tsconfig-cjs.json +0 -14
  611. package/tsconfig-esm.json +0 -14
  612. /package/dist/{cjs → types}/common/index.d.ts +0 -0
  613. /package/dist/{cjs → types}/data-structures/base/index.d.ts +0 -0
  614. /package/dist/{cjs → types}/data-structures/base/iterable-element-base.d.ts +0 -0
  615. /package/dist/{cjs → types}/data-structures/base/iterable-entry-base.d.ts +0 -0
  616. /package/dist/{cjs → types}/data-structures/base/linear-base.d.ts +0 -0
  617. /package/dist/{cjs → types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  618. /package/dist/{cjs → types}/data-structures/binary-tree/index.d.ts +0 -0
  619. /package/dist/{cjs → types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
  620. /package/dist/{cjs → types}/data-structures/graph/abstract-graph.d.ts +0 -0
  621. /package/dist/{cjs → types}/data-structures/graph/directed-graph.d.ts +0 -0
  622. /package/dist/{cjs → types}/data-structures/graph/index.d.ts +0 -0
  623. /package/dist/{cjs → types}/data-structures/graph/map-graph.d.ts +0 -0
  624. /package/dist/{cjs → types}/data-structures/graph/undirected-graph.d.ts +0 -0
  625. /package/dist/{cjs → types}/data-structures/hash/hash-map.d.ts +0 -0
  626. /package/dist/{cjs → types}/data-structures/hash/index.d.ts +0 -0
  627. /package/dist/{cjs → types}/data-structures/heap/index.d.ts +0 -0
  628. /package/dist/{cjs → types}/data-structures/heap/max-heap.d.ts +0 -0
  629. /package/dist/{cjs → types}/data-structures/heap/min-heap.d.ts +0 -0
  630. /package/dist/{cjs → types}/data-structures/index.d.ts +0 -0
  631. /package/dist/{cjs → types}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  632. /package/dist/{cjs → types}/data-structures/linked-list/index.d.ts +0 -0
  633. /package/dist/{cjs → types}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  634. /package/dist/{cjs → types}/data-structures/matrix/index.d.ts +0 -0
  635. /package/dist/{cjs → types}/data-structures/matrix/matrix.d.ts +0 -0
  636. /package/dist/{cjs → types}/data-structures/matrix/navigator.d.ts +0 -0
  637. /package/dist/{cjs → types}/data-structures/priority-queue/index.d.ts +0 -0
  638. /package/dist/{cjs → types}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  639. /package/dist/{cjs → types}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  640. /package/dist/{cjs → types}/data-structures/priority-queue/priority-queue.d.ts +0 -0
  641. /package/dist/{cjs → types}/data-structures/queue/deque.d.ts +0 -0
  642. /package/dist/{cjs → types}/data-structures/queue/index.d.ts +0 -0
  643. /package/dist/{cjs → types}/data-structures/queue/queue.d.ts +0 -0
  644. /package/dist/{cjs → types}/data-structures/stack/index.d.ts +0 -0
  645. /package/dist/{cjs → types}/data-structures/stack/stack.d.ts +0 -0
  646. /package/dist/{cjs → types}/data-structures/tree/index.d.ts +0 -0
  647. /package/dist/{cjs → types}/data-structures/tree/tree.d.ts +0 -0
  648. /package/dist/{cjs → types}/data-structures/trie/index.d.ts +0 -0
  649. /package/dist/{cjs → types}/data-structures/trie/trie.d.ts +0 -0
  650. /package/dist/{cjs → types}/index.d.ts +0 -0
  651. /package/dist/{cjs → types}/interfaces/doubly-linked-list.d.ts +0 -0
  652. /package/dist/{cjs → types}/interfaces/graph.d.ts +0 -0
  653. /package/dist/{cjs → types}/interfaces/heap.d.ts +0 -0
  654. /package/dist/{cjs → types}/interfaces/index.d.ts +0 -0
  655. /package/dist/{cjs → types}/interfaces/navigator.d.ts +0 -0
  656. /package/dist/{cjs → types}/interfaces/priority-queue.d.ts +0 -0
  657. /package/dist/{cjs → types}/interfaces/segment-tree.d.ts +0 -0
  658. /package/dist/{cjs → types}/interfaces/singly-linked-list.d.ts +0 -0
  659. /package/dist/{cjs → types}/types/common.d.ts +0 -0
  660. /package/dist/{cjs → types}/types/data-structures/base/base.d.ts +0 -0
  661. /package/dist/{cjs → types}/types/data-structures/base/index.d.ts +0 -0
  662. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -0
  663. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -0
  664. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree.d.ts +0 -0
  665. /package/dist/{cjs → types}/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  666. /package/dist/{cjs → types}/types/data-structures/binary-tree/binary-tree.d.ts +0 -0
  667. /package/dist/{cjs → types}/types/data-structures/binary-tree/bst.d.ts +0 -0
  668. /package/dist/{cjs → types}/types/data-structures/binary-tree/index.d.ts +0 -0
  669. /package/dist/{cjs → types}/types/data-structures/binary-tree/red-black-tree.d.ts +0 -0
  670. /package/dist/{cjs → types}/types/data-structures/binary-tree/segment-tree.d.ts +0 -0
  671. /package/dist/{cjs → types}/types/data-structures/binary-tree/tree-counter.d.ts +0 -0
  672. /package/dist/{cjs → types}/types/data-structures/binary-tree/tree-multi-map.d.ts +0 -0
  673. /package/dist/{cjs → types}/types/data-structures/graph/abstract-graph.d.ts +0 -0
  674. /package/dist/{cjs → types}/types/data-structures/graph/directed-graph.d.ts +0 -0
  675. /package/dist/{cjs → types}/types/data-structures/graph/index.d.ts +0 -0
  676. /package/dist/{cjs → types}/types/data-structures/graph/map-graph.d.ts +0 -0
  677. /package/dist/{cjs → types}/types/data-structures/graph/undirected-graph.d.ts +0 -0
  678. /package/dist/{cjs → types}/types/data-structures/hash/hash-map.d.ts +0 -0
  679. /package/dist/{cjs → types}/types/data-structures/hash/index.d.ts +0 -0
  680. /package/dist/{cjs → types}/types/data-structures/heap/heap.d.ts +0 -0
  681. /package/dist/{cjs → types}/types/data-structures/heap/index.d.ts +0 -0
  682. /package/dist/{cjs → types}/types/data-structures/heap/max-heap.d.ts +0 -0
  683. /package/dist/{cjs → types}/types/data-structures/heap/min-heap.d.ts +0 -0
  684. /package/dist/{cjs → types}/types/data-structures/index.d.ts +0 -0
  685. /package/dist/{cjs → types}/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  686. /package/dist/{cjs → types}/types/data-structures/linked-list/index.d.ts +0 -0
  687. /package/dist/{cjs → types}/types/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  688. /package/dist/{cjs → types}/types/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  689. /package/dist/{cjs → types}/types/data-structures/matrix/index.d.ts +0 -0
  690. /package/dist/{cjs → types}/types/data-structures/matrix/matrix.d.ts +0 -0
  691. /package/dist/{cjs → types}/types/data-structures/matrix/navigator.d.ts +0 -0
  692. /package/dist/{cjs → types}/types/data-structures/priority-queue/index.d.ts +0 -0
  693. /package/dist/{cjs → types}/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  694. /package/dist/{cjs → types}/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  695. /package/dist/{cjs → types}/types/data-structures/priority-queue/priority-queue.d.ts +0 -0
  696. /package/dist/{cjs → types}/types/data-structures/queue/deque.d.ts +0 -0
  697. /package/dist/{cjs → types}/types/data-structures/queue/index.d.ts +0 -0
  698. /package/dist/{cjs → types}/types/data-structures/queue/queue.d.ts +0 -0
  699. /package/dist/{cjs → types}/types/data-structures/stack/index.d.ts +0 -0
  700. /package/dist/{cjs → types}/types/data-structures/stack/stack.d.ts +0 -0
  701. /package/dist/{cjs → types}/types/data-structures/tree/index.d.ts +0 -0
  702. /package/dist/{cjs → types}/types/data-structures/tree/tree.d.ts +0 -0
  703. /package/dist/{cjs → types}/types/data-structures/trie/index.d.ts +0 -0
  704. /package/dist/{cjs → types}/types/data-structures/trie/trie.d.ts +0 -0
  705. /package/dist/{cjs → types}/types/index.d.ts +0 -0
  706. /package/dist/{cjs → types}/types/utils/index.d.ts +0 -0
  707. /package/dist/{cjs → types}/types/utils/utils.d.ts +0 -0
  708. /package/dist/{cjs → types}/types/utils/validate-type.d.ts +0 -0
  709. /package/dist/{cjs → types}/utils/index.d.ts +0 -0
  710. /package/dist/{cjs → types}/utils/number.d.ts +0 -0
  711. /package/dist/{cjs → types}/utils/utils.d.ts +0 -0
@@ -1,5 +1,12 @@
1
1
  module.exports = {
2
2
  preset: 'ts-jest',
3
3
  testEnvironment: 'node',
4
- testMatch: ['<rootDir>/test/integration/**/*.test.ts', '<rootDir>/test/integration/**/*.test.js'],
4
+ testMatch: [
5
+ '<rootDir>/test/integration/**/*.test.ts',
6
+ '<rootDir>/test/integration/**/*.test.js',
7
+ '<rootDir>/test/integration/**/*.test.mjs'
8
+ ],
9
+ transform: {
10
+ '^.+\\.(ts|tsx)$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }]
11
+ }
5
12
  };
package/package.json CHANGED
@@ -1,31 +1,37 @@
1
1
  {
2
2
  "name": "data-structure-typed",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Standard data structure",
5
- "main": "dist/cjs/index.js",
6
- "module": "dist/esm/index.js",
7
5
  "browser": "dist/umd/data-structure-typed.min.js",
8
- "types": "dist/esm/index.d.ts",
9
6
  "umd:main": "dist/umd/data-structure-typed.min.js",
7
+ "main": "dist/cjs/index.cjs",
8
+ "module": "dist/esm/index.mjs",
9
+ "types": "dist/types/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
- "import": "./dist/esm/index.js",
13
- "require": "./dist/cjs/index.js"
12
+ "types": "./dist/types/index.d.ts",
13
+ "import": "./dist/esm/index.mjs",
14
+ "require": "./dist/cjs/index.cjs"
14
15
  }
15
16
  },
17
+ "sideEffects": false,
18
+ "engines": {
19
+ "node": ">=12.20.0",
20
+ "npm": ">=6.14.0"
21
+ },
16
22
  "scripts": {
17
23
  "build": "npm run build:ecu && npm run build:docs-class",
18
- "build:esm": "rm -rf dist/esm && tsc -p tsconfig-esm.json",
19
- "build:cjs": "rm -rf dist/cjs && tsc -p tsconfig-cjs.json",
24
+ "build:node": "tsup --config tsup.node.config.js",
25
+ "build:types": "rm -rf dist/types && tsc -p tsconfig.types.json",
20
26
  "build:umd": "tsup",
21
- "build:ecu": "npm run build:esm && npm run build:cjs && npm run build:umd",
27
+ "build:ecu": "npm run build:node && npm run build:types && npm run build:umd",
22
28
  "build:docs": "npm run gen:examples && typedoc --out docs ./src",
23
29
  "build:docs-class": "npm run gen:examples && typedoc --out docs ./src/data-structures",
24
- "gen:examples": "ts-node scripts/testToExample.ts",
30
+ "gen:examples": "ts-node scripts/test-to-example.ts",
25
31
  "test:in-band": "jest --runInBand",
26
32
  "test": "npm run test:in-band",
27
- "test:integration": "npm run update:subs && jest --config jest.integration.config.js && tsc test/integration/compile.ts && node test/integration/compile.mjs",
28
- "test:perf": "npm run build:cjs && npm run build:esm && ts-node test/performance/benchmark-runner.ts --isolate --gc --cooldown-ms=80",
33
+ "test:integration": "npm run update:subs && jest --config jest.integration.config.js && tsc test/integration/compile.test.ts && node test/integration/compile.mjs",
34
+ "test:perf": "npm run build:ecu && ts-node test/performance/benchmark-runner.ts --isolate --gc --cooldown-ms=80",
29
35
  "check": "tsc --noEmit",
30
36
  "check:circular-refs": "dependency-cruiser src",
31
37
  "lint:src": "eslint --fix 'src/**/*.{js,ts}'",
@@ -75,7 +81,7 @@
75
81
  "benchmark": "^2.1.4",
76
82
  "binary-tree-typed": "^1.54.3",
77
83
  "bst-typed": "^1.54.3",
78
- "data-structure-typed": "^1.54.3",
84
+ "data-structure-typed": "^2.1.1",
79
85
  "dependency-cruiser": "^16.5.0",
80
86
  "doctoc": "^2.2.1",
81
87
  "eslint": "^9.13.0",
@@ -92,7 +98,7 @@
92
98
  "ts-jest": "^29.2.5",
93
99
  "ts-loader": "^9.5.1",
94
100
  "ts-node": "^10.9.2",
95
- "tsup": "^8.3.5",
101
+ "tsup": "^8.5.1",
96
102
  "typedoc": "^0.26.10",
97
103
  "typescript": "^5.6.3"
98
104
  },
@@ -95,10 +95,7 @@ export class AVLTreeCounterNode<K = any, V = any> extends AVLTreeNode<K, V> {
95
95
  * @template V
96
96
  * @template R
97
97
  */
98
- export class AVLTreeCounter<K = any, V = any, R extends object = object>
99
- extends AVLTree<K, V, R>
100
- implements IBinaryTree<K, V, R>
101
- {
98
+ export class AVLTreeCounter<K = any, V = any, R = any> extends AVLTree<K, V, R> implements IBinaryTree<K, V, R> {
102
99
  /**
103
100
  * Create a AVLTreeCounter instance
104
101
  * @remarks Time O(n), Space O(n)
@@ -133,7 +130,7 @@ export class AVLTreeCounter<K = any, V = any, R extends object = object>
133
130
  return sum;
134
131
  }
135
132
 
136
- override _createNode(key: K, value?: V, count?: number): AVLTreeCounterNode<K, V> {
133
+ override createNode(key: K, value?: V, count?: number): AVLTreeCounterNode<K, V> {
137
134
  return new AVLTreeCounterNode(key, this._isMapMode ? undefined : value, count) as AVLTreeCounterNode<K, V>;
138
135
  }
139
136
 
@@ -314,7 +311,7 @@ export class AVLTreeCounter<K = any, V = any, R extends object = object>
314
311
  * @param [thisArg] - Value for `this` inside the callback.
315
312
  * @returns A new AVLTreeCounter with mapped entries.
316
313
  */
317
- override map<MK = K, MV = V, MR extends object = object>(
314
+ override map<MK = K, MV = V, MR = any>(
318
315
  callback: EntryCallback<K, V | undefined, [MK, MV]>,
319
316
  options?: Partial<BinaryTreeOptions<MK, MV, MR>>,
320
317
  thisArg?: unknown
@@ -337,7 +334,7 @@ export class AVLTreeCounter<K = any, V = any, R extends object = object>
337
334
  * @param [options] - Optional constructor options for the like-kind instance.
338
335
  * @returns An empty like-kind instance.
339
336
  */
340
- protected override _createInstance<TK = K, TV = V, TR extends object = R>(
337
+ protected override _createInstance<TK = K, TV = V, TR = R>(
341
338
  options?: Partial<AVLTreeCounterOptions<TK, TV, TR>>
342
339
  ): this {
343
340
  const Ctor = this.constructor as unknown as new (
@@ -359,7 +356,7 @@ export class AVLTreeCounter<K = any, V = any, R extends object = object>
359
356
  * @param [options] - Options merged with the current snapshot.
360
357
  * @returns A like-kind AVLTreeCounter built from the iterable.
361
358
  */
362
- protected override _createLike<TK = K, TV = V, TR extends object = R>(
359
+ protected override _createLike<TK = K, TV = V, TR = R>(
363
360
  iter: Iterable<
364
361
  TK | AVLTreeCounterNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR
365
362
  > = [],
@@ -394,10 +391,10 @@ export class AVLTreeCounter<K = any, V = any, R extends object = object>
394
391
  const [key, entryValue] = keyNodeOrEntry;
395
392
  if (key === undefined || key === null) return [undefined, undefined];
396
393
  const finalValue = value ?? entryValue;
397
- return [this._createNode(key, finalValue, count), finalValue];
394
+ return [this.createNode(key, finalValue, count), finalValue];
398
395
  }
399
396
 
400
- return [this._createNode(keyNodeOrEntry, value, count), value];
397
+ return [this.createNode(keyNodeOrEntry, value, count), value];
401
398
  }
402
399
 
403
400
  /**
@@ -415,7 +412,7 @@ export class AVLTreeCounter<K = any, V = any, R extends object = object>
415
412
  destNode = this.ensureNode(destNode);
416
413
  if (srcNode && destNode) {
417
414
  const { key, value, count, height } = destNode;
418
- const tempNode = this._createNode(key, value, count);
415
+ const tempNode = this.createNode(key, value, count);
419
416
  if (tempNode) {
420
417
  tempNode.height = height;
421
418
 
@@ -93,10 +93,7 @@ export class AVLTreeMultiMapNode<K = any, V = any> extends AVLTreeNode<K, V[]> {
93
93
  * @template V
94
94
  * @template R
95
95
  */
96
- export class AVLTreeMultiMap<K = any, V = any, R extends object = object>
97
- extends AVLTree<K, V[], R>
98
- implements IBinaryTree<K, V[], R>
99
- {
96
+ export class AVLTreeMultiMap<K = any, V = any, R = any> extends AVLTree<K, V[], R> implements IBinaryTree<K, V[], R> {
100
97
  /**
101
98
  * Create an AVLTreeMultiMap and optionally bulk-insert items.
102
99
  * @remarks Time O(N log N), Space O(N)
@@ -116,7 +113,7 @@ export class AVLTreeMultiMap<K = any, V = any, R extends object = object>
116
113
  }
117
114
  }
118
115
 
119
- override _createNode(key: K, value: V[] = []): AVLTreeMultiMapNode<K, V> {
116
+ override createNode(key: K, value: V[] = []): AVLTreeMultiMapNode<K, V> {
120
117
  return new AVLTreeMultiMapNode<K, V>(key, this._isMapMode ? [] : value);
121
118
  }
122
119
 
@@ -251,7 +248,7 @@ export class AVLTreeMultiMap<K = any, V = any, R extends object = object>
251
248
  * @param [thisArg] - Value for `this` inside the callback.
252
249
  * @returns A new AVLTreeMultiMap when mapping to array values; see overloads.
253
250
  */
254
- override map<MK = K, MVArr extends unknown[] = V[], MR extends object = object>(
251
+ override map<MK = K, MVArr extends unknown[] = V[], MR = any>(
255
252
  callback: EntryCallback<K, V[] | undefined, [MK, MVArr]>,
256
253
  options?: Partial<AVLTreeOptions<MK, MVArr, MR>>,
257
254
  thisArg?: unknown
@@ -268,7 +265,7 @@ export class AVLTreeMultiMap<K = any, V = any, R extends object = object>
268
265
  * @param [thisArg] - Value for `this` inside the callback.
269
266
  * @returns A new AVLTree when mapping to non-array values; see overloads.
270
267
  */
271
- override map<MK = K, MV = V[], MR extends object = object>(
268
+ override map<MK = K, MV = V[], MR = any>(
272
269
  callback: EntryCallback<K, V[] | undefined, [MK, MV]>,
273
270
  options?: Partial<AVLTreeOptions<MK, MV, MR>>,
274
271
  thisArg?: unknown
@@ -305,9 +302,7 @@ export class AVLTreeMultiMap<K = any, V = any, R extends object = object>
305
302
  * @param [options] - Optional constructor options for the like-kind instance.
306
303
  * @returns An empty like-kind instance.
307
304
  */
308
- protected override _createInstance<TK = K, TV = V, TR extends object = R>(
309
- options?: Partial<AVLTreeOptions<TK, TV, TR>>
310
- ): this {
305
+ protected override _createInstance<TK = K, TV = V, TR = R>(options?: Partial<AVLTreeOptions<TK, TV, TR>>): this {
311
306
  const Ctor = this.constructor as unknown as new (
312
307
  iter?: Iterable<TK | AVLTreeNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
313
308
  opts?: AVLTreeOptions<TK, TV, TR>
@@ -325,7 +320,7 @@ export class AVLTreeMultiMap<K = any, V = any, R extends object = object>
325
320
  * @param [options] - Options merged with the current snapshot.
326
321
  * @returns A like-kind AVLTree built from the iterable.
327
322
  */
328
- protected override _createLike<TK = K, TV = V, TR extends object = R>(
323
+ protected override _createLike<TK = K, TV = V, TR = R>(
329
324
  iter: Iterable<TK | AVLTreeNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR> = [],
330
325
  options?: Partial<AVLTreeOptions<TK, TV, TR>>
331
326
  ): AVLTree<TK, TV, TR> {
@@ -169,7 +169,7 @@ export class AVLTreeNode<K = any, V = any> extends BSTNode<K, V> {
169
169
  * // { minute: 15, temperature: 58.6 }
170
170
  * // ]
171
171
  */
172
- export class AVLTree<K = any, V = any, R extends object = object> extends BST<K, V, R> implements IBinaryTree<K, V, R> {
172
+ export class AVLTree<K = any, V = any, R = any> extends BST<K, V, R> implements IBinaryTree<K, V, R> {
173
173
  /**
174
174
  * Creates an instance of AVLTree.
175
175
  * @remarks Time O(N log N) (from `addMany` with balanced add). Space O(N).
@@ -196,7 +196,7 @@ export class AVLTree<K = any, V = any, R extends object = object> extends BST<K,
196
196
  * @param [value] - The value for the new node.
197
197
  * @returns The newly created AVLTreeNode.
198
198
  */
199
- override _createNode(key: K, value?: V): AVLTreeNode<K, V> {
199
+ override createNode(key: K, value?: V): AVLTreeNode<K, V> {
200
200
  return new AVLTreeNode<K, V>(key, this._isMapMode ? undefined : value) as AVLTreeNode<K, V>;
201
201
  }
202
202
 
@@ -301,7 +301,7 @@ export class AVLTree<K = any, V = any, R extends object = object> extends BST<K,
301
301
  * @param [thisArg] - `this` context for the callback.
302
302
  * @returns A new, mapped AVLTree.
303
303
  */
304
- override map<MK = K, MV = V, MR extends object = object>(
304
+ override map<MK = K, MV = V, MR = any>(
305
305
  callback: EntryCallback<K, V | undefined, [MK, MV]>,
306
306
  options?: Partial<BinaryTreeOptions<MK, MV, MR>>,
307
307
  thisArg?: unknown
@@ -325,9 +325,7 @@ export class AVLTree<K = any, V = any, R extends object = object> extends BST<K,
325
325
  * @param [options] - Options for the new tree.
326
326
  * @returns A new, empty tree.
327
327
  */
328
- protected override _createInstance<TK = K, TV = V, TR extends object = R>(
329
- options?: Partial<BSTOptions<TK, TV, TR>>
330
- ): this {
328
+ protected override _createInstance<TK = K, TV = V, TR = R>(options?: Partial<BSTOptions<TK, TV, TR>>): this {
331
329
  const Ctor = this.constructor as unknown as new (
332
330
  iter?: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
333
331
  opts?: BSTOptions<TK, TV, TR>
@@ -344,7 +342,7 @@ export class AVLTree<K = any, V = any, R extends object = object> extends BST<K,
344
342
  * @param [options] - Options for the new tree.
345
343
  * @returns A new AVLTree.
346
344
  */
347
- protected override _createLike<TK = K, TV = V, TR extends object = R>(
345
+ protected override _createLike<TK = K, TV = V, TR = R>(
348
346
  iter: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR> = [],
349
347
  options?: Partial<BSTOptions<TK, TV, TR>>
350
348
  ): AVLTree<TK, TV, TR> {
@@ -372,7 +370,7 @@ export class AVLTree<K = any, V = any, R extends object = object> extends BST<K,
372
370
 
373
371
  if (srcNodeEnsured && destNodeEnsured) {
374
372
  const { key, value, height } = destNodeEnsured;
375
- const tempNode = this._createNode(key, value);
373
+ const tempNode = this.createNode(key, value);
376
374
 
377
375
  if (tempNode) {
378
376
  tempNode.height = height;
@@ -266,7 +266,7 @@ export class BinaryTreeNode<K = any, V = any> {
266
266
  *
267
267
  * console.log(evaluate(expressionTree.root)); // -27
268
268
  */
269
- export class BinaryTree<K = any, V = any, R extends object = object>
269
+ export class BinaryTree<K = any, V = any, R = any>
270
270
  extends IterableEntryBase<K, V | undefined>
271
271
  implements IBinaryTree<K, V, R>
272
272
  {
@@ -390,7 +390,7 @@ export class BinaryTree<K = any, V = any, R extends object = object>
390
390
  * @param [value] - The value for the new node (used if not in Map mode).
391
391
  * @returns The newly created node.
392
392
  */
393
- _createNode(key: K, value?: V): BinaryTreeNode<K, V> {
393
+ createNode(key: K, value?: V): BinaryTreeNode<K, V> {
394
394
  return new BinaryTreeNode<K, V>(key, this._isMapMode ? undefined : value);
395
395
  }
396
396
 
@@ -973,8 +973,8 @@ export class BinaryTree<K = any, V = any, R extends object = object>
973
973
  startNode: K | BinaryTreeNode<K, V> | [K | null | undefined, V | undefined] | null | undefined = this._root,
974
974
  iterationType: IterationType = this.iterationType
975
975
  ): boolean {
976
- startNode = this.ensureNode(startNode);
977
- if (!startNode) return true;
976
+ const startNodeSired = this.ensureNode(startNode);
977
+ if (!startNodeSired) return true;
978
978
 
979
979
  if (iterationType === 'RECURSIVE') {
980
980
  const dfs = (cur: BinaryTreeNode<K, V> | null | undefined, min: number, max: number): boolean => {
@@ -984,15 +984,15 @@ export class BinaryTree<K = any, V = any, R extends object = object>
984
984
  return dfs(cur.left, min, numKey) && dfs(cur.right, numKey, max);
985
985
  };
986
986
 
987
- const isStandardBST = dfs(startNode, Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
988
- const isInverseBST = dfs(startNode, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER); // Check for reverse BST
987
+ const isStandardBST = dfs(startNodeSired, Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
988
+ const isInverseBST = dfs(startNodeSired, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER); // Check for reverse BST
989
989
  return isStandardBST || isInverseBST;
990
990
  } else {
991
991
  // Iterative in-order traversal check
992
992
  const checkBST = (checkMax = false) => {
993
993
  const stack: BinaryTreeNode<K, V>[] = [];
994
994
  let prev = checkMax ? Number.MAX_SAFE_INTEGER : Number.MIN_SAFE_INTEGER;
995
- let curr: BinaryTreeNode<K, V> | null | undefined = startNode;
995
+ let curr: BinaryTreeNode<K, V> | null | undefined = startNodeSired;
996
996
  while (this.isRealNode(curr) || stack.length > 0) {
997
997
  while (this.isRealNode(curr)) {
998
998
  stack.push(curr);
@@ -1178,9 +1178,9 @@ export class BinaryTree<K = any, V = any, R extends object = object>
1178
1178
  iterationType: IterationType = this.iterationType
1179
1179
  ): ReturnType<C> {
1180
1180
  if (this.isNIL(startNode)) return callback(undefined);
1181
- startNode = this.ensureNode(startNode);
1181
+ const ensuredStartNode = this.ensureNode(startNode);
1182
1182
 
1183
- if (!this.isRealNode(startNode)) return callback(undefined);
1183
+ if (!this.isRealNode(ensuredStartNode)) return callback(undefined);
1184
1184
  if (iterationType === 'RECURSIVE') {
1185
1185
  const dfs = (cur: BinaryTreeNode<K, V>): BinaryTreeNode<K, V> => {
1186
1186
  const { left } = cur;
@@ -1188,7 +1188,7 @@ export class BinaryTree<K = any, V = any, R extends object = object>
1188
1188
  return dfs(left);
1189
1189
  };
1190
1190
 
1191
- return callback(dfs(startNode));
1191
+ return callback(dfs(ensuredStartNode));
1192
1192
  } else {
1193
1193
  // Iterative (trampolined to prevent stack overflow, though 'ITERATIVE' usually means a loop)
1194
1194
  const dfs = makeTrampoline((cur: BinaryTreeNode<K, V>): Trampoline<BinaryTreeNode<K, V>> => {
@@ -1197,7 +1197,7 @@ export class BinaryTree<K = any, V = any, R extends object = object>
1197
1197
  return makeTrampolineThunk(() => dfs(left));
1198
1198
  });
1199
1199
 
1200
- return callback(dfs(startNode));
1200
+ return callback(dfs(ensuredStartNode));
1201
1201
  }
1202
1202
  }
1203
1203
 
@@ -1689,7 +1689,7 @@ export class BinaryTree<K = any, V = any, R extends object = object>
1689
1689
  * @param [thisArg] - `this` context for the callback.
1690
1690
  * @returns A new, mapped tree.
1691
1691
  */
1692
- map<MK = K, MV = V, MR extends object = object>(
1692
+ map<MK = K, MV = V, MR = any>(
1693
1693
  cb: EntryCallback<K, V | undefined, [MK, MV]>,
1694
1694
  options?: Partial<BinaryTreeOptions<MK, MV, MR>>,
1695
1695
  thisArg?: unknown
@@ -1948,7 +1948,7 @@ export class BinaryTree<K = any, V = any, R extends object = object>
1948
1948
  * @template TK, TV, TR - Generic types for the options.
1949
1949
  * @returns The options object.
1950
1950
  */
1951
- protected _snapshotOptions<TK = K, TV = V, TR extends object = R>(): BinaryTreeOptions<TK, TV, TR> {
1951
+ protected _snapshotOptions<TK = K, TV = V, TR = R>(): BinaryTreeOptions<TK, TV, TR> {
1952
1952
  return {
1953
1953
  iterationType: this.iterationType,
1954
1954
  toEntryFn: this.toEntryFn as unknown as BinaryTreeOptions<TK, TV, TR>['toEntryFn'],
@@ -1965,9 +1965,7 @@ export class BinaryTree<K = any, V = any, R extends object = object>
1965
1965
  * @param [options] - Options for the new tree.
1966
1966
  * @returns A new, empty tree.
1967
1967
  */
1968
- protected _createInstance<TK = K, TV = V, TR extends object = R>(
1969
- options?: Partial<BinaryTreeOptions<TK, TV, TR>>
1970
- ): this {
1968
+ protected _createInstance<TK = K, TV = V, TR = R>(options?: Partial<BinaryTreeOptions<TK, TV, TR>>): this {
1971
1969
  const Ctor = this.constructor as unknown as new (
1972
1970
  iter?: Iterable<TK | BinaryTreeNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
1973
1971
  opts?: BinaryTreeOptions<TK, TV, TR>
@@ -1984,7 +1982,7 @@ export class BinaryTree<K = any, V = any, R extends object = object>
1984
1982
  * @param [options] - Options for the new tree.
1985
1983
  * @returns A new tree.
1986
1984
  */
1987
- protected _createLike<TK = K, TV = V, TR extends object = R>(
1985
+ protected _createLike<TK = K, TV = V, TR = R>(
1988
1986
  iter: Iterable<TK | BinaryTreeNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR> = [],
1989
1987
  options?: Partial<BinaryTreeOptions<TK, TV, TR>>
1990
1988
  ): BinaryTree<TK, TV, TR> {
@@ -2021,10 +2019,10 @@ export class BinaryTree<K = any, V = any, R extends object = object>
2021
2019
  if (key === undefined) return [undefined, undefined];
2022
2020
  else if (key === null) return [null, undefined];
2023
2021
  const finalValue = value ?? entryValue;
2024
- return [this._createNode(key, finalValue), finalValue];
2022
+ return [this.createNode(key, finalValue), finalValue];
2025
2023
  }
2026
2024
 
2027
- return [this._createNode(keyNodeOrEntry, value), value];
2025
+ return [this.createNode(keyNodeOrEntry, value), value];
2028
2026
  }
2029
2027
 
2030
2028
  /**
@@ -2149,7 +2147,7 @@ export class BinaryTree<K = any, V = any, R extends object = object>
2149
2147
 
2150
2148
  if (srcNode && destNode) {
2151
2149
  const { key, value } = destNode;
2152
- const tempNode = this._createNode(key, value); // Use a temp node to hold dest properties
2150
+ const tempNode = this.createNode(key, value); // Use a temp node to hold dest properties
2153
2151
 
2154
2152
  if (tempNode) {
2155
2153
  // Copy src to dest
@@ -165,10 +165,7 @@ export class BSTNode<K = any, V = any> extends BinaryTreeNode<K, V> {
165
165
  * console.log(findLCA(5, 35)); // 15
166
166
  * console.log(findLCA(20, 30)); // 25
167
167
  */
168
- export class BST<K = any, V = any, R extends object = object>
169
- extends BinaryTree<K, V, R>
170
- implements IBinaryTree<K, V, R>
171
- {
168
+ export class BST<K = any, V = any, R = any> extends BinaryTree<K, V, R> implements IBinaryTree<K, V, R> {
172
169
  /**
173
170
  * Creates an instance of BST.
174
171
  * @remarks Time O(N log N) or O(N^2) depending on `isBalanceAdd` in `addMany` and input order. Space O(N).
@@ -271,7 +268,7 @@ export class BST<K = any, V = any, R extends object = object>
271
268
  * @param [value] - The value for the new node (used if not in Map mode).
272
269
  * @returns The newly created BSTNode.
273
270
  */
274
- override _createNode(key: K, value?: V): BSTNode<K, V> {
271
+ override createNode(key: K, value?: V): BSTNode<K, V> {
275
272
  return new BSTNode<K, V>(key, this._isMapMode ? undefined : value);
276
273
  }
277
274
 
@@ -811,7 +808,7 @@ export class BST<K = any, V = any, R extends object = object>
811
808
  * @param [thisArg] - `this` context for the callback.
812
809
  * @returns A new, mapped BST.
813
810
  */
814
- override map<MK = K, MV = V, MR extends object = object>(
811
+ override map<MK = K, MV = V, MR = any>(
815
812
  callback: EntryCallback<K, V | undefined, [MK, MV]>,
816
813
  options?: Partial<BinaryTreeOptions<MK, MV, MR>>,
817
814
  thisArg?: unknown
@@ -864,9 +861,7 @@ export class BST<K = any, V = any, R extends object = object>
864
861
  * @param [options] - Options for the new BST.
865
862
  * @returns A new, empty BST.
866
863
  */
867
- protected override _createInstance<TK = K, TV = V, TR extends object = R>(
868
- options?: Partial<BSTOptions<TK, TV, TR>>
869
- ): this {
864
+ protected override _createInstance<TK = K, TV = V, TR = R>(options?: Partial<BSTOptions<TK, TV, TR>>): this {
870
865
  const Ctor = this.constructor as unknown as new (
871
866
  iter?: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
872
867
  opts?: BSTOptions<TK, TV, TR>
@@ -883,7 +878,7 @@ export class BST<K = any, V = any, R extends object = object>
883
878
  * @param [options] - Options for the new BST.
884
879
  * @returns A new BST.
885
880
  */
886
- protected override _createLike<TK = K, TV = V, TR extends object = R>(
881
+ protected override _createLike<TK = K, TV = V, TR = R>(
887
882
  iter: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR> = [],
888
883
  options?: Partial<BSTOptions<TK, TV, TR>>
889
884
  ): BST<TK, TV, TR> {
@@ -901,7 +896,7 @@ export class BST<K = any, V = any, R extends object = object>
901
896
  * @template TK, TV, TR - Generic types for the options.
902
897
  * @returns The options object.
903
898
  */
904
- protected override _snapshotOptions<TK = K, TV = V, TR extends object = R>(): BSTOptions<TK, TV, TR> {
899
+ protected override _snapshotOptions<TK = K, TV = V, TR = R>(): BSTOptions<TK, TV, TR> {
905
900
  return {
906
901
  ...super._snapshotOptions<TK, TV, TR>(),
907
902
  specifyComparable: this.specifyComparable as BSTOptions<TK, TV, TR>['specifyComparable'],
@@ -89,7 +89,7 @@ export class RedBlackTreeNode<K = any, V = any> extends BSTNode<K, V> {
89
89
  }
90
90
 
91
91
  /**
92
- * RRRed-Black Tree (self-balancing BST) supporting map-like mode and stable O(log n) updates.
92
+ * Represents a Red-Black Tree (self-balancing BST) supporting map-like mode and stable O(log n) updates.
93
93
  * @remarks Time O(1), Space O(1)
94
94
  * @template K
95
95
  * @template V
@@ -141,10 +141,7 @@ export class RedBlackTreeNode<K = any, V = any> extends BSTNode<K, V> {
141
141
  * console.log(stocksInRange); // ['GOOGL', 'META', 'MSFT']
142
142
  */
143
143
 
144
- export class RedBlackTree<K = any, V = any, R extends object = object>
145
- extends BST<K, V, R>
146
- implements IBinaryTree<K, V, R>
147
- {
144
+ export class RedBlackTree<K = any, V = any, R = any> extends BST<K, V, R> implements IBinaryTree<K, V, R> {
148
145
  constructor(
149
146
  keysNodesEntriesOrRaws: Iterable<
150
147
  K | RedBlackTreeNode<K, V> | [K | null | undefined, V | undefined] | null | undefined | R
@@ -179,7 +176,7 @@ export class RedBlackTree<K = any, V = any, R extends object = object>
179
176
  * @param color - See parameter type for details.
180
177
  * @returns A new RedBlackTreeNode instance.
181
178
  */
182
- override _createNode(key: K, value?: V, color: RBTNColor = 'BLACK'): RedBlackTreeNode<K, V> {
179
+ override createNode(key: K, value?: V, color: RBTNColor = 'BLACK'): RedBlackTreeNode<K, V> {
183
180
  return new RedBlackTreeNode<K, V>(key, this._isMapMode ? undefined : value, color);
184
181
  }
185
182
 
@@ -324,7 +321,7 @@ export class RedBlackTree<K = any, V = any, R extends object = object>
324
321
  * @returns A new RedBlackTree with mapped entries.
325
322
  */
326
323
 
327
- override map<MK = K, MV = V, MR extends object = object>(
324
+ override map<MK = K, MV = V, MR = any>(
328
325
  callback: EntryCallback<K, V | undefined, [MK, MV]>,
329
326
  options?: Partial<BinaryTreeOptions<MK, MV, MR>>,
330
327
  thisArg?: unknown
@@ -338,9 +335,7 @@ export class RedBlackTree<K = any, V = any, R extends object = object>
338
335
  return out;
339
336
  }
340
337
 
341
- protected override _createInstance<TK = K, TV = V, TR extends object = R>(
342
- options?: Partial<RedBlackTreeOptions<TK, TV, TR>>
343
- ): this {
338
+ protected override _createInstance<TK = K, TV = V, TR = R>(options?: Partial<RedBlackTreeOptions<TK, TV, TR>>): this {
344
339
  const Ctor = this.constructor as unknown as new (
345
340
  iter?: Iterable<TK | RedBlackTreeNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
346
341
  opts?: RedBlackTreeOptions<TK, TV, TR>
@@ -348,7 +343,7 @@ export class RedBlackTree<K = any, V = any, R extends object = object>
348
343
  return new Ctor([], { ...this._snapshotOptions<TK, TV, TR>(), ...(options ?? {}) }) as unknown as this;
349
344
  }
350
345
 
351
- protected override _createLike<TK = K, TV = V, TR extends object = R>(
346
+ protected override _createLike<TK = K, TV = V, TR = R>(
352
347
  iter: Iterable<
353
348
  TK | RedBlackTreeNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR
354
349
  > = [],
@@ -100,10 +100,7 @@ export class TreeCounterNode<K = any, V = any> extends RedBlackTreeNode<K, V> {
100
100
  * @template V
101
101
  * @template R
102
102
  */
103
- export class TreeCounter<K = any, V = any, R extends object = object>
104
- extends RedBlackTree<K, V, R>
105
- implements IBinaryTree<K, V, R>
106
- {
103
+ export class TreeCounter<K = any, V = any, R = any> extends RedBlackTree<K, V, R> implements IBinaryTree<K, V, R> {
107
104
  /**
108
105
  * Create a TreeCounter and optionally bulk-insert items.
109
106
  * @remarks Time O(N log N), Space O(N)
@@ -145,7 +142,7 @@ export class TreeCounter<K = any, V = any, R extends object = object>
145
142
  return sum;
146
143
  }
147
144
 
148
- override _createNode(key: K, value?: V, color: RBTNColor = 'BLACK', count?: number): TreeCounterNode<K, V> {
145
+ override createNode(key: K, value?: V, color: RBTNColor = 'BLACK', count?: number): TreeCounterNode<K, V> {
149
146
  return new TreeCounterNode(key, this._isMapMode ? undefined : value, count, color) as TreeCounterNode<K, V>;
150
147
  }
151
148
 
@@ -342,7 +339,7 @@ export class TreeCounter<K = any, V = any, R extends object = object>
342
339
  * @param [thisArg] - Value for `this` inside the callback.
343
340
  * @returns A new TreeCounter with mapped entries.
344
341
  */
345
- override map<MK = K, MV = V, MR extends object = object>(
342
+ override map<MK = K, MV = V, MR = any>(
346
343
  callback: EntryCallback<K, V | undefined, [MK, MV]>,
347
344
  options?: Partial<BinaryTreeOptions<MK, MV, MR>>,
348
345
  thisArg?: unknown
@@ -377,9 +374,7 @@ export class TreeCounter<K = any, V = any, R extends object = object>
377
374
  * @param [options] - Optional constructor options for the like-kind instance.
378
375
  * @returns An empty like-kind instance.
379
376
  */
380
- protected override _createInstance<TK = K, TV = V, TR extends object = R>(
381
- options?: Partial<BSTOptions<TK, TV, TR>>
382
- ): this {
377
+ protected override _createInstance<TK = K, TV = V, TR = R>(options?: Partial<BSTOptions<TK, TV, TR>>): this {
383
378
  const Ctor = this.constructor as unknown as new (
384
379
  iter?: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
385
380
  opts?: BSTOptions<TK, TV, TR>
@@ -397,7 +392,7 @@ export class TreeCounter<K = any, V = any, R extends object = object>
397
392
  * @param [options] - Options merged with the current snapshot.
398
393
  * @returns A like-kind TreeCounter built from the iterable.
399
394
  */
400
- protected override _createLike<TK = K, TV = V, TR extends object = R>(
395
+ protected override _createLike<TK = K, TV = V, TR = R>(
401
396
  iter: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR> = [],
402
397
  options?: Partial<BSTOptions<TK, TV, TR>>
403
398
  ): TreeCounter<TK, TV, TR> {
@@ -432,10 +427,10 @@ export class TreeCounter<K = any, V = any, R extends object = object>
432
427
  const [key, entryValue] = keyNodeOrEntry;
433
428
  if (key === undefined || key === null) return [undefined, undefined];
434
429
  const finalValue = value ?? entryValue;
435
- return [this._createNode(key, finalValue, 'BLACK', count), finalValue];
430
+ return [this.createNode(key, finalValue, 'BLACK', count), finalValue];
436
431
  }
437
432
 
438
- return [this._createNode(keyNodeOrEntry, value, 'BLACK', count), value];
433
+ return [this.createNode(keyNodeOrEntry, value, 'BLACK', count), value];
439
434
  }
440
435
 
441
436
  /**
@@ -453,7 +448,7 @@ export class TreeCounter<K = any, V = any, R extends object = object>
453
448
  destNode = this.ensureNode(destNode);
454
449
  if (srcNode && destNode) {
455
450
  const { key, value, count, color } = destNode;
456
- const tempNode = this._createNode(key, value, color, count);
451
+ const tempNode = this.createNode(key, value, color, count);
457
452
  if (tempNode) {
458
453
  tempNode.color = color;
459
454
 
@@ -250,10 +250,7 @@ export class TreeMultiMapNode<K = any, V = any> extends RedBlackTreeNode<K, V[]>
250
250
  * // ]
251
251
  * // ]
252
252
  */
253
- export class TreeMultiMap<K = any, V = any, R extends object = object>
254
- extends RedBlackTree<K, V[], R>
255
- implements IBinaryTree<K, V[], R>
256
- {
253
+ export class TreeMultiMap<K = any, V = any, R = any> extends RedBlackTree<K, V[], R> implements IBinaryTree<K, V[], R> {
257
254
  /**
258
255
  * Create a TreeMultiMap and optionally bulk-insert items.
259
256
  * @remarks Time O(N log N), Space O(N)
@@ -273,7 +270,7 @@ export class TreeMultiMap<K = any, V = any, R extends object = object>
273
270
  }
274
271
  }
275
272
 
276
- override _createNode(key: K, value: V[] = []): TreeMultiMapNode<K, V> {
273
+ override createNode(key: K, value: V[] = []): TreeMultiMapNode<K, V> {
277
274
  return new TreeMultiMapNode<K, V>(key, this._isMapMode ? [] : value);
278
275
  }
279
276
 
@@ -365,13 +362,13 @@ export class TreeMultiMap<K = any, V = any, R extends object = object>
365
362
  return false;
366
363
  }
367
364
 
368
- override map<MK = K, MVArr extends unknown[] = V[], MR extends object = object>(
365
+ override map<MK = K, MVArr extends unknown[] = V[], MR = any>(
369
366
  callback: EntryCallback<K, V[] | undefined, [MK, MVArr]>,
370
367
  options?: Partial<RedBlackTreeOptions<MK, MVArr, MR>>,
371
368
  thisArg?: unknown
372
369
  ): TreeMultiMap<MK, ElemOf<MVArr>, MR>;
373
370
 
374
- override map<MK = K, MV = V[], MR extends object = object>(
371
+ override map<MK = K, MV = V[], MR = any>(
375
372
  callback: EntryCallback<K, V[] | undefined, [MK, MV]>,
376
373
  options?: Partial<RedBlackTreeOptions<MK, MV, MR>>,
377
374
  thisArg?: unknown
@@ -408,9 +405,7 @@ export class TreeMultiMap<K = any, V = any, R extends object = object>
408
405
  * @param [options] - Optional constructor options for the like-kind instance.
409
406
  * @returns An empty like-kind instance.
410
407
  */
411
- protected override _createInstance<TK = K, TV = V, TR extends object = R>(
412
- options?: Partial<RedBlackTreeOptions<TK, TV, TR>>
413
- ): this {
408
+ protected override _createInstance<TK = K, TV = V, TR = R>(options?: Partial<RedBlackTreeOptions<TK, TV, TR>>): this {
414
409
  const Ctor = this.constructor as unknown as new (
415
410
  iter?: Iterable<TK | RedBlackTreeNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>,
416
411
  opts?: RedBlackTreeOptions<TK, TV, TR>
@@ -428,7 +423,7 @@ export class TreeMultiMap<K = any, V = any, R extends object = object>
428
423
  * @param [options] - Options merged with the current snapshot.
429
424
  * @returns A like-kind RedBlackTree built from the iterable.
430
425
  */
431
- protected override _createLike<TK = K, TV = V, TR extends object = R>(
426
+ protected override _createLike<TK = K, TV = V, TR = R>(
432
427
  iter: Iterable<
433
428
  TK | RedBlackTreeNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR
434
429
  > = [],