Closed
Description
I think that is useful to access to static members :
- from instances
- from sub classes
Below an example:
class A {
protected static type: string;
public log(): string {
console.log(this.type);
}
}
class B extends A {
protected static type: string = 'C';
}
class C extends A {
protected static type: string = 'C';
}
b = new B();
b.log(); // => 'B'
c = new C();
c.log(); // => 'C'