Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/librustdoc/html/static/js/rustdoc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
declare global {
/** Map from crate name to directory structure, for source view */
declare var srcIndex: Map<string, rustdoc.Dir>;
/** Defined and documented in `main.js` */
/** Defined and documented in `storage.js` */
declare function nonnull(x: T|null, msg: string|undefined);
/** Defined and documented in `storage.js` */
declare function nonundef(x: T|undefined, msg: string|undefined);
interface Window {
/** Make the current theme easy to find */
currentTheme: HTMLLinkElement|null;
Expand Down Expand Up @@ -255,12 +257,20 @@ declare namespace rustdoc {
ty: number,
type?: FunctionSearchType,
paramNames?: string[],
displayType: Promise<Array<Array<string>>>|null,
displayTypeMappedNames: Promise<Array<[string, Array<string>]>>|null,
displayTypeSignature: Promise<rustdoc.DisplayTypeSignature> | null,
item: Row,
dontValidate?: boolean,
}

/**
* output of `formatDisplayTypeSignature`
*/
interface DisplayTypeSignature {
type: Array<string>,
mappedNames: Map<string, string>,
whereClause: Map<string, Array<string>>,
}

/**
* A pair of [inputs, outputs], or 0 for null. This is stored in the search index.
* The JavaScript deserializes this into FunctionSearchType.
Expand Down
Loading
Loading