I've got some simple browser-side JS code, and thought I'd try using @ts-check to pick out any fluff. Some valid bugs were found, and I've added js-doc parameter type information as well. I don't want a transpile step so this needs to be vanilla Javascript.
When I access DOM element properties I get errors, because TS doesn't know the real type of these elements.
s.YWindows = document.getElementById("rows-input").valueAsNumber
gives...
Property 'valueAsNumber' does not exist on type 'HTMLElement'
I thought I could use a JSDoc type hint to resolve that, but it only moves the problem.
/** @type {HTMLInputElement} */
let r = document.getElementById("rows-input")
s.YWindows = r.valueAsNumber
Type 'HTMLElement' is missing the following properties from type 'HTMLInputElement': accept, align, alt, autocomplete, and 52 more.
Suggestions, or do I just have to disable around this section somehow?