I have two classes like so.
class Stuff {
constructor() { }
things: Thing[] = [];
name: string;
}
class Thing {
constructor() { }
active: boolean;
}
I tried to declare a field in my application like this.
blopp: Stuff[] = [
{name: "aa", things: null},
{name: "bb", things: null}];
The above approach works just fine. However, when I try to provide an array of things, instead of null, I get the error that it's not assignable the the type specified.
blopp: Stuff[] = [
{name: "aa", things: [{active: true}, {active: false}]},
{name: "bb", things: null}];