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.

17 lines
505 B

4 years ago
  1. var setPrototypeOf = require("./setPrototypeOf");
  2. function _inherits(subClass, superClass) {
  3. if (typeof superClass !== "function" && superClass !== null) {
  4. throw new TypeError("Super expression must either be null or a function");
  5. }
  6. subClass.prototype = Object.create(superClass && superClass.prototype, {
  7. constructor: {
  8. value: subClass,
  9. writable: true,
  10. configurable: true
  11. }
  12. });
  13. if (superClass) setPrototypeOf(subClass, superClass);
  14. }
  15. module.exports = _inherits;