G
G
Ghoulll2019-12-25 16:16:39
typescript
Ghoulll, 2019-12-25 16:16:39

How to write an interface correctly?

Tell me how to write an interface to this array?

items = [
    {
      label: '123',
      icon: 'fa fa-newspaper-o',
      classTree: 'treeview',
      trees: [
        {
          treeLabel: '123',
          treeLink: ['/cabinet/documents/waybills'],
          treeIcon: 'fa fa-file-o',
        },
      ],
    },
   ]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sashqa, 2019-12-25
@Ghoulll

interface Items {
    label: string;
    icon: string;
    classTree: string;
    trees: {
        [index: number]: {
            treeLabel: string;
            treeLink: [];
            treeIcon: string;
        }
    }
}

let itemsArr: Items[] =

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question