Search code examples
angularrxjsobservablecombinelatest

Property 'combineLatest' doesnt exist on type 'Observable<any>'


Hello I am using RxJS combineLatest operator and getting this error. Could someone let me know what changes I should do


Solution

    1. Please don't post screenshots of code. It makes it stupid hard to reproduce the issue.
    2. In the latest versions of RxJS, combineLatest is static akin to forkJoin. So you need to initialize an observable out of it. See v5 -> v6 migration guide and search for combineLatest.
    import { combineLatest } from 'rxjs';
    
    this.searchResult = combineLatest(this.searchQuery$, this.listMachines).pipe(...);