createClass.js 674 B

123456789101112131415161718
  1. import _Object$defineProperty from "@babel/runtime-corejs3/core-js/object/define-property";
  2. function _defineProperties(target, props) {
  3. for (var i = 0; i < props.length; i++) {
  4. var descriptor = props[i];
  5. descriptor.enumerable = descriptor.enumerable || false;
  6. descriptor.configurable = true;
  7. if ("value" in descriptor) descriptor.writable = true;
  8. _Object$defineProperty(target, descriptor.key, descriptor);
  9. }
  10. }
  11. export default function _createClass(Constructor, protoProps, staticProps) {
  12. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  13. if (staticProps) _defineProperties(Constructor, staticProps);
  14. return Constructor;
  15. }