createClass.js 904 B

123456789101112131415161718192021222324252627
  1. "use strict";
  2. exports.__esModule = true;
  3. var _defineProperty = require("../core-js/object/define-property");
  4. var _defineProperty2 = _interopRequireDefault(_defineProperty);
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6. exports.default = function () {
  7. function defineProperties(target, props) {
  8. for (var i = 0; i < props.length; i++) {
  9. var descriptor = props[i];
  10. descriptor.enumerable = descriptor.enumerable || false;
  11. descriptor.configurable = true;
  12. if ("value" in descriptor) descriptor.writable = true;
  13. (0, _defineProperty2.default)(target, descriptor.key, descriptor);
  14. }
  15. }
  16. return function (Constructor, protoProps, staticProps) {
  17. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  18. if (staticProps) defineProperties(Constructor, staticProps);
  19. return Constructor;
  20. };
  21. }();