Skip to content

Commit 1e0ae27

Browse files
committed
feat: update to rxjs 5.5.0 and switch to lettable operators
Bumps the required RxJS version to 5.5.0 and gets rid of our RxChain in favor of using the lettable Rx operators. Refactors all the usages and updates the configs. Fixes #7275.
1 parent 76a6e7b commit 1e0ae27

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2911
-1882
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ src/lib/core/datetime/** @mmalerba
4848

4949
# CDK
5050
src/cdk/coercion/** @jelbourn
51-
src/cdk/rxjs/** @jelbourn
5251
src/cdk/observers/** @jelbourn @crisbeto
5352
src/cdk/collections/** @jelbourn @crisbeto @andrewseguin
5453
src/cdk/a11y/** @jelbourn @devversion

CODING_STANDARDS.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,33 +127,20 @@ class ConfigBuilder {
127127
```
128128

129129
#### RxJS
130-
When dealing with RxJS operators, import the operator functions directly (e.g.
131-
`import "rxjs/operator/map"`), as opposed to using the "patch" imports which pollute the user's
132-
global Observable object (e.g. `import "rxjs/add/operator/map"`):
130+
When dealing with RxJS operators, import the lettable operator (e.g.
131+
`import {map} from 'rxjs/operators'`), as opposed to using the "patch" imports which pollute the
132+
user's global Observable object (e.g. `import 'rxjs/add/operator/map'`):
133133

134134
```ts
135135
// NO
136136
import 'rxjs/add/operator/map';
137137
someObservable.map(...).subscribe(...);
138138

139139
// YES
140-
import {map} from 'rxjs/operator/map';
141-
map.call(someObservable, ...).subscribe(...);
140+
import {map} from 'rxjs/operators';
141+
someObservable.pipe(map(...)).subscribe(...);
142142
```
143143

144-
Note that this approach can be inflexible when dealing with long chains of operators. You can use
145-
the `RxChain` class to help with it:
146-
147-
```ts
148-
// Before
149-
someObservable.filter(...).map(...).do(...);
150-
151-
// After
152-
RxChain.from(someObservable).call(filter, ...).call(map, ...).call(do, ...).subscribe(...);
153-
```
154-
Note that not all operators are available via the `RxChain`. If the operator that you need isn't
155-
declared, you can add it to `/core/rxjs/rx-operators.ts`.
156-
157144
#### Access modifiers
158145
* Omit the `public` keyword as it is the default behavior.
159146
* Use `private` when appropriate and possible, prefixing the name with an underscore.

0 commit comments

Comments
 (0)