import { decorateAccessors } from "./mod.ts";
const myObj = {
name: "John",
age: 34,
};
const p = decorateAccessors(myObj, (v) => {
console.log(v); // new value
// do something when setter is called
});
// now you can just assign values and have the call-back triggered
p.age = 9999;
-
Notifications
You must be signed in to change notification settings - Fork 0
Accessor decoration made easier
License
duart38/Accessors
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Accessor decoration made easier
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published