| 571 | * @returns {void} |
| 572 | */ |
| 573 | const inherits = (constructor, superConstructor, props, descriptors) => { |
| 574 | constructor.prototype = Object.create(superConstructor.prototype, descriptors); |
| 575 | Object.defineProperty(constructor.prototype, 'constructor', { |
| 576 | __proto__: null, |
| 577 | value: constructor, |
| 578 | writable: true, |
| 579 | enumerable: false, |
| 580 | configurable: true, |
| 581 | }); |
| 582 | Object.defineProperty(constructor, 'super', { |
| 583 | __proto__: null, |
| 584 | value: superConstructor.prototype, |
| 585 | }); |
| 586 | props && Object.assign(constructor.prototype, props); |
| 587 | }; |
| 588 | |
| 589 | /** |
| 590 | * Resolve object with deep prototype chain to a flat object |