Skip to content

Commit 761c1c6

Browse files
committed
fix: #110
1 parent 5992ae5 commit 761c1c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/data-structures/binary-tree/binary-tree.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ export class BinaryTree<
515515
*
516516
* The function `delete` in TypeScript implements the deletion of a node in a binary tree and returns
517517
* the deleted node along with information for tree balancing.
518-
* @param {BTNKeyOrNodeOrEntry<K, V, NODE> | R | BTNPredicate<NODE>} keyOrNodeOrEntryOrRawOrPredicate
518+
* @param {BTNKeyOrNodeOrEntry<K, V, NODE> | R} keyOrNodeOrEntryOrRawOr
519519
* - The `delete` method you provided is used to delete a node from a binary tree based on the key,
520520
* node, entry, raw data, or a custom predicate. The method returns an array of
521521
* `BinaryTreeDeleteResult` objects containing information about the deleted node and whether
@@ -525,12 +525,12 @@ export class BinaryTree<
525525
* need to be balanced (`needBalanced`).
526526
*/
527527
delete(
528-
keyOrNodeOrEntryOrRawOrPredicate: BTNKeyOrNodeOrEntry<K, V, NODE> | R | BTNPredicate<NODE>
528+
keyOrNodeOrEntryOrRawOr: BTNKeyOrNodeOrEntry<K, V, NODE> | R
529529
): BinaryTreeDeleteResult<NODE>[] {
530530
const deletedResult: BinaryTreeDeleteResult<NODE>[] = [];
531531
if (!this._root) return deletedResult;
532532

533-
const curr = this.getNode(keyOrNodeOrEntryOrRawOrPredicate);
533+
const curr = this.getNode(keyOrNodeOrEntryOrRawOr);
534534
if (!curr) return deletedResult;
535535

536536
const parent: NODE | undefined = curr?.parent;

0 commit comments

Comments
 (0)