title: Get a "HTMLInputElement" type in TypeScript
body: <p>There is a <code>&lt;input type="checkbox" id="mainCheckbox" /&gt;</code>,I want to use the property <code>checked</code> of it.And the vscode waring <code>Property 'checked' does not exist on type 'HTMLElement'</code>.I know that must be type <code>HTMLInputElement</code>,But I can't change it,the method <code>getElementById()</code> is return the type <code>HTMLElement</code>;</p>
  
  <pre class="lang-js prettyprint-override"><code>var controlCheckbox= document.getElementById("mainCheckbox"),
      addBtn = document.getElementById("btn_add"),
      container = document.getElementById("observers");
  ObserverSubject.extend(new ObserverSubject.Subject(), controlCheckbox);
  controlCheckbox.onclick=()=&gt;{
      this.Notify(controlCheckbox.checked);
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Jl26Y.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Jl26Y.png" alt="enter image description here"></a></p>