0

Since RxJS v.6.5, the static combineLatest syntax combined$ = combineLatest(a$,b$,c$); is deprecated.

Instead you should use following syntax:

combined$ = combineLatest([a$,b$,c$]);

Where they are: a$: Observable<T>, b$: Observable<U>, c$: Observable<V>

This declaration although gives me several linting errors:

Argument type [Observable<ObservableValueOf<Observable<T>>>, Observable<ObservableValueOf<Observable<U>>>, Observable<ObservableValueOf<Observable<V>>>] is not assignable to parameter type [Observable<ObservableValueOf<Observable<T>>>]

So, where is my error? Thanks a lot.

Harun Yilmaz
  • 8,281
  • 3
  • 24
  • 35
Mikelgo
  • 483
  • 4
  • 15

1 Answers1

2

You should import combineLatest from rxjs instead of rxjs/operators like this:

import { of, combineLatest } from 'rxjs';

const a$ = of(true);
const b$ = of(false);

combineLatest([a$, b$]).pipe(
      tap(console.log)
    ).subscribe();

Hope it helps.

user2216584
  • 5,387
  • 3
  • 22
  • 29