Closed acrazing closed 7 years ago
Allow user to set new value like follow:
class A { constructor() { this.data = 'A'; } @autobind noop() { return this.data; } } const a = new A(); a.noop = function noop () { return this.data; }; const noop = a.noop; noop(); a.noop = function noop2 () { return this.data; }; const noop2 = a.noop; noop2();
Please note that the new method bind setter/getter to the field, may cause some performance loss.
I made 98968ee based on this. Please try it out :)
Allow user to set new value like follow:
Please note that the new method bind setter/getter to the field, may cause some performance loss.