title: Setting datasource to new MatTable Data Source Angular 7
body: <p>When I set my data source to an array and try to set the <code>dataSource</code> to a new mat table <code>dataSource</code> to be able to use filtering it comes with I get the error:</p>
  
  <blockquote>
    <p>Type 'MatTableDataSource' is missing the following properties from type 'TableRecord[]': length, pop, push, concat, and 24 more.</p>
  </blockquote>
  
  <p>However, if I set the data source to any it works fine. Can someone please help me understand why:</p>
  
  <p><strong>service.ts</strong></p>
  
  <pre><code>export interface PaginatedListResponse&lt;TableRecord&gt;{
    length: number,
    tableRows: Array&lt;TableRecord&gt;
  }
  
  export interface TableRecord{
    x: string,
    y: string,
    z: boolean,
  
  }
  </code></pre>
  
  <p><strong>.ts</strong></p>
  
  <pre><code>dataSource: TableRecord[] = [];
  this.dataSource = new MatTableDataSource(response.tableRows);
  //errror: Type 'MatTableDataSource&lt;TableRecord&gt;' is missing the following properties from type 'TableRecord[]': length, pop, push, concat, and 24 more.
  </code></pre>
  
  <p><strong>working example</strong></p>
  
  <pre><code>    dataSource: any;
      this.dataSource = new MatTableDataSource(response.tableRows);
     //No error
  </code></pre>