decord/source/5583__inherits.js
2026-08-06 08:05:19 +00:00

25 lines
693 B
JavaScript

// Module ID: 5583
// Function ID: 5584
// Name: _inherits
// Dependencies: [5584]
// Module 5583 (_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(5584) /* _setPrototypeOf */(value, fn);
}
};