Access child class' static members from base class

Viewed 2588

I have the following base class:

class BaseClass {
    public static myFlag: boolean = false;

    constructor() {
        //reference ChildClass.myFlag??
    }
}

With the child class:

class ChildClass extends BaseClass {
    constructor() { super(); }
}

And the following code:

ChildClass.myFlag = true;
var child = new ChildClass();

How can I reference the value of the child class' myFlag property without passing the child class to the base class' constructor?

1 Answers
Related