From 761c1c6af4ab28e68dd4dc140838da353a5c988f Mon Sep 17 00:00:00 2001 From: Revone Date: Thu, 31 Oct 2024 13:20:00 +1300 Subject: [PATCH] fix: #110 --- src/data-structures/binary-tree/binary-tree.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data-structures/binary-tree/binary-tree.ts b/src/data-structures/binary-tree/binary-tree.ts index 12a7db0..2543a8a 100644 --- a/src/data-structures/binary-tree/binary-tree.ts +++ b/src/data-structures/binary-tree/binary-tree.ts @@ -515,7 +515,7 @@ export class BinaryTree< * * The function `delete` in TypeScript implements the deletion of a node in a binary tree and returns * the deleted node along with information for tree balancing. - * @param {BTNKeyOrNodeOrEntry | R | BTNPredicate} keyOrNodeOrEntryOrRawOrPredicate + * @param {BTNKeyOrNodeOrEntry | R} keyOrNodeOrEntryOrRawOr * - The `delete` method you provided is used to delete a node from a binary tree based on the key, * node, entry, raw data, or a custom predicate. The method returns an array of * `BinaryTreeDeleteResult` objects containing information about the deleted node and whether @@ -525,12 +525,12 @@ export class BinaryTree< * need to be balanced (`needBalanced`). */ delete( - keyOrNodeOrEntryOrRawOrPredicate: BTNKeyOrNodeOrEntry | R | BTNPredicate + keyOrNodeOrEntryOrRawOr: BTNKeyOrNodeOrEntry | R ): BinaryTreeDeleteResult[] { const deletedResult: BinaryTreeDeleteResult[] = []; if (!this._root) return deletedResult; - const curr = this.getNode(keyOrNodeOrEntryOrRawOrPredicate); + const curr = this.getNode(keyOrNodeOrEntryOrRawOr); if (!curr) return deletedResult; const parent: NODE | undefined = curr?.parent;