Skip to content

Commit c593564

Browse files
authored
fix: add jsdoc in tree.js, avoiding codesmells (#3476)
1 parent 6ee9ccd commit c593564

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/core/tree.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class TstNode {
4747
throw new TypeError('Unreachable')
4848
}
4949
let index = 0
50+
/**
51+
* @type {TstNode}
52+
*/
5053
let node = this
5154
while (true) {
5255
const code = key.charCodeAt(index)
@@ -87,6 +90,9 @@ class TstNode {
8790
search (key) {
8891
const keylength = key.length
8992
let index = 0
93+
/**
94+
* @type {TstNode}
95+
*/
9096
let node = this
9197
while (node !== null && index < keylength) {
9298
let code = key[index]

0 commit comments

Comments
 (0)