Skip to content

Commit 5d28ce4

Browse files
committed
typecheck window.searchIndex
1 parent 6ba0ce4 commit 5d28ce4

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

src/librustdoc/html/static/js/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ function preLoadCss(cssUrl) {
409409
searchLoaded = true;
410410
// @ts-expect-error
411411
window.rr_ = data => {
412-
// @ts-expect-error
413412
window.searchIndex = data;
414413
};
415414
if (!window.StringdexOnload) {

src/librustdoc/html/static/js/rustdoc.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ declare global {
9393
pending_type_impls?: rustdoc.TypeImpls,
9494
rustdoc_add_line_numbers_to_examples?: function(),
9595
rustdoc_remove_line_numbers_from_examples?: function(),
96+
/** JSON-encoded raw search index */
97+
searchIndex: string,
9698
}
9799
interface HTMLElement {
98100
/** Used by the popover tooltip code. */

src/librustdoc/html/static/js/search.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5244,7 +5244,6 @@ if (typeof window !== "undefined") {
52445244
// search.index/root is loaded by main.js, so
52455245
// this script doesn't need to launch it, but
52465246
// must pick it up
5247-
// @ts-ignore
52485247
if (window.searchIndex) {
52495248
// @ts-ignore
52505249
window.rr_(window.searchIndex);

0 commit comments

Comments
 (0)