the instance which property.
the name of the changed property.
import {declare, notifyChange} from "apprt-core/Mutable";
const globalCounter = 0;
let Clazz = declare({
counter: {
get() {
return globalCounter;
}
}
});
let instance = new Clazz();
instance.watch("counter",({value})=>{
console.log("count:"+value);
})
// ensure that external counter can be watched
globalCounter++;
notifyChange(instance,"counter");
//-> count: 1
Generated using TypeDoc
Helper to trigger custom change notification.