Answer the question
In order to leave comments, you need to log in
Auto generated deep types?
headTabs: {
title: string,
isActive: boolean,
icon: string,
child?: {
title: string,
isActive: boolean,
icon: string,
child?: {
title: string,
isActive: boolean,
icon: string
}[],
}[],
}[] = [
{
title: 'Description',
isActive: true,
icon: 'fas fa-file-alt',
child: [
{
title: 'Videos',
isActive: true,
icon: 'fas fa-file-alt',
child: [
{
title: 'Series',
isActive: true,
...
Answer the question
In order to leave comments, you need to log in
Generate from what? what is a "deep type"? for your example - write a recursive type with your hands from several lines and it will be enough, why generate something here?
type Category = {
title: string
isActive: boolean
icon: string
child?: Category
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question