Closed 0x80 closed 8 years ago
the parameters are different between rxjs5 and rxjs4 it looks like.
in rxjs4: distinctUntilChanged = function (keyFn, comparer)
in rxjs5: distinctUntilChanged<T, K>(compare?: (x: K, y: K) => boolean, keySelector?: (x: T) => K)
If this is something you think should be changed, feel free to raise issue over at https://github.com/ReactiveX/rxjs
Oops I meant to post this in the v5 repo.
I have a hard time understanding the new API from just the type signature, and the links in the v5 docs are dead. How would you write the above call to distinctUntilChanged with v5 arguments?
the comparer and the key selector are just swapped.
.distinctUntilChanged(x => x.value)
-> .distinctUntilChanged(null, x => x.value)
Aaah :smiley: thanks!
Could you maybe point me to where this is documented?
The docs are a work in progress, but as they get fleshed out they get updated @ http://reactivex.io/rxjs/
Ok, I think I better stick to v4 then for now :+1:
This is poorly documented.
This example from the docs
output v4 (as expected):
output v5: