decord/source/18__inherits.js
2026-07-23 10:11:24 +00:00

26 lines
713 B
JavaScript

// Module ID: 18
// Function ID: 258
// Name: _inherits
// Dependencies: [19]
// Module 18 (_inherits)
export default function _inherits(value) {
if ("function" !== typeof arg1) {
if (null !== arg1) {
const _TypeError = TypeError;
const typeError = new TypeError("Super expression must either be null or a function");
throw typeError;
}
}
let prototype = arg1;
if (arg1) {
prototype = arg1.prototype;
}
const obj = { value, writable: true, configurable: true };
value.prototype = Object.create(prototype, { constructor: obj });
Object.defineProperty(value, "prototype", { writable: false });
if (arg1) {
require(19) /* _setPrototypeOf */(value, arg1);
}
};