Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / src/public-api / debounce

Function: debounce() ​

debounce<T>(duration): Operator<T, T>

Defined in: projects/libraries/streamix/src/lib/operators/debounce.ts:14

Creates a stream operator that emits the most recent value from the source stream only after a specified duration has passed without another new value.

Values that are superseded before the timeout fires are simply not emitted.

Type Parameters ​

T ​

T = any

The type of the values in the source and output streams.

Parameters ​

duration ​

number

The debounce duration in milliseconds.

Returns ​

Operator<T, T>

An Operator instance for use in a stream pipeline.

Released under the MIT License.