data-structure-typed 2.5.1 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/MIGRATION.md +169 -0
  3. package/README.md +135 -23
  4. package/README_CN.md +551 -143
  5. package/SPECIFICATION.md +20 -14
  6. package/SPECIFICATION.zh-CN.md +20 -14
  7. package/dist/cjs/binary-tree.cjs +6460 -1591
  8. package/dist/cjs/graph.cjs +440 -20
  9. package/dist/cjs/hash.cjs +125 -22
  10. package/dist/cjs/heap.cjs +196 -47
  11. package/dist/cjs/index.cjs +8486 -2429
  12. package/dist/cjs/linked-list.cjs +456 -31
  13. package/dist/cjs/matrix.cjs +79 -9
  14. package/dist/cjs/priority-queue.cjs +193 -44
  15. package/dist/cjs/queue.cjs +391 -2
  16. package/dist/cjs/stack.cjs +92 -6
  17. package/dist/cjs/trie.cjs +122 -28
  18. package/dist/cjs-legacy/binary-tree.cjs +6484 -1612
  19. package/dist/cjs-legacy/graph.cjs +440 -20
  20. package/dist/cjs-legacy/hash.cjs +125 -22
  21. package/dist/cjs-legacy/heap.cjs +196 -47
  22. package/dist/cjs-legacy/index.cjs +8654 -2594
  23. package/dist/cjs-legacy/linked-list.cjs +456 -31
  24. package/dist/cjs-legacy/matrix.cjs +79 -9
  25. package/dist/cjs-legacy/priority-queue.cjs +193 -44
  26. package/dist/cjs-legacy/queue.cjs +391 -2
  27. package/dist/cjs-legacy/stack.cjs +92 -6
  28. package/dist/cjs-legacy/trie.cjs +122 -28
  29. package/dist/esm/binary-tree.mjs +6460 -1591
  30. package/dist/esm/graph.mjs +440 -20
  31. package/dist/esm/hash.mjs +125 -22
  32. package/dist/esm/heap.mjs +196 -47
  33. package/dist/esm/index.mjs +8486 -2430
  34. package/dist/esm/linked-list.mjs +456 -31
  35. package/dist/esm/matrix.mjs +79 -9
  36. package/dist/esm/priority-queue.mjs +193 -44
  37. package/dist/esm/queue.mjs +391 -2
  38. package/dist/esm/stack.mjs +92 -6
  39. package/dist/esm/trie.mjs +122 -28
  40. package/dist/esm-legacy/binary-tree.mjs +6484 -1612
  41. package/dist/esm-legacy/graph.mjs +440 -20
  42. package/dist/esm-legacy/hash.mjs +125 -22
  43. package/dist/esm-legacy/heap.mjs +196 -47
  44. package/dist/esm-legacy/index.mjs +8654 -2595
  45. package/dist/esm-legacy/linked-list.mjs +456 -31
  46. package/dist/esm-legacy/matrix.mjs +79 -9
  47. package/dist/esm-legacy/priority-queue.mjs +193 -44
  48. package/dist/esm-legacy/queue.mjs +391 -2
  49. package/dist/esm-legacy/stack.mjs +92 -6
  50. package/dist/esm-legacy/trie.mjs +122 -28
  51. package/dist/types/common/error.d.ts +9 -0
  52. package/dist/types/common/index.d.ts +1 -1
  53. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +98 -2
  54. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +112 -0
  55. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +214 -13
  56. package/dist/types/data-structures/binary-tree/bst.d.ts +294 -3
  57. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +155 -8
  58. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +48 -0
  59. package/dist/types/data-structures/binary-tree/tree-map.d.ts +1370 -323
  60. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +1329 -316
  61. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +1116 -295
  62. package/dist/types/data-structures/binary-tree/tree-set.d.ts +1330 -326
  63. package/dist/types/data-structures/graph/directed-graph.d.ts +80 -0
  64. package/dist/types/data-structures/graph/undirected-graph.d.ts +72 -0
  65. package/dist/types/data-structures/hash/hash-map.d.ts +95 -6
  66. package/dist/types/data-structures/heap/heap.d.ts +154 -12
  67. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +143 -0
  68. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +121 -1
  69. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +144 -0
  70. package/dist/types/data-structures/matrix/matrix.d.ts +64 -0
  71. package/dist/types/data-structures/queue/deque.d.ts +142 -0
  72. package/dist/types/data-structures/queue/queue.d.ts +109 -0
  73. package/dist/types/data-structures/stack/stack.d.ts +82 -2
  74. package/dist/types/data-structures/trie/trie.d.ts +96 -0
  75. package/dist/types/interfaces/binary-tree.d.ts +2 -3
  76. package/dist/types/types/data-structures/binary-tree/bst.d.ts +1 -0
  77. package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +5 -0
  78. package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +4 -0
  79. package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +4 -0
  80. package/dist/umd/data-structure-typed.js +8623 -2564
  81. package/dist/umd/data-structure-typed.min.js +5 -5
  82. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +696 -194
  83. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +11 -11
  84. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +71 -71
  85. package/docs-site-docusaurus/docs/api/classes/BST.md +639 -189
  86. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +13 -13
  87. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +15 -15
  88. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +148 -160
  89. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  90. package/docs-site-docusaurus/docs/api/classes/Deque.md +105 -91
  91. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +82 -82
  92. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +104 -74
  93. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +8 -8
  94. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +12 -12
  95. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  96. package/docs-site-docusaurus/docs/api/classes/HashMap.md +51 -51
  97. package/docs-site-docusaurus/docs/api/classes/Heap.md +96 -85
  98. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +25 -25
  99. package/docs-site-docusaurus/docs/api/classes/IterableEntryBase.md +33 -33
  100. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +50 -50
  101. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +55 -55
  102. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +55 -55
  103. package/docs-site-docusaurus/docs/api/classes/LinkedListNode.md +6 -6
  104. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +78 -78
  105. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +82 -82
  106. package/docs-site-docusaurus/docs/api/classes/Matrix.md +31 -31
  107. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +104 -89
  108. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +104 -89
  109. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +104 -89
  110. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +104 -89
  111. package/docs-site-docusaurus/docs/api/classes/Navigator.md +5 -5
  112. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +103 -88
  113. package/docs-site-docusaurus/docs/api/classes/Queue.md +112 -60
  114. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +708 -206
  115. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -10
  116. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +79 -79
  117. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +6 -6
  118. package/docs-site-docusaurus/docs/api/classes/SkipList.md +44 -44
  119. package/docs-site-docusaurus/docs/api/classes/Stack.md +42 -42
  120. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +236 -33
  121. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +162 -46
  122. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +232 -32
  123. package/docs-site-docusaurus/docs/api/classes/Trie.md +47 -47
  124. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  125. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +81 -81
  126. package/docs-site-docusaurus/docs/guide/architecture.md +75 -5
  127. package/docs-site-docusaurus/docs/guide/concepts.md +53 -3
  128. package/docs-site-docusaurus/docs/guide/faq.md +233 -0
  129. package/docs-site-docusaurus/docs/guide/guides.md +43 -58
  130. package/docs-site-docusaurus/docs/guide/installation.md +2 -0
  131. package/docs-site-docusaurus/docs/guide/integrations.md +75 -176
  132. package/docs-site-docusaurus/docs/guide/overview.md +132 -11
  133. package/docs-site-docusaurus/docs/guide/performance.md +2 -0
  134. package/docs-site-docusaurus/docs/guide/quick-start.md +31 -0
  135. package/docs-site-docusaurus/docs/guide/use-cases/_category_.json +6 -0
  136. package/docs-site-docusaurus/docs/guide/use-cases/array-sort-alternative.md +158 -0
  137. package/docs-site-docusaurus/docs/guide/use-cases/heap-vs-sorting.md +92 -0
  138. package/docs-site-docusaurus/docs/guide/use-cases/map-vs-treemap.md +151 -0
  139. package/docs-site-docusaurus/docs/guide/use-cases/priority-queue-typescript.md +113 -0
  140. package/docs-site-docusaurus/docs/guide/use-cases/treemap-javascript.md +151 -0
  141. package/docs-site-docusaurus/docusaurus.config.ts +1 -1
  142. package/docs-site-docusaurus/src/pages/index.tsx +55 -2
  143. package/docs-site-docusaurus/static/llms.txt +37 -0
  144. package/docs-site-docusaurus/typedoc.json +1 -0
  145. package/llms.txt +37 -0
  146. package/package.json +65 -56
  147. package/src/common/error.ts +19 -1
  148. package/src/common/index.ts +1 -1
  149. package/src/data-structures/base/iterable-element-base.ts +3 -2
  150. package/src/data-structures/binary-tree/avl-tree.ts +99 -5
  151. package/src/data-structures/binary-tree/binary-indexed-tree.ts +102 -4
  152. package/src/data-structures/binary-tree/binary-tree.ts +239 -78
  153. package/src/data-structures/binary-tree/bst.ts +542 -13
  154. package/src/data-structures/binary-tree/red-black-tree.ts +155 -15
  155. package/src/data-structures/binary-tree/segment-tree.ts +42 -0
  156. package/src/data-structures/binary-tree/tree-map.ts +1223 -261
  157. package/src/data-structures/binary-tree/tree-multi-map.ts +939 -30
  158. package/src/data-structures/binary-tree/tree-multi-set.ts +746 -10
  159. package/src/data-structures/binary-tree/tree-set.ts +1018 -99
  160. package/src/data-structures/graph/abstract-graph.ts +2 -2
  161. package/src/data-structures/graph/directed-graph.ts +71 -1
  162. package/src/data-structures/graph/undirected-graph.ts +64 -1
  163. package/src/data-structures/hash/hash-map.ts +102 -16
  164. package/src/data-structures/heap/heap.ts +153 -23
  165. package/src/data-structures/heap/max-heap.ts +2 -2
  166. package/src/data-structures/linked-list/doubly-linked-list.ts +139 -0
  167. package/src/data-structures/linked-list/singly-linked-list.ts +106 -1
  168. package/src/data-structures/linked-list/skip-linked-list.ts +131 -5
  169. package/src/data-structures/matrix/matrix.ts +65 -9
  170. package/src/data-structures/priority-queue/max-priority-queue.ts +2 -2
  171. package/src/data-structures/queue/deque.ts +130 -0
  172. package/src/data-structures/queue/queue.ts +109 -0
  173. package/src/data-structures/stack/stack.ts +75 -5
  174. package/src/data-structures/trie/trie.ts +86 -2
  175. package/src/interfaces/binary-tree.ts +1 -9
  176. package/src/types/data-structures/binary-tree/bst.ts +1 -0
  177. package/src/types/data-structures/binary-tree/tree-map.ts +6 -0
  178. package/src/types/data-structures/binary-tree/tree-multi-set.ts +5 -0
  179. package/src/types/data-structures/binary-tree/tree-set.ts +5 -0
  180. package/.vitepress/cache/deps_temp_51f5f1b0/chunk-7OIKW5WK.js +0 -12984
  181. package/.vitepress/cache/deps_temp_51f5f1b0/package.json +0 -3
  182. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vue_devtools-api.js +0 -4505
  183. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vueuse_core.js +0 -9731
  184. package/.vitepress/cache/deps_temp_51f5f1b0/vue.js +0 -347
