Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

old-way rxjs operators and factory methods vs lettable ones #1540

Open
maksfastovets opened this issue Jan 9, 2018 · 2 comments
Open

old-way rxjs operators and factory methods vs lettable ones #1540

maksfastovets opened this issue Jan 9, 2018 · 2 comments

Comments

@maksfastovets
Copy link

maksfastovets commented Jan 9, 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.

@maksfastovets maksfastovets changed the title throwError vs Observable.throw catchError vs Observable.catch Jan 9, 2018
@maksfastovets maksfastovets changed the title catchError vs Observable.catch old-way rxjs operators and factory methods vs lettable ones Jan 10, 2018
@klozano
Copy link

klozano commented Jan 24, 2018

any news on this?

@paulpdaniels
Copy link
Contributor

This is the wrong repo. You want https://github.com/ReactiveX/rxjs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants