You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior: error TS2345: Argument of type '() => Observable<string>' is not assignable to parameter of type '(value: string) => SubscribableOrPromise<number>'.
Additional information:
It looks like this was previously just working due to a type checking deficiency that has been corrected (not sure what has changed recently, possibly the 5.5.2 to 5.5.3 update?)
This can be easily patched by just projecting the duration selector to a number, but it's not very elegant and it make for very confusing looking observable composition.
RxJS version:
5.5.3
Code to reproduce:
Expected behavior:
no compiler errors
Actual behavior:
error TS2345: Argument of type '() => Observable<string>' is not assignable to parameter of type '(value: string) => SubscribableOrPromise<number>'.
Additional information:
It looks like this was previously just working due to a type checking deficiency that has been corrected (not sure what has changed recently, possibly the
5.5.2
to5.5.3
update?)This can be easily patched by just projecting the duration selector to a number, but it's not very elegant and it make for very confusing looking observable composition.
The debounce operator does not actually use the value of the duration selector, only its asynchrony to manipulate the debounce operator.
The proper typing should be
durationSelector: (value: T) => SubscribableOrPromise<any>
(or something more appropriate ifany
is not acceptable).The text was updated successfully, but these errors were encountered: