Skip to content

Commit

Permalink
fix: add jsdoc in tree.js, avoiding codesmells (nodejs#3476)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Aug 16, 2024
1 parent 6ee9ccd commit c593564
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/core/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class TstNode {
throw new TypeError('Unreachable')
}
let index = 0
/**
* @type {TstNode}
*/
let node = this
while (true) {
const code = key.charCodeAt(index)
Expand Down Expand Up @@ -87,6 +90,9 @@ class TstNode {
search (key) {
const keylength = key.length
let index = 0
/**
* @type {TstNode}
*/
let node = this
while (node !== null && index < keylength) {
let code = key[index]
Expand Down

0 comments on commit c593564

Please sign in to comment.