StaticisType guard to check if a value is an authentic Reactive stream instance
Identifies this object as a Reactive instance
Readonly signal accessor bound to this stream with an initial value of undefined.
Asynchronous disposal hook (await using stream = new Reactive())
Returns this instance as an AsyncIterator
Synchronous disposal hook (using stream = new Reactive())
Broadcasts a value to ALL pending pull waiters and push listeners simultaneously.
The value to broadcast
True if the value was successfully emitted; false if completed or inactive
Casts a value to ALL pending pull waiters and push listeners simultaneously (multicast fan-out).
The value to cast across all consumers
True if the value was successfully emitted; false if completed or inactive
Completes and closes the reactive stream.
OptionalterminalValue: T
Optional final value to emit prior to closing
Emits a value to active pull-mode consumers or push-mode listeners.
The value to emit
True if the value was successfully emitted; false if completed or inactive
Emits an error to registered error listeners or rejects pending pull consumers.
The error instance to dispatch
Advances the async iterator to the next available item.
Unsubscribes a previously registered event listener.
Event name
Listener function to remove
this for chaining
Subscribes to stream events with optional AbortSignal and once configuration.
Returns a disposable Subscription handle for explicit resource management (using sub = ...).
'data', 'error', 'end', or 'stop'
Callback to invoke when the event fires
Optionaloptions: SubscriptionOptions
Subscription options (AbortSignal, once)
A disposable Subscription handle
Subscribes to stream events with optional AbortSignal and once configuration.
Returns a disposable Subscription handle for explicit resource management (using sub = ...).
'data', 'error', 'end', or 'stop'
Callback to invoke when the event fires
Optionaloptions: SubscriptionOptions
Subscription options (AbortSignal, once)
A disposable Subscription handle
Subscribes to stream events with optional AbortSignal and once configuration.
Returns a disposable Subscription handle for explicit resource management (using sub = ...).
'data', 'error', 'end', or 'stop'
Callback to invoke when the event fires
Optionaloptions: SubscriptionOptions
Subscription options (AbortSignal, once)
A disposable Subscription handle
Subscribes to a single event occurrence.
Event name
Callback function
Optionaloptions: Omit<SubscriptionOptions, "once">
Subscription options
A disposable Subscription handle
Subscribes to a single event occurrence.
Event name
Callback function
Optionaloptions: Omit<SubscriptionOptions, "once">
Subscription options
A disposable Subscription handle
Subscribes to a single event occurrence.
Event name
Callback function
Optionaloptions: Omit<SubscriptionOptions, "once">
Subscription options
A disposable Subscription handle
Pulls the next available value directly from the stream.
A promise resolving to the next item T, or undefined if completed
Pushes data into the stream (producer mode) or registers a listener (consumer mode).
True if the value was successfully emitted; false if completed or inactive; Reactive.Subscription if registering a listener
Closes the async iterator and marks the stream as completed.
Alias for complete().
OptionalterminalValue: T
Optional final value to emit prior to closing
Throws an error into the stream, rejecting pending waiters and stopping the stream.
Optionalerr: anyBridges this Reactive stream into a synchronous Signify signal. Updates the signal value whenever the stream emits data.
A ReadonlySignal bound to this stream.
Bridges this Reactive stream into a synchronous Signify signal. Updates the signal value whenever the stream emits data.
Optional fallback value before first emission (default: undefined).
A ReadonlySignal bound to this stream.
Returns a new Reactive stream that mirrors the source but completes automatically when the given notifier (AbortSignal, Promise, or trigger Reactive stream) fires.
An AbortSignal, Promise, or Reactive stream bounding this stream's lifecycle.
A new Reactive stream
StaticfromStaticfrom
Reactive
Universal, zero-dependency async reactive stream combining push-based event emission and pull-based
AsyncIterableiteration with native TC39 resource management (using/await using) and Garbage Collection finalization safety.Example