For documentation to be accurate, it must correspond to the code that is written. This task encompasses the work to verify the JSDocs are in synchronization with the code they document. There are _many_ explorations for why type checking is useful, however, given the precedent set by Wikimedia's Phan usage and WMDE's full TypeScript usage for Termbox, this task takes no effort to enumerate them.
- Revise and add existing JSDoc typing as needed. Avoid ignoring errors but keep patches digestible.
- Add NPM test:types script and update test to invoke it. A bad type should block a Gerrit merge. (Edit: this ended up being a three letter command, tsc, which didn't seem worthy of adding an NPM script.)
No functional changes so no QA is necessary.
- Adding additional detail to JSDocs like descriptions for functions and their parameters is welcome but not required.
- Add type definitions where needed to avoid any usage.
- Consider adding WMDE to patch as they may have interest.