Type-only defineProps does not recognize Promise
Link to minimal reproduction
Steps to reproduce
On component, defineProps with Promise :
<script lang="ts" setup>
defineProps<{
data: unknown[]|Promise<unknown[]>
}>();
</script>
Use this component to bind data property with Promise, type check warning is emitted.
What is expected?
no warning
What is actually happening?
[Vue warn]: Invalid prop: type check failed for prop "data". Expected Null | Array, got Promise
System Info
No response
Any additional comments?
Problem exists on compiler-sfc/src/compileScript.ts inferRuntimeType() function. Adding 'Promise' on TSTypeReference typename.name switch statement, this bug will fixed.