| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
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
|
|
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.
|
|
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
|
|
|
|
this also makes `changeSetting` more robust in case it somehow
gets called before `main.js` has finished loading.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
some of the fields of rustdoc.Row were confusing null and undefined.
|
|
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.
|
|
|
|
This mostly consists of handling potentially-null input and adding
more global functions to the list of globals.
|
|
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
|