You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classBase{constructor(){this.built=false}}classDerivedextendsBase{init(){this.built=true}build(){if(this.built){console.log('Nothing to do')}else{console.log('Starting build...')}}}
Expected behavior:
No error and Derived.built: boolean.
Actual behavior: Derived.built: boolean | undefined, causing an error on class Derived: "Class Derived incorrectly extends class Base. Types of property 'built' are incompatible: 'boolean | undefined' =/=> 'boolean'.
Found in webpack, where Base=Module and Derived=NormalModule (and many others).