@serenity-is/corelib / Signal
Interface: Signal<T>
Defined in: ../domwise/dist/index.d.ts:99
A writable signal whose value can be set.
Extends
SignalLike<T>
Type Parameters
T
T
The type of the signal's value.
Accessors
value
Set Signature
set value(
value):void
Defined in: ../domwise/dist/index.d.ts:100
Current value; reading may track a dependency when inside an effect/computed.
Parameters
value
T
Returns
void
Overrides
Methods
peek()
peek():
T
Defined in: ../domwise/dist/index.d.ts:87
Returns the current value without creating a dependency.
Returns
T
The current value.
Inherited from
subscribe()
subscribe(
fn): () =>void
Defined in: ../domwise/dist/index.d.ts:93
Subscribes to value changes.
Parameters
fn
(value) => void
Callback invoked with each new value (and typically immediately with the current value).
Returns
A disposer that unsubscribes, or null if unsubscription is not supported.
():
void
Returns
void