Optional
cleanupOptional cleanup function to be called when the signal is no longer needed.
Retrieves the current value of the signal.
Registers a dependency listener that will be called whenever the signal value changes. Returns a function to unregister the listener.
Sets the signal to a new value, updating all registered dependencies.
Unregisters all previously registered dependency listeners.
Updates the signal value using a callback that receives the old value and returns the new value.
A reactive signal that holds a value of type T and allows for dependency tracking and updates.