_create_class.js 705 B

12345678910111213141516171819
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _createClass;
  6. function _createClass(Constructor, protoProps, staticProps) {
  7. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  8. if (staticProps) _defineProperties(Constructor, staticProps);
  9. return Constructor;
  10. }
  11. function _defineProperties(target, props) {
  12. for(var i = 0; i < props.length; i++){
  13. var descriptor = props[i];
  14. descriptor.enumerable = descriptor.enumerable || false;
  15. descriptor.configurable = true;
  16. if ("value" in descriptor) descriptor.writable = true;
  17. Object.defineProperty(target, descriptor.key, descriptor);
  18. }
  19. }