title: Typescript Error: TS2314: Generic type 'ElementRef<T, any>' requires 2 type argument(s)
body: <p>I'm using an Angular 5.x template, but I upgrade it to Angular 6 using <a href="https://update.angular.io/" rel="noreferrer">https://update.angular.io/</a> guide. 
  Now I have this error in my constructor</p>
  
  <pre><code>Typescript Error: TS2314: Generic type 'ElementRef&lt;T, any&gt;' requires 2 type argument(s)
  </code></pre>
  
  <p>My Code: </p>
  
  <pre><code>import { Component, Input, Output, EventEmitter, ElementRef, HostListener }          from '@angular/core';
  
  @Component({
    selector: 'sidebar',
    templateUrl: './sidebar.component.html'
  })
  
  export class SidebarComponent {
  
      @HostListener('document:click', ['$event'])
    clickout(event) {
      if(!this.eRef.nativeElement.contains(event.target)) {
            this.hideMobileSidebar.emit(true);
      }
    }
  
    constructor(private eRef: ElementRef) {
    }
  
  ...
  </code></pre>
  
  <p>I don't have this error in previous Angular version 5.</p>
  
  <p>What was the change? I don't understand the docs :( <a href="https://angular.io/api/core/ElementRef" rel="noreferrer">https://angular.io/api/core/ElementRef</a></p>