decord/source/5396__inherits.js

27 lines
723 B
JavaScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 5396
2026-07-27 11:26:19 +00:00
// Function ID: 46245
2026-07-20 16:05:17 +00:00
// Name: _inherits
2026-07-23 10:11:24 +00:00
// Dependencies: [5397]
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
// Module 5396 (_inherits)
2026-07-20 16:05:17 +00:00
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(5397) /* _setPrototypeOf */(value, arg1);
2026-07-20 16:05:17 +00:00
}
};