Currently, I am working on an interface that has specific properties and function specifications which are implemented by several classes. My objective is to create an array of arrays that contain instances of these classes. However, when I try the following:
array: MyInterface[];
And then attempt to populate it with instances of a class (example with only one class):
array: MyInterface[] = [[new MyClass1(), new MyClass1(), ...], ...];
I encounter an error stating that MyClass1[] is not compatible with MyInterface. Can someone guide me on how to accomplish this in TypeScript? Are there any workarounds available?