32. 타입에러 해결하기 : does not exist on type {}...

random-olive·2023년 3월 24일
0
TS2339: Property 'list1' does not exist on type '{ title: string; href: string; list1: { item1: string; }[]; list2: { item2: string; }[]; } | { title: string; href: string; }'.
  Property 'list1' does not exist on type '{ title: string; href: string; }'.
    68 |               setSelected({
    69 |                 menu: el.title,
  > 70 |                 list1: el.list1,
       |                           ^^^^^
    71 |                 // list2: el.list2,
    72 |                 idx1: idx,
    73 |               });
profile
Doubts kills more dreams than failure ever will

0개의 댓글