title: Property 'onclick' does not exist on type 'Element'
body: <p>I have the following component in angular</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  @Component({
    selector: 'app-status',
    templateUrl: './status.component.html',
    styleUrls: ['./status.component.css']
  })
  export class StatusComponent implements OnInit {
  
    constructor() { }
  
    ngOnInit() {
      const acc = document.getElementsByClassName('accordion');
      let i;
      for (i = 0; i &lt; acc.length; i++) {
          acc[i].onclick = function() {
              this.classList.toggle('active');
              this.nextElementSibling.classList.toggle('show');
        };
      }
    }
  
  }
  </code></pre>
  
  <p>i'm retrieving the following error from the compiler</p>
  
  <p>ERROR in src/app/components/status/status.component.ts(16,16): error TS2339: Property 'onclick' does not exist on type 'Element'.</p>
  
  <p>Altough the compilation is success and all works as expected.</p>
  
  <p>Should i ignore the error?</p>