I have an interface that contains a property which is an array containing 2 different possible object types:
<Type>FormerComponent and FormerGenericComponent
Here are my interfaces
interface FormerConfigColumn {
container: ViewContainerRef
components?: Type<FormerComponent>[]|FormerGenericComponent[];
}
interface FormerGenericComponent {
component: Type<FormerComponent>;
}
The above doesn't work the way I would like it to. I think the above defines an array containing only Type<FormerComponent>s or only FormerGenericComponents
I want FormerConfigColumn.components to contain an array of objects, and said objects can either be Type<FormerComponent> or FormerGenericComponent.
How can I do this?
Thanks!
TypeandFormerComponentis