ReactiveX / rxjs-tslint

TSLint rules targeting RxJS
MIT License
309 stars 41 forks source link

observeOn operator not being migrated #39

Open marcelgood opened 6 years ago

marcelgood commented 6 years ago

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 commented 6 years ago

Figured out what it should be migrated to

import { asyncScheduler } from 'rxjs'

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