All you need to know about the debounce operator RxJS

debounce(durationSelector: Function): MonoTypeOperatorFunctiondurationSelector: It is a function that receives the time span value from the source observable and stops emitting input values till the time span is elapsed.MonoTypeOperatorFunction: It is a function that returns an observable as output.
const source = of( 1 , 2 , 3 , 4 , 5 , 6 );const result = source.pipe(debounce(() => interval( 2000 )));result.subscribe(val => console.log(val));

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store