decord/source/5662__inherits.js
2026-08-08 06:10:11 +00:00

25 lines
693 B
JavaScript

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