title: How to get the value of time element in Typescript?
body: <p>I have a time input element in HTML and I want its value as a number in Typescript. In Javascript we can do that by
  <code>var time = document.getElementById(&quot;time&quot;).valueAsNumber;</code></p>
  <p>But in Typescript it is throwing an error that <strong>Property 'valueAsNumber' does not exist on type 'HTMLTimeElement'</strong> after I wrote this code,</p>
  <p><code>var time = &lt;HTMLTimeElement&gt;document.getElementById(&quot;time&quot;).valueAsNumber;</code></p>
  <p>What do I do?</p>