* Setups up prototype inheritance * * @param {!SUPER} superClass * @param {!SUB} subClass * @template SUPER * @template SUB
(superClass, subClass)
| 794 | * @template SUB |
| 795 | */ |
| 796 | function subClass(superClass, subClass) { |
| 797 | // Object.getOwnPropertyDescriptor(superClass.prototype, 'constructor') |
| 798 | // {value: ƒ, writable: true, enumerable: false, configurable: true} |
| 799 | subClass.prototype = Object.create(superClass.prototype, { |
| 800 | constructor: { |
| 801 | // enumerable: false, |
| 802 | configurable: true, |
| 803 | writable: true, |
| 804 | value: subClass, |
| 805 | }, |
| 806 | }); |
| 807 | setPrototypeOf(subClass, superClass); |
| 808 | } |
| 809 | |
| 810 | /** |
| 811 | * Tests whether setting '__proto__' will change the prototype chain of an |
no test coverage detected