The type of the value stored within the variable.
Creates an instance of a WebaniVariable with an optional value. If the value is a function, it sets the value based on the result of that function, and prevents further value changes directly.
The initial value for the variable. This can either be a value of type T, or a function returning a value of type T.
StaticlogFlag indicating whether variable reads should be logged (static).
StaticreadLogs for tracking variable reads (static).
Sets the raw value of the variable and updates any nested objects if the value is an object.
The raw value to set for the variable.
Sets the value of the variable from the parent and triggers the associated change handlers.
The value to set from the parent.
Sets the value of the variable from within itself and triggers the associated change handlers.
The value to set from within the variable.
Registers change handlers to be called when the value of the variable is set from the parent.
The change handlers to be called when the value is set from the parent.
Registers change handlers to be called when the value of the variable is set internally (from the variable itself).
The change handlers to be called when the value is set from within the variable.
StaticstartStarts logging variable reads. This function allows tracking of which variables are being read.
StaticstopStops logging variable reads. This disables tracking of read operations.
StaticvalueRegisters a variable for logging if variable reads are enabled (static).
The WebaniVariable instance to track.
WebaniVariableis a class that represents a variable that can be set and reacted to by different change handlers. It can handle changes both from its own internal mechanism (onValueSetFromSelf) and from external sources (parent variables).The value of the
WebaniVariablecan be either set directly or derived from a function. This class supports the monitoring of changes in the variable's value and allows for callbacks to be executed when the value changes.