throttleTime
signature: throttleTime(duration: number, scheduler: Scheduler, config: ThrottleConfig): Observable
throttleTime(duration: number, scheduler: Scheduler, config: ThrottleConfig): ObservableEmit first value then ignore for specified duration
Examples
// RxJS v6+
import { interval } from 'rxjs';
import { throttleTime } from 'rxjs/operators';
// emit value every 1 second
const source = interval(1000);
/*
emit the first value, then ignore for 5 seconds. repeat...
*/
const example = source.pipe(throttleTime(5000));
// output: 0...6...12
const subscribe = example.subscribe(val => console.log(val));Related Recipes
Additional Resources
Last updated