Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rxjs): use pipeable operators instead of prototype-patched based operators #295

Conversation

christophercr
Copy link
Collaborator

@christophercr christophercr commented Apr 4, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[X] Code style update (formatting, local variables)
[X] Refactoring (no functional changes, no api changes)
[X] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Prototype-patched based observables/operators are used in all our codebase due to this kind of imports:

import "rxjs/add/observable/of";
import "rxjs/add/operator/foo";
import "rxjs/add/operator/baz";

Issue Number: #258

What is the new behavior?

Pipeable observables/operators are used now by doing this kind of imports:

import { of } from "rxjs/observable/of";
import { foo } from "rxjs/operators/foo";
import { baz } from "rxjs/operators/baz";

Currently, we cannot use the generic import for all operators: import { foo, baz } from "rxjs/operators";
due to ReactiveX/rxjs#2981

Does this PR introduce a breaking change?

[X] Yes
[ ] No

Now only pipeable operators should be used, otherwise Tslint will throw an error (due to the "no-import-side-effect" rule)

@christophercr christophercr requested a review from SuperITMan April 4, 2018 13:07
@SuperITMan SuperITMan merged commit a649ba0 into NationalBankBelgium:master Apr 5, 2018
@christophercr christophercr deleted the feature/rxjs-pipeable-operators branch April 16, 2018 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants