I am using Vuetify and Inertia, with Typescript.
I need to pass shared data to the items prop of a vuetify AutoComplete component :
<v-autocomplete :items="$page.props.countries"></v-autocomplete>
But TS tells me :
Type unknown is not assignable to type readonly any[] | undefined
The countries
list is an array of objects.
How can I type it correctly ?
Thanks
Supplying types in the template is done with the as
keyword
<v-autocomplete :items="($page.props.countries as any[])">