@@ -176,6 +176,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
176
176
 
177
177
 
178
178
 
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
179
187
 
180
188
 
181
189
 
@@ -231,6 +239,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
231
239
 
232
240
 
233
241
 
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
234
250
 
235
251
 
236
252
 
@@ -288,6 +304,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
288
304
 
289
305
 
290
306
 
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
291
315
 
292
316
 
293
317
 
@@ -333,6 +357,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
333
357
 
334
358
 
335
359
 
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
336
368
 
337
369
 
338
370
 
@@ -377,6 +409,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
377
409
 
378
410
 
379
411
 
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
380
420
 
381
421
 
382
422
 
@@ -449,6 +489,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
449
489
 
450
490
 
451
491
 
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
452
500
 
453
501
 
454
502
 
@@ -503,6 +551,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
503
551
 
504
552
 
505
553
 
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
506
562
 
507
563
 
508
564
 
@@ -543,6 +599,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
543
599
 
544
600
 
545
601
 
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+
546
610
 
547
611
 
548
612
 
@@ -610,6 +674,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
610
674
 
611
675
 
612
676
 
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
613
685
 
614
686
 
615
687
 
@@ -673,6 +745,14 @@ export declare class DirectedGraph<V = any, E = any, VO extends DirectedVertex<V
673
745
 
