Vue version
3.3.4
Link to minimal reproduction
https://github.com/Disservin/vue-ts-error/tree/unresolvable-type/vue-ts-error
Steps to reproduce
Clone the repository and cd into vue-ts-error
npm run build-only
> test@0.0.0 build-only
> vite build
vite v4.3.9 building for production...
✓ 11 modules transformed.
✓ built in 805ms
[vite:vue] [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type
/Users/user/documents/github/vue-ts-error/src/components/VTest.vue
4 |
5 | <script setup lang="ts">
6 | defineProps<Test>();
| ^^^^
7 | </script>
8 |
file: /Users/user/documents/github/vue-ts-error/src/components/VTest.vue
error during build:
Error: [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type
What is expected?
The build should finish normal and throw no errors.
What is actually happening?
The Test interface cannot be unused for defineProps. You will get
Error: [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type
The current workaround is to explictly import the type and export the interface
VTest.vue
import type { Test } from "@/types/index";
index.d.ts
export interface Test {
name: string;
}
System Info
No response
Any additional comments?
direct link to the component
direct link to the index
Vue version
3.3.4
Link to minimal reproduction
https://github.com/Disservin/vue-ts-error/tree/unresolvable-type/vue-ts-error
Steps to reproduce
Clone the repository and cd into
vue-ts-errorWhat is expected?
The build should finish normal and throw no errors.
What is actually happening?
The
Testinterface cannot be unused fordefineProps. You will getThe current workaround is to explictly import the type and export the interface
VTest.vueindex.d.tsSystem Info
No response
Any additional comments?
direct link to the component
direct link to the index