title: Angular - Argument of type is not assignable to parameter
body: <p>TypeScript shows me below erros in app.component.ts:</p>
  
  <blockquote>
    <p>Argument of type '(events: Event[]) => void' is not assignable to
    parameter of type '(value: Event[]) => void'.   </p>
    
    <p>Types of parameters
    'events' and 'value' are incompatible.</p>
    
    <p>Type 'Event[]' is not assignable to type 'import("/home/src/app/models/event.interface").Event[]'.</p>
    
    <p>Type 'Event' is missing the following properties from type 'Event': _id, name, date</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <p><strong>event.interface.ts</strong></p>
  
  <pre><code>export interface Event{
      _id: string;
      name: string;
      date: Date;
  }
  </code></pre>
  
  <p><strong>app.service.ts</strong></p>
  
  <pre><code>  getEvents(): Observable&lt;Event[]&gt; {
      return this.http.get&lt;Event[]&gt;('www.example.com/your-events')
    }
  </code></pre>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>  ngOnInit() {
      this.appService.getEvents().subscribe(
        (events: Event[]) =&gt; {
          this.promotersEvents = events;
        }
      )
    }
  </code></pre>
  
  <p>What is wrong with my code? Thanks for advice!</p>