I can successfully declare a nested class like this:
class Outer {
static Inner = class Inner {
};
}
However, I would like my outer class to hold some instances of my inner class:
class Outer {
constructor() {
this.inners = [new Outer.Inner()];
}
static Inner = class Inner {
};
inners: Array<Inner>; // this line errors
}
But this gives me error TS2304: Cannot find name 'Inner'
.
How can I make this work?