I am having a really hard time understanding how i define arrays containing different amount of different types/interfaces.
Lets say i have the three interfaces with some properties (i use these to initialize my objects let int_a: IntA = { ... }):
interface IntA { ... some properties ... };
interface IntB { ... some properties ... };
interface IntC { ... some properties ... };
I want to store an unknown amount of these in an array/map (my_array = [int_a, int_b, int_a, int_c, int_b, ... ]):
interface Container {
my_array: Array<MyType>
}
What is the type MyType suppose to be equal to? Is it [intA|IntB|IntC][] or IntA[]|IntB[]|IntC[] or [IntA[]|IntB[]|IntC[]][]? or something completely else? Here i ask a specific question, but i would love and appreciate alot an elaborate answer around defining array containing custom types/interfaces.