44
55/* eslint-disable */
66declare global {
7+ /** Search engine data used by main.js and search.js */
8+ declare var searchState : rustdoc . SearchState ;
79 /** Defined and documented in `storage.js` */
810 declare function nonnull ( x : T | null , msg : string | undefined ) ;
911 /** Defined and documented in `storage.js` */
@@ -17,8 +19,6 @@ declare global {
1719 RUSTDOC_TOOLTIP_HOVER_MS : number ;
1820 /** Used by the popover tooltip code. */
1921 RUSTDOC_TOOLTIP_HOVER_EXIT_MS : number ;
20- /** Search engine data used by main.js and search.js */
21- searchState : rustdoc . SearchState ;
2222 /** Global option, with a long list of "../"'s */
2323 rootPath : string | null ;
2424 /**
@@ -102,20 +102,22 @@ declare namespace rustdoc {
102102 currentTab : number ;
103103 focusedByTab : [ number | null , number | null , number | null ] ;
104104 clearInputTimeout : function ;
105- outputElement : function ( ) : HTMLElement | null ;
106- focus: function ( ) ;
107- defocus: function ( ) ;
108- showResults: function ( HTMLElement | null | undefined ) ;
109- removeQueryParameters: function ( ) ;
110- hideResults: function ( ) ;
111- getQueryStringParams: function ( ) : Object . < any , string > ;
105+ outputElement ( ) : HTMLElement | null ;
106+ focus ( ) ;
107+ defocus ( ) ;
108+ // note: an optional param is not the same as
109+ // a nullable/undef-able param.
110+ showResults ( elem ?: HTMLElement | null ) ;
111+ removeQueryParameters ( ) ;
112+ hideResults ( ) ;
113+ getQueryStringParams ( ) : Object . < any , string > ;
112114 origPlaceholder : string ;
113115 setup : function ( ) ;
114- setLoadingSearch: function ( ) ;
116+ setLoadingSearch ( ) ;
115117 descShards : Map < string , SearchDescShard [ ] > ;
116118 loadDesc : function ( { descShard : SearchDescShard , descIndex : number } ) : Promise < string | null > ;
117- loadedDescShard: function ( string , number , string ) ;
118- isDisplayed: function ( ) : boolean ,
119+ loadedDescShard ( string , number , string ) ;
120+ isDisplayed ( ) : boolean,
119121 }
120122
121123 interface SearchDescShard {
@@ -237,7 +239,7 @@ declare namespace rustdoc {
237239 query : ParsedQuery ,
238240 }
239241
240- type Results = Map < String , ResultObject > ;
242+ type Results = { max_dist ?: number } & Map < number , ResultObject >
241243
242244 /**
243245 * An annotated `Row`, used in the viewmodel.
0 commit comments