com.raquo.airstream.combine

Type members

Classlikes

trait CombineObservable[A] extends SyncObservable[A]
Companion:
object
Companion:
class
class CombineSignalN[A, Out](val parents: JsArray[Signal[A]], val combinator: JsArray[A] => Out) extends MultiParentSignal[A, Out] with CombineObservable[Out]
Value parameters:
combinator

Must not throw! Must be pure.

parents

Never update this array - this signal owns it.

class CombineStreamN[A, Out](parentStreams: JsArray[EventStream[A]], combinator: JsArray[A] => Out) extends MultiParentStream[A, Out] with CombineObservable[Out]
Value parameters:
combinator

Must not throw! Must be pure.

parentStreams

Never update this array - this stream owns it.

class MergeStream[A](parentStreams: JsArray[EventStream[A]]) extends WritableStream[A] with SyncObservable[A] with MultiParentStream[A, A]

Stream that emit events from all of its parents.

Stream that emit events from all of its parents.

Note: this stream re-emits errors emitted by all of its parents

This feature exists only for EventStream-s because merging Signals does not make sense, conceptually (what do you even do with their current values?).

Value parameters:
parentStreams

Never update this array - this stream owns it.

class SampleCombineSignalN[A, Out](samplingSignal: Signal[A], sampledSignals: JsArray[Signal[A]], combinator: JsArray[A] => Out) extends MultiParentSignal[A, Out] with CombineObservable[Out]

This signal emits the combined value when samplingSignal is updated.

This signal emits the combined value when samplingSignal is updated.

When the combined signal emits, it looks up the current value of sampledSignals, but updates to those signals do not trigger updates to the combined stream.

Works similar to Rx's "withLatestFrom", except without glitches (see a diamond case test for this in GlitchSpec).

Value parameters:
combinator

Note: Must not throw! Must be pure.

sampledSignals
  • Never update this array - this signal owns it.
class SampleCombineStreamN[A, Out](samplingStream: EventStream[A], sampledSignals: JsArray[Signal[A]], combinator: JsArray[A] => Out) extends MultiParentStream[A, Out] with CombineObservable[Out]

This stream emits the combined value when samplingStreams emits.

This stream emits the combined value when samplingStreams emits.

When the combined stream emits, it looks up the current value of sampledSignals, but updates to those signals do not trigger updates to the combined stream.

Works similar to Rx's "withLatestFrom", except without glitches (see a diamond case test for this in GlitchSpec).

Value parameters:
combinator

Note: Must not throw!

sampledSignals

Never update this array - this stream owns it.