title: Untyped function calls may not accept type arguments
body: <p>I am using Angular6 and trying to get the document content within this filter function. The very last line of my code snippet is giving me the error "Untyped function calls may not accept type arguments". Not sure why I'm getting this error... maybe it cannot be used within filter function...?</p>
  
  <p>Constructor: </p>
  
  <pre><code>constructor(private afs : AngularFirestore, private authService : AuthService) { 
    //Get user collection on initialise
    this.userCollection = this.afs.collection('users');
  }
  </code></pre>
  
  <p>Filtering:</p>
  
  <pre><code>this.userCollection = this.afs.collection&lt;User&gt;('users', ref =&gt; {
        console.log(ref);
        return ref
      })
  
      this.usersOnSearch = this.userCollection.valueChanges();
  
      this.usersOnSearch.flatMap(user =&gt; {
        return user.filter(function(value) {
          let subjectTrue : boolean = false;
          let levelTrue : boolean = false;
          let docID : string = value.user_subjects.id;
          let userLevelPriceDocument :  AngularFirestoreDocument&lt;UserSubjects&gt;;
          userLevelPriceDocument = this.afs.doc&lt;UserSubjects&gt;(`user_subjects/${docID}`);
        })
      });
  </code></pre>