3👍
Try this:
import { PropType } from "vue";
...
corvees: {
type: Array as PropType<CorveesI[]>
}
Reference: https://v3.vuejs.org/guide/typescript-support.html#annotating-props
3👍
The type
expected in prop definitions are not TypeScript types (as all TS types are compiled away when TS compiler transforms your code to plain JS) but JS runtime types. So only types mention in the above linked docs are valid.
To properly type the prop in TS, you must use PropType<>
– Annotating props
import { PropType } from "vue";
...
corvees: {
type: Array as PropType<CorveesI[]>
}
- [Vuejs]-In Table component, is there a way to use customRender to both set a slot name and a rowSpan
- [Vuejs]-Vuetify – Add loading layer overlay on click event
Source:stackexchange.com