about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/rustdoc.d.ts
AgeCommit message (Collapse)AuthorLines
2025-08-31rustdoc-search: skip loading unneeded fnDataMichael Howell-1/+1
2025-08-30rustdoc-search: split function inverted index by input/outputMichael Howell-1/+4
With a patch applied to count the number of unifications, and running the query `Option<T>, (T -> U) -> Option<U>` before: performed unifyFunctionType on 17484 functions after: performed unifyFunctionType on 3055 functions
2025-08-22typecheck window.CURRENT_TOOLTIP_ELEMENTbinarycat-0/+1
2025-08-21typecheck window.NOTABLE_TRAITSbinarycat-0/+2
2025-08-21typecheck window.rr_binarycat-0/+2
2025-08-21typecheck window.searchIndexbinarycat-0/+2
2025-08-20Rollup merge of #140314 - lolbinarycat:rustdoc-js-scrape-examples-typecheck, ↵Jacob Pratt-0/+9
r=notriddle Rustdoc: typecheck scrape-examples.js more typechecking progress, this time we're mostly held back by the fact that `document.querySelectorAll` can't return nice types if its given a compound query (see the issue linked in a code comment). Additionally, it seems like the generated `data-locs` attribute has fields that are never used by anything? r? ```@notriddle```
2025-08-15rustdoc-search: search backend with partitioned suffix treeMichael Howell-118/+134
2025-08-14Revert "rustdoc search: prefer stable items in search results"Guillaume Gomez-4/+1
This reverts commit 1140e90074b0cbcfdea8535e4b51877e2838227e.
2025-08-09Rollup merge of #141658 - lolbinarycat:rustdoc-search-stability-rank-138067, ↵Stuart Cook-0/+3
r=GuillaumeGomez rustdoc search: prefer stable items in search results fixes https://github.com/rust-lang/rust/issues/138067 this does add a new field to the search index, but since we're only listing unstable items instead of adding a boolean flag to every item, it should only increase the search index size of sysroot crates, since those are the only ones using the `staged_api` feature, at least as far as the rust project is concerned.
2025-07-19Add code comment explaining better what `Row.name` is for doc aliasesGuillaume Gomez-0/+2
2025-07-16Make aliases search support partial matchingGuillaume Gomez-0/+5
2025-07-03setup CI and tidy to use typos for spellchecking and fix few typosklensy-1/+1
2025-06-26rustdoc js: several typechecking improvmentsbinarycat-13/+15
non-exhaustive list of changes: * rustdoc.Results has a max_dist field * improve typechecking around pathDist and addIntoResults * give handleNameSearch a type signature * typecheck sortQ * currentCrate is string and not optional * searchState is referenced as a global, not through window
2025-06-16rustdoc: make srcIndex no longer a global variablebinarycat-4/+2
this is one-time initialization data, it can just be a function parameter. we also move the json parsing into createSrcSidebar to save a few bytes.
2025-06-10rustdoc search: prefer stable items in search resultsbinarycat-1/+4
fixes https://github.com/rust-lang/rust/issues/138067
2025-05-27scrape-examples.js: fix typoslolbinarycat-1/+1
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-05-21rustdoc js: add rustdoc.ScrapedLoc typebinarycat-0/+2
2025-05-21rustdoc js: add ScrapedLoc typebinarycat-0/+7
2025-04-02settings.js: make top-level code typecheckbinarycat-0/+2
With this, almost the entire file is fully typechecked, the only exception being the Element.contains(EventTarget) pattern that is used several times, those are annotated with @ts-expect-error
2025-04-02settings.js: add new rustdoc.Setting interfacebinarycat-0/+10
2025-04-02settings.js: begin typechecking migrationbinarycat-0/+2
this also makes `changeSetting` more robust in case it somehow gets called before `main.js` has finished loading.
2025-03-24search.js: refactor transformResultsbinarycat-2/+10
2025-03-24rustdoc js: add nonundef and use it to remove a ts-expect-errorbinarycat-1/+3
2025-03-14rustdoc js: add nonnull helper and typecheck src-script.jsbinarycat-0/+29
2025-03-10main.js: typecheck things related to window.register_type_implsbinarycat-2/+8
2025-03-10rustdoc.d.ts: add window.{register_implementors,pending_implementors}binarycat-0/+17
2025-03-10rustdoc.d.ts: window.SIDEBAR_ITEMS may exist.binarycat-0/+2
2025-03-04search.js: give RawSearchIndexCrate.a an index signaturebinarycat-1/+1
2025-03-04search.js: give buildIndex a proper return typebinarycat-1/+2
some of the fields of rustdoc.Row were confusing null and undefined.
2025-03-04ParserQueryElement.typeFilter MAY be a string, OR number.binarycat-1/+1
ideally we would encode that it is a string before convertTypeFilterOnElem is called, and a number after, but i'm not sure that's possible without significant refactoring.
2025-03-03rustdoc search: increase strictness of typecheckingbinarycat-2/+8
2025-02-03rustdoc: clean up a bunch of ts-expected-error declarations in mainMichael Howell-0/+22
This mostly consists of handling potentially-null input and adding more global functions to the list of globals.
2025-01-27rustdoc: add nobuild typescript checking to our JSMichael Howell-0/+387
By nobuild, I mean that the type annotations are all in comments, not in the "native" typescript syntax. This is a bit uglier, but it lets you rapid-prototype without tsc, works with all the native browser debugging tools, and keeps Node out of Rust's bootstrap chain. This pull request mostly just adds ts-ignore annotations and type declarations. To actually take good advantage of typescript, we'll want to "burn down" this pile of unsafe code until we eventually have a version with almost none of these. This PR also adds tsc to the mingw-check Dockerfile, so that it can't fall out of date like the Closure annotations did. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/typescript