674
746
 
675
747
 
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
676
756
 
677
757
 
678
758
 
@@ -193,6 +193,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
193
193
 
194
194
 
195
195
 
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
196
204
 
197
205
 
198
206
 
@@ -247,6 +255,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
247
255
 
248
256
 
249
257
 
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
250
266
 
251
267
 
252
268
 
@@ -309,6 +325,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
309
325
 
310
326
 
311
327
 
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
312
336
 
313
337
 
314
338
 
@@ -365,6 +389,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
365
389
 
366
390
 
367
391
 
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
368
400
 
369
401
 
370
402
 
@@ -407,6 +439,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
407
439
 
408
440
 
409
441
 
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
410
450
 
411
451
 
412
452
 
@@ -496,6 +536,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
496
536
 
497
537
 
498
538
 
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
499
547
 
500
548
 
501
549
 
@@ -553,6 +601,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
553
601
 
554
602
 
555
603
 
604
+
605
+
606
+
607
+
608
+
609
+
610
+
611
+
556
612
 
557
613
 
558
614
 
@@ -598,6 +654,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
598
654
 
599
655
 
600
656
 
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
601
665
 
602
666
 
603
667
 
@@ -642,6 +706,14 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
642
706
 
643
707
 
644
708
 
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
645
717
 
646
718
 
