Can't infer type in the map function
问题 As part of migrating my project from angular 5 to 6 I had to update the way RXJS6 does things. So this this.filteredList = this.autoComplete.valueChanges .startWith(null) .map(val => val ? this.filter(val) : this.list.slice()); changed to this this.filteredList = this.autoComplete.valueChanges.pipe( startWith(null), map(val => val ? this.filter(val) : this.list.slice())); It seems the compiler can't infer type anymore as I get Severity Code Description Project File Line Suppression State