I need to create an interface that permit to have an array of objects and strings.
For example:
const array = [
'',
{id: '', labels: ['']}
]
I've tried with:
export interface Obj{
id: string;
label: string[];
}
export interface Objs extends Array<Obj> {
}
But this don't permit strings so this return an error:
const array: Objs = [
'',
{id: '', labels: ['']}
]