title: why am i getting error with angular EventEmitter code
body: <p>i am learning from a video and this code seems to work for him not me.
  can someone explain plz why am i getting error in onPostAdded(post) post variable is of type any</p>
  <p>Error:</p>
  <blockquote>
  <p>onPostAdded(post) //Parameter 'post' implicitly has an 'any' type this.storedPosts.push(post); //Argument of type 'any' is not assignable to parameter of type 'never'</p>
  </blockquote>
  <p><strong>app.component.html</strong></p>
  <pre><code>&lt;app-header&gt;&lt;/app-header&gt;
  &lt;main&gt;
    &lt;app-post-create (postCreated)=&quot;onPostAdded($event)&quot;&gt;&lt;/app-post-create&gt;
    &lt;app-post-list [posts]=&quot;storedPosts&quot;&gt;&lt;/app-post-list&gt;
  &lt;/main&gt;
  
  &lt;router-outlet&gt;&lt;/router-outlet&gt;
  </code></pre>
  <p><strong>app.component.ts</strong></p>
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
  })
  
  export class AppComponent {
    title=&quot;myapp&quot;
    storedPosts =[];
  
    onPostAdded(post) { //getting error here
      this.storedPosts.push(post);  //getting error here aswell
    }
  }
  </code></pre>
  <p><strong>post-create.component.ts</strong></p>
  <pre><code>import { Content } from &quot;@angular/compiler/src/render3/r3_ast&quot;;
  import { Component, EventEmitter, Output } from &quot;@angular/core&quot;;
  
  @Component({
    selector: &quot;app-post-create&quot;,
    templateUrl:&quot;./post-create.component.html&quot;,
    styleUrls:[&quot;./post-create.component.css&quot;]
  })
  export class PostCreateComponent{
    enteredTitle =&quot;&quot;;
    enteredContant=&quot;&quot;;
  @Output() postCreated = new EventEmitter();
  
    onAddPost(){
      const post={
        title:this.enteredTitle,
        content:this.enteredContant
      };
      this.postCreated.emit(post);
    }
  }
  </code></pre>
  <p><strong>post-create.component.html</strong></p>
  <pre><code>&lt;mat-card&gt;
    &lt;mat-form-field&gt;
      &lt;input matInput type=&quot;text&quot; [(ngModel)]=&quot;enteredTitle&quot;&gt;
    &lt;/mat-form-field&gt;
  
    &lt;mat-form-field&gt;
      &lt;textarea matInput row='6' [(ngModel)]=&quot;enteredContant&quot;&gt;&lt;/textarea&gt;
      &lt;button
      mat-raised-button
      color=&quot;accent&quot;
      (click)=&quot;onAddPost()&quot;&gt;Save&lt;/button&gt;
    &lt;/mat-form-field&gt;
  &lt;/mat-card&gt;
  </code></pre>