How do you access properties of base class in Typescript?
use this
rather than super
:
class A { // Setting this to private will cause class B to have a compile error public x: string = 'a';}class B extends A { // constructor(){super();} method():string { return this.x; }}var b:B = new B();alert(b.method());