[Typescript]106. Medium - OnPropChangedMethods
type OnPropChangedMethods<T> = {
[Key in keyof T & string as `${Key}Changed`]: (cb: (newValue: T[Key]) => void) => void
}
declare function makeWatchedObject<T>(obj: T): T & OnPropChangedMethods<T>;
let homer = makeWatchedObject({
firstName: "Homer",
age: 33,
location: "Springfield"
})