#1540·RxJS

old-way rxjs operators and factory methods vs lettable ones

Author: maksfastovetsCreated Jan 9, 2018Updated Jan 24, 2018

I bumped into the problem with lettable operators, in particular, with timer.

For instance, this: import 'rxjs/add/operator/catch' -- still works and even changes Observable object globally so there's no need to import that 'catch' again in a certain ts file once it is imported in project module file.

And this: import 'rxjs/add/observable/timer' -- doesn't work anymore, instead: import { timer } 'rxjs/observable/timer' -- should be used and it doesn't modify Observable object, it is used as an independent function, and it cannot be imported globally, it should be imported in each ts file individually if it is needed.

Why is import 'rxjs/add/operator/catch' still in use and has its counterpart of import {catchError} from 'rxjs/operators/catchError' and import 'rxjs/add/observable/timer' is no longer in use?

Is there any documentation on the topic? On the import syntax migration?

Thank you.

Source: Reactive-Extensions/RxJS