-
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
Rename sample
operators to inspect
, reimplement sample
operator
#1053
Comments
I'd question the usefulness of both It seems easier to keep in core only radically important operators (like mergeMap, scan, map, take...), than to bloat core with many operators. |
@Blesh There's also the issue with |
👍 good catch. I don't think I included this in my PR. I'll add that. |
As long as If it came down to removing one, though, I'd remove |
I'm curious, how would |
Thinking quickly: Something like... |
Why not just |
I don't know? lol. |
Seriously, I could run all |
Just FYI, withLatestFrom needs also the addition of it('should get inspections when the notifier emits', function () {
var e1 = hot('----a-^--b----c----d----e----f----| ');
var e1subs = '^ ! ';
var e2 = hot( '-----x----------x----------x----------|');
var e2subs = '^ ! ';
var expected = '-----b----------d----------f| ';
var result = e2.withLatestFrom(e1, function (a, b) { return b; }).takeUntil(e1.last());
expectObservable(result).toBe(expected);
expectSubscriptions(e1.subscriptions).toBe(e1subs);
expectSubscriptions(e2.subscriptions).toBe(e2subs);
}); I don't know how useful it is to have the completion semantics of |
Agreed. |
I'm fine with that. |
Remove inspect and inspectTime operators from this library, since they are unnecessary and don't exist in previous versions of RxJS. This change was suggested in issue ReactiveX#1053. BREAKING CHANGES: `inspect` and `inspectTime` were removed. Use `withLatestFrom` instead.
Remove inspect and inspectTime operators from this library, since they are unnecessary and don't exist in previous versions of RxJS. This change was suggested in issue ReactiveX#1053. BREAKING CHANGE: `inspect` and `inspectTime` were removed. Use `withLatestFrom` instead.
Remove inspect and inspectTime operators from this library, since they are unnecessary and don't exist in previous versions of RxJS. This change was suggested in issue #1053. BREAKING CHANGE: `inspect` and `inspectTime` were removed. Use `withLatestFrom` instead.
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. |
Per some offline discussion with @headinthebox, @mattpodwysocki and @staltz... the current implementation of
sample
as discussed in #150 is probably incorrect.Basically, in the original
sample
operator ala RxJS 4, the emission of a value meant that a new value had arrived on the source. If the notifier notified, and a new value hadn't arrived, nothing would be emitted. This means the very emission of the value has some meaning/connotations WRT the source observable.... that said ... I think @staltz raised some interesting points about how people might expect a sample operator to work, or needs those people might have.
... so rather than throw away the current
sample
andsampleTime
implementations, I'd like to rename them toinspect
andinspectTime
and then reimplement thesample
operators in RxJS 4's likeness.The text was updated successfully, but these errors were encountered: