use a interface for defineProps from import
Version
3.2.16
Reproduction link
Steps to reproduce
vue file
<script setup lang="ts">
import { ref } from 'vue'
import { IProp } from './a'
const props = withDefaults(defineProps<IProp>(),{
flag: true
})
const msg = ref('Hello World!')
</script>
<template>
<h1>{{ msg }}</h1>
<input v-model="msg">
</template>
import interface ts file
export interface IProp {
flag?:boolean
}
What is expected?
can use the way import ts file to define the props that defineProps need
What is actually happening?
complier error
duplicate of https://github.com/vuejs/vue-next/issues/4294