An observable value, as a zero-argument callable with extra methods.
In addition to being callable, signals also offer a .value getter, and
implement the standard JS methods .toString(), .valueOf(), and
.toJSON() in such a way that they reflect the signal's contents rather than
the signal itself.
Signals also implement the Source interface, and can thus be
subscribed to. Subscribers receive the current value first, and then any
changes thereafter. They can be waited on by until(), in which case
the calling job resumes when the signal's value is truthy.
You can also transform a signal to a Writable by calling its
.withSet() method, or create a writable value using
value().
An observable value, as a zero-argument callable with extra methods.
In addition to being callable, signals also offer a
.value
getter, and implement the standard JS methods.toString()
,.valueOf()
, and.toJSON()
in such a way that they reflect the signal's contents rather than the signal itself.Signals also implement the Source interface, and can thus be subscribed to. Subscribers receive the current value first, and then any changes thereafter. They can be waited on by until(), in which case the calling job resumes when the signal's value is truthy.
You can also transform a signal to a Writable by calling its .withSet() method, or create a writable value using value().