I am trying to execute throttle ngrx save event update events with the following code
import 'rxjs/add/operator/throttle' import { Dispatcher, Store } from '@ngrx/store'; ... static get parameters() { return [[Dispatcher]]; } constructor(actions$) { ... this.actions$ .filter(action => action.type === this.Actions[`LOAD_USERS_REQUEST`]) .throttle(1000 ) .subscribe(() => ... );
it causes an error
in ThrottleSubscriber.tryDurationSelector (throttle.js: 80) TypeError: this.durationSelector is not a function
When I replace .throttle(1000) with .throttle(() => 1000) , it throws another error that clearly shows that the throttle is expecting a function, not the one I provide. But I wonder why, since the documentation states that the throttle is expecting a numerical value.
https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/throttle.md
angular typescript rxjs rxjs5 ngrx
select
source share