extends - Typescript - How to access base class properties -
i know there others questions subject, issue not same them : checked class , use same way them. extends class class b, , can't access public properties in b. here (simplified) code :
export class { propertya: string; constructor() { this.propertya = "some text"; } }
import {a} "./a"; export class b extends { constructor() { super(); } static method() { console.log(this.propertya); } }
you cannot access this
static method. remove static
, should work.
Comments
Post a Comment