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

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

@maksfastovets

Description

@maksfastovets

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions