I'm struggling to figure out the issue with itemsNav.
<script setup lang="ts">
import { ref } from 'vue'
import { list } from '../../constants/NAV';
const itemsNav = ref(list)
</script>
<li
v-for="item of itemsNav"
:key="item.id"
>
{{ item.label }}
</li>
interface NavList {
id?: number,
label?: string,
link?: string,
}
export const list: NavList[] = [
{id: 1, label: 'худшие компании', link: '#'},
{id: 2, label: 'новости', link: '#'},
{id: 3, label: 'о проекте', link: '#'},
]
I've noticed an issue with NAV.ts. I even tried simplifying it to just const nav = [1, 2, 3] but that didn't resolve the problem either
I searched for solutions in other similar threads, but couldn't find the right one. It appears that TypeScript may have introduced a new validation in their latest update