Skip to content

Commit 78b5d24

Browse files
authored
Unrolled build for rust-lang#138913
Rollup merge of rust-lang#138913 - lolbinarycat:rustdoc-js-less-expect-error-part4, r=notriddle Remove even more instances of @ts-expect-error from search.js r? `@notriddle`
2 parents 70dab5a + d487087 commit 78b5d24

File tree

4 files changed

+122
-83
lines changed

4 files changed

+122
-83
lines changed

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

+13-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
declare global {
77
/** Map from crate name to directory structure, for source view */
88
declare var srcIndex: Map<string, rustdoc.Dir>;
9-
/** Defined and documented in `main.js` */
9+
/** Defined and documented in `storage.js` */
1010
declare function nonnull(x: T|null, msg: string|undefined);
11+
/** Defined and documented in `storage.js` */
12+
declare function nonundef(x: T|undefined, msg: string|undefined);
1113
interface Window {
1214
/** Make the current theme easy to find */
1315
currentTheme: HTMLLinkElement|null;
@@ -255,12 +257,20 @@ declare namespace rustdoc {
255257
ty: number,
256258
type?: FunctionSearchType,
257259
paramNames?: string[],
258-
displayType: Promise<Array<Array<string>>>|null,
259-
displayTypeMappedNames: Promise<Array<[string, Array<string>]>>|null,
260+
displayTypeSignature: Promise<rustdoc.DisplayTypeSignature> | null,
260261
item: Row,
261262
dontValidate?: boolean,
262263
}
263264

265+
/**
266+
* output of `formatDisplayTypeSignature`
267+
*/
268+
interface DisplayTypeSignature {
269+
type: Array<string>,
270+
mappedNames: Map<string, string>,
271+
whereClause: Map<string, Array<string>>,
272+
}
273+
264274
/**
265275
* A pair of [inputs, outputs], or 0 for null. This is stored in the search index.
266276
* The JavaScript deserializes this into FunctionSearchType.

0 commit comments

Comments
 (0)