title: Typescript "Property does not exists on type Element"
body: <p>I'm starting my journey with Typescript. So I have <code>video</code> tag in my Html and in <code>.ts</code> file these lines:</p>
  
  <pre><code>...
  class KomakhaPlayer {
    private container = ...;
    private video: Element = this.container.getElementsByClassName( 'video' )[ 0 ];
    private controls = ...;
  
    constructor(){
      this.video.controls = false; // ts error
      ...
    }
  }
  ...
  </code></pre>
  
  <p>As you can see <code>this.video</code> has <strong>Element</strong> type, but below <code>this.video.controls</code> throws me a Typescript error <strong>Property 'controls' does not exists on type 'Element'</strong>. </p>
  
  <p>Temporary I changed <code>Element</code> type to <code>any</code>, but I want to <strong>know</strong> how properly solve this error and handle similar in future. Thanks in advance! </p>
  
  <p><strong>SOLUTION:</strong>
  So the right approach is defining like this:</p>
  
  <pre><code>private video: HTMLVideoElement = &lt;HTMLVideoElement&gt;this.container.getElementsByClassName( 'video' )[ 0 ];
  </code></pre>
  
  <p>Explanation by <strong>@deceze</strong> below in comments</p>