mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 04:27:59 +00:00
15 lines
428 B
JavaScript
15 lines
428 B
JavaScript
export default function inherits(child, parent) {
|
|
if (parent) {
|
|
child.super_ = parent;
|
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
child.prototype = Object.create(parent.prototype, {
|
|
constructor: {
|
|
configurable: true,
|
|
enumerable: false,
|
|
value: child,
|
|
writable: true
|
|
}
|
|
});
|
|
}
|
|
}
|