Built-in Component name color
Zenthae opened this issue ยท 3 comments
Zenthae commented
johnsoncodehk commented
Hi @Zenthae, vue only provide these built-in type but no <component>
: https://github.com/johnsoncodehk/volar/blob/34318d21e78d7688f3411b3fd8e5e5cd7cb4fbc5/packages/vscode-vue-languageservice/src/utils/globalDoc.ts#L44-L48
If color is a problem to you, you can define component
to GlobalComponents interface to patch the problem, see https://github.com/johnsoncodehk/volar#using.
// components.d.ts
declare module '@vue/runtime-core' {
export interface GlobalComponents {
component: (props: { is: Component }) => void
}
}
export { }
Shinigami92 commented
But shouldn't this be fix in Vue itself?
johnsoncodehk commented
But shouldn't this be fix in Vue itself?
These types is not a purpose for IDE type-checking, I just stole it for now.
I think this problem should be resolve by vuejs/core#3399.