-
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
debounce() and throttle()’s selector argument has wrong return type #3204
Comments
Ah, that’s nice! Sorry, it completely forgot to search for past reports. My bad. |
No worries; you're right. |
cartant
added a commit
to cartant/rxjs
that referenced
this issue
Jan 2, 2018
cartant
added a commit
to cartant/rxjs
that referenced
this issue
Jan 13, 2018
acutmore
pushed a commit
to youviewtv/rxjs-5
that referenced
this issue
Jan 23, 2018
* test(throttle): add typings tests * fix(typings): relax throttle selector type Closes ReactiveX#3204 (cherry picked from commit e83fda7)
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Here’s the current signature for
debounce()
:rxjs/src/operators/debounce.ts
Line 53 in c1721e3
One thing that confused me is that it asks for your function to return a
SubscribableOrPromise<number>
. The documentation compounded my confusion ("A function (…) for computing the timeout duration for each source value”): is my selector supposed to return the number of milliseconds? Turns out the result of that observable/promise is completely discarded.RxJS version: 5.5.6 (and, looking at the code, the next branch, too)
Additional information:
throttle()
has the same issue. Interestingly,audit()
is correctly usingSubscribableOrPromise<any>
:rxjs/src/operators/audit.ts
Line 52 in c1721e3
The text was updated successfully, but these errors were encountered: