diff --git a/package.json b/package.json index c6f5dfe..41f6bdc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-structure-typed", - "version": "1.54.0", + "version": "1.54.1", "description": "Javascript Data Structure. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree(BST), AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack. Benchmark compared with C++ STL. API aligned with ES6 and Java.util. Usability is comparable to Python", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", diff --git a/src/data-structures/binary-tree/avl-tree-multi-map.ts b/src/data-structures/binary-tree/avl-tree-multi-map.ts index e76cee8..141594a 100644 --- a/src/data-structures/binary-tree/avl-tree-multi-map.ts +++ b/src/data-structures/binary-tree/avl-tree-multi-map.ts @@ -57,7 +57,7 @@ export class AVLTreeMultiMapNode extends AVLTreeNode { */ export class AVLTreeMultiMap extends AVLTree - implements IBinaryTree + implements IBinaryTree { /** * The constructor initializes an AVLTreeMultiMap with the provided keys, nodes, entries, or raw data diff --git a/src/data-structures/binary-tree/tree-multi-map.ts b/src/data-structures/binary-tree/tree-multi-map.ts index b0667af..215008b 100644 --- a/src/data-structures/binary-tree/tree-multi-map.ts +++ b/src/data-structures/binary-tree/tree-multi-map.ts @@ -63,7 +63,7 @@ export class TreeMultiMapNode extends RedBlackTreeNode */ export class TreeMultiMap extends RedBlackTree - implements IBinaryTree + implements IBinaryTree { /** * The constructor initializes an TreeMultiMap with the provided keys, nodes, entries, or raw data diff --git a/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts b/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts index 92a37a3..0fbe072 100644 --- a/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts +++ b/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts @@ -399,7 +399,7 @@ describe('AVLTreeMultiMap', () => { }); describe('AVLTreeMultiMap iterative methods test', () => { - let avlTmm: AVLTreeMultiMap; + let avlTmm: AVLTreeMultiMap; beforeEach(() => { avlTmm = new AVLTreeMultiMap(); avlTmm.add([1, ['a']]); @@ -435,7 +435,7 @@ describe('AVLTreeMultiMap iterative methods test', () => { }); it('map should return a new avlTmm with modified elements', () => { - const avlTmmMapped = avlTmm.map((key, value) => [(key * 2).toString(), value]); + const avlTmmMapped = avlTmm.map((key, value) => [(key * 2).toString(), value ? value :[]]); expect(avlTmmMapped.size).toBe(3); expect([...avlTmmMapped]).toEqual([ ['2', ['a']], diff --git a/test/unit/data-structures/binary-tree/tree-multi-map.test.ts b/test/unit/data-structures/binary-tree/tree-multi-map.test.ts index f3d86bc..9328e7a 100644 --- a/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +++ b/test/unit/data-structures/binary-tree/tree-multi-map.test.ts @@ -627,7 +627,7 @@ describe('TreeMultiMap 2', () => { }); describe('TreeMultiMap iterative methods test', () => { - let tmm: TreeMultiMap; + let tmm: TreeMultiMap; beforeEach(() => { tmm = new TreeMultiMap(); tmm.add([1, ['a']]); @@ -664,7 +664,7 @@ describe('TreeMultiMap 2', () => { }); it('map should return a new tmm with modified elements', () => { - const tmmMapped = tmm.map((key, value) => [(key * 2).toString(), value]); + const tmmMapped = tmm.map((key, value) => [(key * 2).toString(), value ? value :[]]); expect(tmmMapped.size).toBe(3); expect([...tmmMapped]).toEqual([ ['2', ['a']],