inherits.js 666 B

123456789101112131415161718192021
  1. var _Object$create = require("@babel/runtime-corejs3/core-js/object/create");
  2. var setPrototypeOf = require("./setPrototypeOf.js");
  3. function _inherits(subClass, superClass) {
  4. if (typeof superClass !== "function" && superClass !== null) {
  5. throw new TypeError("Super expression must either be null or a function");
  6. }
  7. subClass.prototype = _Object$create(superClass && superClass.prototype, {
  8. constructor: {
  9. value: subClass,
  10. writable: true,
  11. configurable: true
  12. }
  13. });
  14. if (superClass) setPrototypeOf(subClass, superClass);
  15. }
  16. module.exports = _inherits;
  17. module.exports["default"] = module.exports, module.exports.__esModule = true;