inherits.js 715 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _inherits;
  6. var _setPrototypeOf = require("./setPrototypeOf.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. Object.defineProperty(subClass, "prototype", {
  19. writable: false
  20. });
  21. if (superClass) (0, _setPrototypeOf.default)(subClass, superClass);
  22. }
  23. //# sourceMappingURL=inherits.js.map