组件B里想要获得组件A的props的ts类型,要怎么获取?
不要export再import 或者提取出去
组件A
<script setup lang="ts">
interface PropsType {
childProp1: number
childProp2: string
childProp3: boolean
}
defineProps<PropsType>()
</script>
组件B
<script setup lang="ts">
import Child from './Child.vue'
type ChildInstance = InstanceType<typeof Child>
</script>
怎么能从Child组件上获取它属性的ts类型