One feature I understand is setting getters and setters for individual properties.
export class Person {
private _name: string;
set name(value) {
this._name = value;
}
get name() {
return this._name;
}
}
Is there a way to implement a "global instance-wide" setter that automatically triggers whenever any property of a class instance is modified? Without having to manually add function calls in each getter/setter to invoke that trigger function? Is there something like this already integrated into TypeScript?
Thank you in advance.