title: How do I return multiple values in Angular2 Typescript
body: <p>I am trying to return multiple values in typescript when implementing both the filter and pagination function in md-table. when I run the code I get the error Unreachable code detected.</p>
  
  <pre><code> return Observable.merge(...displayPatientDataChanges).map(() =&gt; {
     const startIndex = this._paginator.pageIndex * this._paginator.pageSize;
     const data = this._patientDatabase.data.slice();
     return data.splice(startIndex, this._paginator.pageSize);
  
   // I get the error here on the second return function
     return this._patientDatabase.data.slice().filter((item: Patient) =&gt; {
       let searchStr = (item.firstname + item.lastname).toLowerCase();
       return searchStr.indexOf(this.filter.toLowerCase()) != -1;
     });
  
   });
  }
  
  disconnect() {}
  </code></pre>