Creates a computed trigger object whose value is calculated by the given function or get accessor.
Type of the computed value.
Function, method or get accessor that produces the computed value.
Optional this
value to use when invoking the computing function.
Trigger object that will trigger changes only when the computed value changes.
Creates a trigger object of the given depth with the given initial value. Triggers fire events when their value changes. They also work in conjunction with watchers (see createWatcher) and notify watchers when the trigger's value is read.
The depth
parameter determines how many levels of nested properties of arrays, maps, sets and
objects should trigger read and write events. If the depth is 0, changing nested
properties doesn't cause the trigger to fire - only changing the property itself does. If the
depth is undefined, arrays, objects, maps and sets get the depth of 1, meaning that operations
that add or remove items will trigger events, but modifications to the items will not.
The depth
parameter is ignored for primitive types.
Type of the trigger value.
Optional initial value
Depth of the trigger, which determines how many levels of nested properties of arrays, maps, sets and objects should trigger changes. Ignored for primitive types.
ITrigger through which the value can be set and retrieved.
Creates a watcher function with the same signature as the given regular function. When the watcher function is invoked it invokes the original function and it notices all trigger objects that were read during its execution. When any of these trigger objects have their values changed, the responder function will be called.
Type (signature) of the function to be watched.
Function to be watched
Function to be invoked when values of the trigger objects encountered during the original function's last execution change.
Optional value of "this" that will be used to call the original function.
Optional value of "this" that will be used to call the responder function. If this value is undefined, the "this" value for the original function will be used.
The callable IWatcher interface, which represent a function with the same sigature
as the original function. In addition, the returned function has the dispose
method, which
must be called when the watcher is not needed anymore.
Increments mutation scope reference count
Decrements mutation scope reference count. If it reaches zero, notifies all deferred watchers.
Decorator function for defining properties so that changing their value will any watcher
objects attached to them to respond.
The form @trigger
designates a default trigger decorator, whose depth will be assigned
depending on the value type: Shallow for arrays, maps and sets and Deep for objects.
The form @trigger(n)
designates a trigger decorator factory with the specified depth.
Decorator function for defining "get" properties or functions retuning a value so that this value will automatically recalculated if any triggers on which this value depends have their values changed. WHen this happens, the watcher objects attached to this computed value will be notified to respond.