You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
579 B

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