Last active
August 29, 2015 14:25
-
-
Save msssk/9d853bf2b1180a236e43 to your computer and use it in GitHub Desktop.
Adding ES5 accessors to a declared class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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