@epikodelabs/streamix / delay
Function: delay()
delay<
T>(ms):Operator<T,T>
Defined in: projects/libraries/streamix/src/lib/operators/delay.ts:16
Creates a stream operator that delays the emission of each value from the source stream while tracking pending and phantom states.
Each value received from the source is added to context.pendingResults and is only resolved once the delay has elapsed and the value is emitted downstream.
Type Parameters
T
T = any
The type of the values in the source and output streams.
Parameters
ms
MaybePromise<number>
The time in milliseconds to delay each value.
Returns
Operator<T, T>
An Operator instance for use in a stream's pipe method.