@epikodelabs/streamix / skipUntil
Function: skipUntil()
skipUntil<
T,R>(notifier):Operator<T,T>
Defined in: projects/libraries/streamix/src/lib/operators/skipUntil.ts:38
Skip source values until a notifier emits.
skipUntil suppresses (drops) source values until the provided notifier produces its first emission. After the notifier emits, subsequent source values are forwarded normally. Uses stamp-based filtering to ensure correct ordering between notifier and source events.
Important details:
- Ordering and stamps: when the gate opens (notifier emits) only source values whose stamp is strictly greater than the gate-opening stamp will be forwarded. This prevents forwarding values that were logically emitted before or concurrently with the notifier signal.
- Notifier completion without emission: if the notifier completes without emitting, the operator remains closed and continues to drop source values.
- Error propagation: errors from either the notifier or source are propagated to the output and will terminate the subscription.
Common uses:
- Ignore initial values until a readiness signal arrives.
- Wait for user interaction before processing inputs.
Type Parameters
T
T = any
Source/output value type.
R
R = any
Notifier value type (ignored by this operator).
Parameters
notifier
A Stream<R> or Promise<R> that opens the gate when it emits.
Stream<R> | Promise<R>
Returns
Operator<T, T>
An Operator<T, T> that drops source values until the notifier emits.