TypeScript Version: 3.7.2
Search Terms:
typescript property access super undefined
Code
classBase{n=3}classFooextendsBase{test(){console.log(super.n)// type system says it should be a number, but it is undefined}}newFoo().test()// logs "undefined"Expected behavior:
Should be some sort of type error, because clearly it is undefined
Actual behavior:
no error until runtime
Playground Link
TypeScript Version: 3.7.2
Search Terms:
typescript property access super undefined
Code
Expected behavior:
Should be some sort of type error, because clearly it is undefined
Actual behavior:
no error until runtime
Playground Link