I'm getting the following error when trying to assign the correct types for my application(screenshot at the end of the post)
This is coming from the following code:
this.catchesService.watchUserCatches('123').subscribe((catches: Catch[]) => {
console.log(catches);
});
Which is a returned observable from:
watchUserCatches(userId: string) {
return this.firestore.collection('catches', ref => ref.where('uid', '==', userId)).valueChanges({ idField: 'doc_id' }).pipe(first());
}
I know that what is going to be returned from Firebase is a list of documents that will have the type of Catch for each one (I am creating the documents so will know what is in them), but I don't fully understand what the error I am getting is and how to go about setting the correct type for them?