rxjs-tslint icon indicating copy to clipboard operation
rxjs-tslint copied to clipboard

observeOn operator not being migrated

Open marcelgood opened this issue 7 years ago • 1 comments

I'm using observeOn and the async scheduler in a few places. But it gets migrated to something that still requires rxjs-compat. And for the life of me I can't find how this is supposed to be done in RxJS 6. The migration documentation is frankly horrific!

So basically the migration tool leaves me with

import { async } from 'rxjs/scheduler/async';

this.leftNavVisibleSubject.pipe(
            distinctUntilChanged(),
            observeOn(async));

This fails to compile as soon as I drop rxjs-compat and as said I've been pulling my hair trying to find how this is supposed to be migrated.

marcelgood avatar May 15 '18 23:05 marcelgood

Figured out what it should be migrated to

import { asyncScheduler } from 'rxjs'

this.leftNavVisibleSubject.pipe(
            distinctUntilChanged(),
            observeOn(asyncScheduler));

marcelgood avatar May 16 '18 05:05 marcelgood