source: node_modules/@babel/runtime-corejs3/helpers/esm/inherits.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 721 bytes
Line 
1import _Object$create from "core-js-pure/features/object/create.js";
2import _Object$defineProperty from "core-js-pure/features/object/define-property.js";
3import setPrototypeOf from "./setPrototypeOf.js";
4export default function _inherits(subClass, superClass) {
5 if (typeof superClass !== "function" && superClass !== null) {
6 throw new TypeError("Super expression must either be null or a function");
7 }
8 subClass.prototype = _Object$create(superClass && superClass.prototype, {
9 constructor: {
10 value: subClass,
11 writable: true,
12 configurable: true
13 }
14 });
15 _Object$defineProperty(subClass, "prototype", {
16 writable: false
17 });
18 if (superClass) setPrototypeOf(subClass, superClass);
19}
Note: See TracBrowser for help on using the repository browser.