aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@babel/runtime/helpers/es6/inherits.js
blob: a102420470a1ae82f4665d9313e92f2bc52dedfb (plain)
1
2
3
4
5
6
7
8
9
import setPrototypeOf from "./setPrototypeOf";
export default function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function");
  }

  setPrototypeOf(subClass.prototype, superClass && superClass.prototype);
  if (superClass) setPrototypeOf(subClass, superClass);
}