Type 'Observable<any[]>' is not assignable to type 'FirebaseListObservable<any>'


#1

Hi All,

I am using Ionic2 trying to filter a FirebaseListObservable.

Based on the following youtube tutorial, they do exactly what I want to achieve, but without the errors.

enter image description here

My Code:

import {FirebaseAuth, AngularFire, FirebaseListObservable} from 'angularfire2';
        ...
    firelist: FirebaseListObservable<any>;
        ...
    this.firelist = this.af.database.list('/chat/', {
      query: {
        orderByChild: 'negativtimestamp'
      }
    }).map(items => {
      const filtered = items.filter(item => (<string[]>item.memberId).indexOf(this.senderPersonModel.uid) > -1);
      return filtered;
    });

I get the following error:

[ts]
Type 'Observable<any[]>' is not assignable to type 'FirebaseListObservable<any>'.
  Property '$ref' is missing in type 'Observable<any[]>'.
(property) ChatsPage.firelist: FirebaseListObservable<any>

Does anyone know why I get errors? I am using "angularfire2": "^2.0.0-beta.7.1-pre",.

Any help appreciated.


#2

doh! I need to use an Observable<any>; Apologies for the silly mistake.

firelist: Observable<any>;