Skip to content

Add some JSDoc comments to rustdoc JS#92026

Merged
bors merged 1 commit intorust-lang:masterfrom
jsha:jsdoc-search
Dec 23, 2021
Merged

Add some JSDoc comments to rustdoc JS#92026
bors merged 1 commit intorust-lang:masterfrom
jsha:jsdoc-search

Conversation

@jsha
Copy link
Copy Markdown
Contributor

@jsha jsha commented Dec 17, 2021

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.

To try checking the annotations, run:

npm i -g google-closure-compiler
google-closure-compiler -W VERBOSE build/x86_64-unknown-linux-gnu/doc/{search-index1.59.0.js,crates1.59.0.js} src/librustdoc/html/static/js/{search.js,main.js,storage.js} --externs src/librustdoc/html/static/js/externs.js >/dev/null

You'll see some warnings that "String continuations are not recommended". I'm not addressing those right now.

Discussed on Zulip.

r? @GuillaumeGomez

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-ui Area: Rustdoc UI (generated HTML) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants