@@ -1310,10 +1310,9 @@ class NameTrie {
1310
1310
let sste ;
1311
1311
if ( substart >= 2 ) {
1312
1312
const tail = name . substring ( substart - 2 , substart + 1 ) ;
1313
- if ( tailTable . has ( tail ) ) {
1314
- // it's not undefined
1315
- // @ts -expect-error
1316
- sste = tailTable . get ( tail ) ;
1313
+ const entry = tailTable . get ( tail ) ;
1314
+ if ( entry !== undefined ) {
1315
+ sste = entry ;
1317
1316
} else {
1318
1317
sste = [ ] ;
1319
1318
tailTable . set ( tail , sste ) ;
@@ -1337,10 +1336,9 @@ class NameTrie {
1337
1336
new Lev1TParametricDescription ( name . length ) ;
1338
1337
this . searchLev ( name , 0 , levParams , results ) ;
1339
1338
const tail = name . substring ( 0 , 3 ) ;
1340
- if ( tailTable . has ( tail ) ) {
1341
- // it's not undefined
1342
- // @ts -expect-error
1343
- for ( const entry of tailTable . get ( tail ) ) {
1339
+ const list = tailTable . get ( tail ) ;
1340
+ if ( list !== undefined ) {
1341
+ for ( const entry of list ) {
1344
1342
entry . searchSubstringPrefix ( name , 3 , results ) ;
1345
1343
}
1346
1344
}
@@ -1599,10 +1597,8 @@ class DocSearch {
1599
1597
return null ;
1600
1598
}
1601
1599
1602
- if ( this . typeNameIdMap . has ( name ) ) {
1603
- /** @type {{id: number, assocOnly: boolean} } */
1604
- // @ts -expect-error
1605
- const obj = this . typeNameIdMap . get ( name ) ;
1600
+ const obj = this . typeNameIdMap . get ( name ) ;
1601
+ if ( obj !== undefined ) {
1606
1602
obj . assocOnly = ! ! ( isAssocType && obj . assocOnly ) ;
1607
1603
return obj . id ;
1608
1604
} else {
@@ -2145,7 +2141,6 @@ class DocSearch {
2145
2141
const name = elem [ 1 ] ;
2146
2142
let path = null ;
2147
2143
if ( elem . length > 2 && elem [ 2 ] !== null ) {
2148
- // @ts -expect-error
2149
2144
path = itemPaths . has ( elem [ 2 ] ) ? itemPaths . get ( elem [ 2 ] ) : lastPath ;
2150
2145
lastPath = path ;
2151
2146
}
0 commit comments