Answer the question
In order to leave comments, you need to log in
How to specify types for an array in which an array, etc.?
for example
arr1: [
{
arr1info: [
{
arr1infocontent: "апвапва",
arr1infoheading: "апвапва"
},
{
arr1infocontent: "апвапва",
arr1infoheading: "апвапва"
},
"foobar"
],
arr1infoheading: "апвапва"
},
{
arr1info: [
{
arr1infocontent: "апвапва",
arr1infoheading: "апвапва"
},
{
arr1infocontent: "апвапва",
arr1infoheading: "апвапва"
},
"foobar"
],
arr1infoheading: "апвапва"
}
]
Answer the question
In order to leave comments, you need to log in
interface Iarr2Info {[key: string]: string; }
type Info = (Iarr2Info|string)[];
interface Iarr1Info {[key: string]: string|Info; }
let arr1: Iarr1Info[] = [
{
arr1info: [
{
arr1infocontent: "апвапва",
arr1infoheading: "апвапва"
},
{
arr1infocontent: "апвапва",
arr1infoheading: "апвапва"
},
"foobar"
],
arr1infoheading: "апвапва"
},
{
arr1info: [
{
arr1infocontent: "апвапва",
arr1infoheading: "апвапва"
},
{
arr1infocontent: "апвапва",
arr1infoheading: "апвапва"
},
"foobar"
],
arr1infoheading: "апвапва"
}
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question