21 lines
664 B
JavaScript
21 lines
664 B
JavaScript
|
"use strict";
|
||
|
|
||
|
function _defineProperties(target, props) {
|
||
|
for (var i = 0; i < props.length; i++) {
|
||
|
var descriptor = props[i];
|
||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||
|
descriptor.configurable = true;
|
||
|
|
||
|
if ("value" in descriptor) descriptor.writable = true;
|
||
|
|
||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||
|
}
|
||
|
}
|
||
|
exports._ = exports._create_class = _create_class;
|
||
|
function _create_class(Constructor, protoProps, staticProps) {
|
||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||
|
|
||
|
return Constructor;
|
||
|
}
|