@@ -2520,7 +2520,11 @@ class DocSearch {
25202520 * @return {Promise<rustdoc.ResultsTable> }
25212521 */
25222522 async execQuery ( origParsedQuery , filterCrates , currentCrate ) {
2523- const results_others = new Map ( ) , results_in_args = new Map ( ) ,
2523+ /** @type {rustdoc.Results } */
2524+ const results_others = new Map ( ) ,
2525+ /** @type {rustdoc.Results } */
2526+ results_in_args = new Map ( ) ,
2527+ /** @type {rustdoc.Results } */
25242528 results_returned = new Map ( ) ;
25252529
25262530 /** @type {rustdoc.ParsedQuery<rustdoc.QueryElement> } */
@@ -4451,7 +4455,6 @@ class DocSearch {
44514455 return ;
44524456 }
44534457
4454- // @ts -expect-error
44554458 results . max_dist = Math . max ( results . max_dist || 0 , tfpDist ) ;
44564459 addIntoResults ( results , row . id . toString ( ) , pos , 0 , tfpDist , 0 , Number . MAX_VALUE ) ;
44574460 }
@@ -4560,29 +4563,23 @@ class DocSearch {
45604563 const returned = row . type && row . type . output
45614564 && checkIfInList ( row . type . output , elem , row . type . where_clause , null , 0 ) ;
45624565 if ( in_args ) {
4563- // @ts -expect-error
45644566 results_in_args . max_dist = Math . max (
4565- // @ts -expect-error
45664567 results_in_args . max_dist || 0 ,
45674568 tfpDist ,
45684569 ) ;
45694570 const maxDist = results_in_args . size < MAX_RESULTS ?
45704571 ( tfpDist + 1 ) :
4571- // @ts -expect-error
45724572 results_in_args . max_dist ;
45734573 // @ts -expect-error
45744574 addIntoResults ( results_in_args , row . id , i , - 1 , tfpDist , 0 , maxDist ) ;
45754575 }
45764576 if ( returned ) {
4577- // @ts -expect-error
45784577 results_returned . max_dist = Math . max (
4579- // @ts -expect-error
45804578 results_returned . max_dist || 0 ,
45814579 tfpDist ,
45824580 ) ;
45834581 const maxDist = results_returned . size < MAX_RESULTS ?
45844582 ( tfpDist + 1 ) :
4585- // @ts -expect-error
45864583 results_returned . max_dist ;
45874584 // @ts -expect-error
45884585 addIntoResults ( results_returned , row . id , i , - 1 , tfpDist , 0 , maxDist ) ;
0 commit comments