-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
refactor: remove rxjs patch operators in favor of lettable operators #8548
Conversation
CaerusKaru
commented
Nov 19, 2017
- Fixes Change rxjs imports in material-examples #8501
6a2eb9b
to
80d7ab2
Compare
return merge(...displayDataChanges) | ||
.pipe( | ||
map(() => { | ||
return this.getSortedData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be turned to one-line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
.map(user => user && typeof user === 'object' ? user.name : user) | ||
.map(name => name ? this.filter(name) : this.options.slice()); | ||
.pipe( | ||
startWith({} as User), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to change from null
to {} as User
? (Here and elsewhere).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having it stay as null
breaks strictNullChecks
.
80d7ab2
to
2f7b34c
Compare
@@ -55,7 +54,7 @@ export class KitchenSink { | |||
|
|||
/** Data source for the CDK and Material table. */ | |||
tableDataSource: DataSource<any> = { | |||
connect: () => Observable.of([ | |||
connect: () => of([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, when Material2 imported the rxjs "functions" directly they used to rename the of
import like this:
import {of as observableOf} from 'rxjs/observable/of';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because of
is a keyword in the ES6 for...of
syntax. I'll change it just to be safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. In fact, I thought rxjs
could change this operator name, as they did for (to avoid conflicts):
catch
-> catchError
do
-> tap
finally
-> finalize
switch
-> switchAll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth filing an issue in the rxjs repo
ab23945
to
0730cc3
Compare
@andrewseguin please review |
f56a80b
to
eaf9769
Compare
eaf9769
to
12f74cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for doing this work. It'll be helpful for people trying to understand how to use pipe
in their apps
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |