Observer -> Observer ¶
function Fusion.Observer(
scope: Scope<unknown>,
watching: unknown
) -> Observer
Constructs and returns a new observer.
Use scoped() method syntax
This function is intended to be accessed as a method on a scope:
local observer = scope:Observer(watching)
Parameters¶
scope : Scope<unknown> ¶
The scope which should be used to store destruction tasks for this object.
watching : unknown ¶
The target that the observer should watch for changes.
Works best with graph objects
While non-graph object values are accepted for compatibility, they won't be able to trigger updates.
Returns -> Observer ¶
A freshly constructed observer.