Signal is an Observable with a current value.
Signal is an Observable with a current value.
- Companion
- object
Value members
Concrete methods
- Value Params
- combinator
Must not throw!
- Value Params
- combinator
Must not throw!
- Value Params
- combinator
Must not throw!
- Value Params
- combinator
Must not throw!
- Value Params
- combinator
Must not throw!
- Value Params
- combinator
Must not throw!
- Value Params
- combinator
Must not throw!
- Value Params
- changesOperator
Note: Must not throw!
- initialOperator
Note: Must not throw!
Trigger JS debugger when signal is evaluating its initial value (if when
passes at that time)
Trigger JS debugger when signal is evaluating its initial value (if when
passes at that time)
Log when signal is evaluating its initial value (if when
passes at that time)
Log when signal is evaluating its initial value (if when
passes at that time)
Execute fn when signal is evaluating its initial value
Execute fn when signal is evaluating its initial value
See also debug methods in com.raquo.airstream.debug.DebuggableObservable
See also debug methods in com.raquo.airstream.debug.DebuggableObservable
- Definition Classes
- Value Params
- fn
(currentValue, nextParentValue) => nextValue
- makeInitial
currentParentValue => initialValue Note: must not throw
Add a noop observer to this signal to ensure that it's started. This lets you access .now and .tryNow on the resulting StrictSignal.
Add a noop observer to this signal to ensure that it's started. This lets you access .now and .tryNow on the resulting StrictSignal.
You can use myStream.toWeakSignal.observe.tryNow()
to read the last emitted
value from event streams just as well.
Inherited methods
Subscribe an external observer to this observable
Subscribe an external observer to this observable
- Inherited from
- BaseObservable
Trigger JS debugger for emitted events and errors if when
passes
Trigger JS debugger for emitted events and errors if when
passes
- Inherited from
- DebuggableObservable
Trigger JS debugger for emitted errors (but not events) if when
passes
Trigger JS debugger for emitted errors (but not events) if when
passes
- Inherited from
- DebuggableObservable
Trigger JS debugger for emitted events (but not errors) if when
passes
Trigger JS debugger for emitted events (but not errors) if when
passes
- Inherited from
- DebuggableObservable
Trigger JS debugger when the observable starts and stops
Trigger JS debugger when the observable starts and stops
- Inherited from
- DebuggableObservable
Trigger JS debugger when the observable starts
Trigger JS debugger when the observable starts
- Inherited from
- DebuggableObservable
Trigger JS debugger when the observable stops
Trigger JS debugger when the observable stops
- Inherited from
- DebuggableObservable
Log emitted events and errors if when
condition passes, using dom.console.log if useJsLogger
is true.
Log emitted events and errors if when
condition passes, using dom.console.log if useJsLogger
is true.
- Inherited from
- DebuggableObservable
Log emitted errors (but not regular events) if when
condition passes
Log emitted errors (but not regular events) if when
condition passes
- Inherited from
- DebuggableObservable
Log emitted events (but not errors) if when
condition passes, using dom.console.log if useJsLogger
is true.
Log emitted events (but not errors) if when
condition passes, using dom.console.log if useJsLogger
is true.
- Inherited from
- DebuggableObservable
Log when the observable starts and stops
Log when the observable starts and stops
- Inherited from
- DebuggableObservable
Log when the observable starts
Log when the observable starts
- Inherited from
- DebuggableObservable
Log when the observable stops
Log when the observable stops
- Inherited from
- DebuggableObservable
Execute fn on every emitted event or error
Execute fn on every emitted event or error
- Inherited from
- DebuggableObservable
Execute fn on every emitted error (but not regular events)
Execute fn on every emitted error (but not regular events)
- Inherited from
- DebuggableObservable
Execute fn on every emitted event (but not error)
Execute fn on every emitted event (but not error)
- Inherited from
- DebuggableObservable
Execute callbacks on when the observable starts and stops
Execute callbacks on when the observable starts and stops
- Value Params
- startFn
topoRank => ()
- Inherited from
- DebuggableObservable
Execute callbacks on when the observable starts
Execute callbacks on when the observable starts
- Value Params
- fn
topoRank => ()
- Inherited from
- DebuggableObservable
Execute callbacks on when the observable stops
Execute callbacks on when the observable stops
- Inherited from
- DebuggableObservable
Return the observable's topoRank. This does not affect the observable in any way.
Return the observable's topoRank. This does not affect the observable in any way.
- Inherited from
- DebuggableObservable
Create a new observable that listens to the original, and
set the displayName of the new observable.
This is different from setDisplayName
.
Create a new observable that listens to the original, and
set the displayName of the new observable.
This is different from setDisplayName
.
If you say stream.debugWithName("foo").debugLog()
, the displayName
used by the logger will be "foo" verbatim, whereas if you say
stream.setDisplayName("foo").debugLog()
, the logger's displayName
will be "foo|Debug" – with a suffix – to differentiate it from
the "foo" displayName of stream
itself.
- Inherited from
- DebuggableObservable
This is the method that subclasses override to preserve the user's ability to set custom display names.
This is the method that subclasses override to preserve the user's ability to set custom display names.
- Inherited from
- Named
- Value Params
- compose
Note: guarded against exceptions
- Inherited from
- BaseObservable
Create an external observer from a function and subscribe it to this observable.
Create an external observer from a function and subscribe it to this observable.
Note: since you won't have a reference to the observer, you will need to call Subscription.kill() to unsubscribe
- Inherited from
- BaseObservable
value
is passed by name, so it will be evaluated whenever the Observable fires.
Use it to sample mutable values (e.g. myInput.ref.value in Laminar).
value
is passed by name, so it will be evaluated whenever the Observable fires.
Use it to sample mutable values (e.g. myInput.ref.value in Laminar).
See also: mapToStrict
- Value Params
- value
Note: guarded against exceptions
- Inherited from
- BaseObservable
value
is evaluated strictly, only once, when this method is called.
value
is evaluated strictly, only once, when this method is called.
See also: mapTo
- Inherited from
- BaseObservable
Total number of internal and external observers
Total number of internal and external observers
- Inherited from
- BaseObservable
This method is fired when this observable stops working (listening for parent events and/or firing its own events), that is, when it loses its last Observer (internal or external).
This method is fired when this observable stops working (listening for parent events and/or firing its own events), that is, when it loses its last Observer (internal or external).
onStop can potentially be called multiple times, the second time being after it has started again (see onStart).
- Inherited from
- BaseObservable
Set the display name for this instance (observable or observer).
Set the display name for this instance (observable or observer).
- This method modifies the instance and returns
this
. It does not create a new instance. - New name you set will override the previous name, if any. This might change in the future. For the sake of sanity, don't call this more than once for the same instance.
- If display name is set, toString will output it instead of the standard type@hashcode string
- Inherited from
- Named
Override defaultDisplayName instead of this, if you need to.
Override defaultDisplayName instead of this, if you need to.
Convert this observable to a signal of Option[A]. If it is a stream, set initial value to None.
Convert this observable to a signal of Option[A]. If it is a stream, set initial value to None.
- Inherited from
- BaseObservable