[Vue warn]: Invalid prop: type check failed for prop "myprop". Expected MyType, got Object #9964
Answered
by
sadeghbarati
Parilar
asked this question in
Help/Questions
-
I use Vuejs 3 with Composition API and typescript. Anny advice fixing this? |
Beta Was this translation helpful? Give feedback.
Answered by
sadeghbarati
Jan 1, 2024
Replies: 1 comment 1 reply
-
https://vuejs.org/api/utility-types#proptype-t import type { PropType } from 'vue'
const props = defineProps({ file: {type: Object as PropType<MyType>, required: true} }) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Parilar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://vuejs.org/api/utility-types#proptype-t