Add some JSDoc comments to rustdoc JS
This follows the Closure Compiler dialect of JSDoc, so we can use it to do some basic type checking. We don't plan to compile with Closure Compiler, just use it to check types. See https://github.com/google/closure-compiler/wiki/ for details.
This commit is contained in:
parent
e100ec5bc7
commit
7ba086c6db
5 changed files with 170 additions and 30 deletions
32
src/librustdoc/html/static/js/externs.js
Normal file
32
src/librustdoc/html/static/js/externs.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
// This file contains type definitions that are processed by the Closure Compiler but are
|
||||
// not put into the JavaScript we include as part of the documentation. It is used for
|
||||
// type checking. See README.md in this directory for more info.
|
||||
|
||||
/* eslint-disable */
|
||||
var searchState;
|
||||
function initSearch(searchIndex){}
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* raw: string,
|
||||
* query: string,
|
||||
* type: string,
|
||||
* id: string,
|
||||
* }}
|
||||
*/
|
||||
var ParsedQuery;
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* crate: string,
|
||||
* desc: string,
|
||||
* id: number,
|
||||
* name: string,
|
||||
* normalizedName: string,
|
||||
* parent: (Object|null|undefined),
|
||||
* path: string,
|
||||
* ty: (Number|null|number),
|
||||
* type: (Array<?>|null)
|
||||
* }}
|
||||
*/
|
||||
var Row;
|
Loading…
Add table
Add a link
Reference in a new issue