Skip to content

Instantly share code, notes, and snippets.

@msssk
Last active August 29, 2015 14:25
Show Gist options
  • Save msssk/9d853bf2b1180a236e43 to your computer and use it in GitHub Desktop.
Save msssk/9d853bf2b1180a236e43 to your computer and use it in GitHub Desktop.
Adding ES5 accessors to a declared class
var MyGrid = declare([OnDemandGrid, Selector]);
Object.defineProperty(MyGrid.prototype, {
collection: {
get: function () {
return this._collection;
},
set: function (value) {
this._collection = value;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment