Props typing in Vue.js 3 with TypeScript
问题 I'm trying to type hint my props in a Vue 3 component, with composition API. So, I'm doing this: <script lang="ts"> import FlashInterface from '@/interfaces/FlashInterface'; import { ref } from 'vue'; import { useStore } from 'vuex'; export default { props: { message: { type: FlashInterface, required: true } }, setup(props): Record<string, unknown> { // Stuff } }; My FlashInterface looks like this: export default interface FlashInterface { level: string, message: string, id?: string } This