import extend from './extend.js'; import type { Writable } from './extend.js'; type Constructor = new (...args: never[]) => unknown; export default function( child: C, parent: P, members?: object ): object { const proto = (child.prototype = Object.create(parent.prototype)); Object.defineProperty(proto, 'constructor', { value: child, writable: true, enumerable: true, configurable: true }); return extend(proto, members as Writable); }