Skip to content

@epikodelabs/streamix


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

Function: delay() ​

delay<T>(ms): Operator<T, T>

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

Creates a stream operator that delays the emission of each value from the source stream.

Each value received from the source is held for the specified duration before being emitted downstream.

Type Parameters ​

T ​

T = any

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

Parameters ​

ms ​

number

The time in milliseconds to delay each value.

Returns ​

Operator<T, T>

An Operator instance for use in a stream's pipe method.

Released under the MIT License.