add classProps declaration to simplify/nicen up class property defining - closes #88
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = function() {
|
||||
var Test = function Test() {};
|
||||
|
||||
Object.defineProperties(Test.prototype, {
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
writable: true,
|
||||
|
||||
@@ -14,4 +19,4 @@ var Test = function() {
|
||||
});
|
||||
|
||||
return Test;
|
||||
}();
|
||||
}();
|
||||
|
||||
Reference in New Issue
Block a user