Skip to content

Commit d130e25

Browse files
committed
search.js: local variable extra is an array, annotate it as such.
1 parent 32ebe8e commit d130e25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,9 +2398,9 @@ class DocSearch {
23982398
continue;
23992399
}
24002400
if (!foundStopChar) {
2401-
let extra = "";
2401+
/** @type String[] */
2402+
let extra = [];
24022403
if (isLastElemGeneric(query.elems, parserState)) {
2403-
// @ts-expect-error
24042404
extra = [" after ", ">"];
24052405
} else if (prevIs(parserState, "\"")) {
24062406
throw ["Cannot have more than one element if you use quotes"];

0 commit comments

Comments
 (0)