Skip to content

Commit 4b73a7e

Browse files
committed
typecheck window.rr_
1 parent 5d28ce4 commit 4b73a7e

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
@@ -407,7 +407,6 @@ function preLoadCss(cssUrl) {
407407
function loadSearch() {
408408
if (!searchLoaded) {
409409
searchLoaded = true;
410-
// @ts-expect-error
411410
window.rr_ = data => {
412411
window.searchIndex = data;
413412
};

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ declare global {
9595
rustdoc_remove_line_numbers_from_examples?: function(),
9696
/** JSON-encoded raw search index */
9797
searchIndex: string,
98+
/** Used in search index shards in order to load data into the in-memory database */
99+
rr_: function(string),
98100
}
99101
interface HTMLElement {
100102
/** 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
@@ -5245,7 +5245,6 @@ if (typeof window !== "undefined") {
52455245
// this script doesn't need to launch it, but
52465246
// must pick it up
52475247
if (window.searchIndex) {
5248-
// @ts-ignore
52495248
window.rr_(window.searchIndex);
52505249
}
52515250
},

0 commit comments

Comments
 (0)