decord/source/18__inherits.js

27 lines
713 B
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 18
// Function ID: 258
// Name: _inherits
2026-07-23 10:11:24 +00:00
// Dependencies: [19]
2026-07-20 16:05:17 +00:00
// 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;
}
2026-07-23 10:11:24 +00:00
const obj = { value, writable: true, configurable: true };
2026-07-22 07:54:56 +00:00
value.prototype = Object.create(prototype, { constructor: obj });
2026-07-20 16:05:17 +00:00
Object.defineProperty(value, "prototype", { writable: false });
if (arg1) {
2026-07-23 10:11:24 +00:00
require(19) /* _setPrototypeOf */(value, arg1);
2026-07-20 16:05:17 +00:00
}
};