647
719
 
@@ -156,6 +156,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
156
156
 
157
157
 
158
158
 
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
159
167
 
160
168
 
161
169
 
@@ -195,6 +203,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
195
203
 
196
204
 
197
205
 
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
198
214
 
199
215
 
200
216
 
@@ -268,6 +284,22 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
268
284
 
269
285
 
270
286
 
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
271
303
 
272
304
 
273
305
 
@@ -304,7 +336,7 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
304
336
  * // Verify entries
305
337
  * console.log([...map.entries()]); // length: 4;
306
338
  */
307
- set(key: K, value: V): boolean;
339
+ set(key: K, value: V): this;
308
340
  /**
309
341
  * Insert many entries from an iterable.
310
342
  * @remarks Time O(N), Space O(N)
@@ -330,6 +362,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
330
362
 
331
363
 
332
364
 
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
333
373
 
334
374
 
335
375
 
@@ -373,6 +413,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
373
413
 
374
414
 
375
415
 
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
376
424
 
377
425
 
378
426
 
@@ -432,6 +480,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
432
480
 
433
481
 
434
482
 
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
435
491
 
436
492
 
437
493
 
@@ -476,6 +532,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
476
532
 
477
533
 
478
534
 
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
479
543
 
480
544
 
481
545
 
@@ -525,6 +589,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
525
589
 
526
590
 
527
591
 
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+
528
600
 
529
601
 
530
602
 
@@ -571,6 +643,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
571
643
 
572
644
 
573
645
 
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
574
654
 
575
655
 
576
656
 
@@ -617,6 +697,14 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
617
697
 
618
698
 
619
699
 
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
620
708
 
621
709
 
622
710
 
@@ -652,7 +740,7 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
652
740
  * console.log(values); // contains 3; // 'Bob', 'Eve'
653
741
  * console.log(values); // contains 7;
654
742
  */
655
- filter(predicate: EntryCallback<K, V, boolean>, thisArg?: unknown): any;
743
+ filter(predicate: EntryCallback<K, V, boolean>, thisArg?: unknown): this;
656
744
  /**
657
745
  * (Protected) Create a like-kind instance and seed it from an iterable.
658
746
  * @remarks Time O(N), Space O(N)
@@ -752,9 +840,9 @@ export declare class LinkedHashMap<K = any, V = any, R = [K, V]> extends Iterabl
752
840
  * @remarks Time O(1), Space O(1)
753
841
  * @param key - Key.
754
842
  * @param [value] - Value.
755
- * @returns True when the operation succeeds.
843
+ * @returns This map (for chaining).
756
844
  */
757
- set(key: K, value?: V): boolean;
845
+ set(key: K, value?: V): this;
758
846
  setMany(entryOrRawElements: Iterable<R | [K, V]>): boolean[];
759
847
  has(key: K): boolean;
760
848
  get(key: K): V | undefined;
@@ -777,9 +865,10 @@ export declare class LinkedHashMap<K = any, V = any, R = [K, V]> extends Iterabl
777
865
  * Delete the entry at a given index.
778
866
  * @remarks Time O(N), Space O(1)
779
867
  * @param index - Zero-based index.
780
- * @returns True if removed.
868
+ * @returns The removed entry [key, value].
869
+ * @throws {RangeError} If index is out of bounds.
781
870
  */
782
- deleteAt(index: number): boolean;
871
+ deleteAt(index: number): [K, V | undefined];
783
872
  isEmpty(): boolean;
784
873
  isEntry(rawElement: unknown): rawElement is [K, V];
785
874
  clear(): void;