Optional$parent
Optional$scopename
Broadcasts an event downward through the scope hierarchy.
Emits an event upward through the scope hierarchy.
Searches this scope tree for a scope with the given id.
Merges enumerable properties from the provided object into the current scope target.
Registers an event listener on this scope and returns a deregistration function.
Searches the scope tree for a scope registered under the provided name.
Registers a watcher for a property along with a listener function. The listener function is invoked when changes to that property are detected.
An expression to be watched in the context of this model.
OptionallistenerFn:
(newValue?:
unknown,
originalTarget?:
object)
=>
void
A function to execute when changes are detected on watched context.
Optionallazy:
boolean
= false
A flag to indicate if the listener should be invoked immediately. Defaults to false.
A function to deregister the watcher, or undefined if no listener function is provided.
The target object.
The name of the property being deleted.
Intercepts property access on the target object. It
checks for specific properties (watch and
sync) and binds their methods. For other
properties, it returns the value directly.
The target object.
The name of the property being accessed.
The proxy object being invoked.
The value of the property or a method if accessing
watch or sync.
Intercepts and handles property assignments on the target object. Scopeable objects are stored as raw model values and proxied lazily when read.
The target object.
The name of the property being set.
The new value being assigned to the property.
The proxy intercepting property access.
Returns true to indicate success of the operation.
Scope class for the Proxy. It intercepts operations like property access (get) and property setting (set), and adds support for deep change tracking and observer-like behavior.