@epikodelabs/streamix / startWith
Function: startWith()
startWith<
T>(initialValue):Operator<T,T>
Defined in: projects/libraries/streamix/src/lib/operators/startWith.ts:14
Creates a stream operator that prepends a specified value to the beginning of the stream.
The operator first emits the initialValue immediately upon being iterated. After this initial emission, it begins to pull and emit values from the source stream as they become available.
Type Parameters
T
T = any
The type of the values in the stream.
Parameters
initialValue
MaybePromise<T>
The value to be emitted as the first item in the stream.
Returns
Operator<T, T>
An Operator instance that can be used in a stream's pipe method.