I just started with Nuxt 3 and have been having some trouble with using typescript functionality.
I am trying to build a general NavBar that can have multiple buttons with different links. For this I wanted to make an interface that I can pass as an array to the component.
Something like:
interface Button {
icon: string,
link: string
}
Is there some way to make interfaces that are visible throughout my whole project? I can't find a lot about typescript integration for Nuxt.
/types
with anindex.ts
that exports every type one by one. This way you can easily include them withimport { type, anotherType, an wholeOtherType } from '~/types'
without too much work. – Crofter