_inherits.js 788 B

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _inherits;
  6. var _setPrototypeOfMjs = _interopRequireDefault(require("./_set_prototype_of.js"));
  7. function _inherits(subClass, superClass) {
  8. if (typeof superClass !== "function" && superClass !== null) {
  9. throw new TypeError("Super expression must either be null or a function");
  10. }
  11. subClass.prototype = Object.create(superClass && superClass.prototype, {
  12. constructor: {
  13. value: subClass,
  14. writable: true,
  15. configurable: true
  16. }
  17. });
  18. if (superClass) (0, _setPrototypeOfMjs).default(subClass, superClass);
  19. }
  20. function _interopRequireDefault(obj) {
  21. return obj && obj.__esModule ? obj : {
  22. default: obj
  23. };
  24. }