-
-
Notifications
You must be signed in to change notification settings - Fork 473
Closed
Labels
Description
Follow the instruction, I added the definition of a global component
import { Component } from 'vue'
interface MyPropTypes {
/**
* document content
*/
p: string
}
declare module 'vue' {
export interface GlobalComponents {
componentName: Component<MyPropTypes>
}
}
export { }
In the vue template, it cannot have correct intellisense hint for this component,
but if I change it to DefineComponent
import { DefineComponent } from 'vue'
declare module 'vue' {
export interface GlobalComponents {
componentName: DefineComponent<MyPropTypes>
}
}
export { }
it works, whereas the code navigation is wrong.
<template>
<my-component :p="xxx" />
</template>
Go to definition not work for p
(it works if I use Component), and it cannot show the document of it.