-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(if): add static Observable.if creation operator. #1348
Conversation
@@ -39,8 +39,10 @@ import './add/observable/fromArray'; | |||
import './add/observable/fromEvent'; | |||
import './add/observable/fromEventPattern'; | |||
import './add/observable/fromPromise'; | |||
import './add/observable/if'; |
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 this for kitchensink
only? not in rx
?
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.
@kwonoj in Rx4 Observable.if
is in the "experimental" package, so I only put it into KitchenSink. I still question why we distinguish between "core" and "kitchen sink" operators in the first place.
return elseSource.subscribe(subscriber); | ||
} else { | ||
subscriber.complete(); | ||
} |
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.
What about moving this if to a separate function? I know this is not a very performance sensitive operator, but we can have improvements anyway.
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.
Sure, that's alright with me.
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.
@trxcllnt , would you be update PR as suggested, or proceed to check in as-is?
Blocking this while #1364 is merged. |
@trxcllnt I think this needs rebased/refactored to move the tests to TypeScript. |
5efb402
to
297722c
Compare
@Blesh done |
297722c
to
dd23ee9
Compare
dd23ee9
to
f7ff7ec
Compare
@Blesh rebased again good 2 go |
I'll check this in today. :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Addresses #1343