Enviroments & packages:
- VS Code: 1.77.3
- Volar: 1.6.3
- vue-tsc: 1.6.3
- vue: 3.2.47
- typescript: 5.0.4
Description
Actually I'm using unplugin-vue-components/vite to generate dts file:
// src/components.d.ts
export {};
declare module '@vue/runtime-core' {
export interface GlobalComponents {
MyUpload: typeof import('./components/MyUpload/index.vue')['default'];
}
}
The type of component we obtain is any:

However, when we change '@vue/runtime-core' to 'vue', the type hinting works correctly:
- declare module '@vue/runtime-core' {
+ declare module 'vue' {
