@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
21 lines (20 loc) • 1.08 kB
TypeScript
import { Observable } from '../Observable';
import { Scheduler } from '../Scheduler';
/**
* Returns the source Observable delayed by the computed debounce duration,
* with the duration lengthened if a new source item arrives before the delay
* duration ends.
* In practice, for each item emitted on the source, this operator holds the
* latest item, waits for a silence for the `dueTime` length, and only then
* emits the latest source item on the result Observable.
* Optionally takes a scheduler for manging timers.
* @param {number} dueTime the timeout value for the window of time required to not drop the item.
* @param {Scheduler} [scheduler] the Scheduler to use for managing the timers that handle the timeout for each item.
* @return {Observable} an Observable the same as source Observable, but drops items.
* @method debounceTime
* @owner Observable
*/
export declare function debounceTime<T>(dueTime: number, scheduler?: Scheduler): Observable<T>;
export interface DebounceTimeSignature<T> {
(dueTime: number, scheduler?: Scheduler): Observable<T>;
}