Make ant design vue components Volar global components compatible #848
Answered
by
tangjinzhou
soulsam480
asked this question in
Q&A
-
hii @tangjinzhou @johnsoncodehk , I did this but I'm unable to get intellisense for components import { ComponentPublicInstance } from 'vue';
type Ant = typeof import('ant-design-vue');
type Component = {
new (...args: any[]): ComponentPublicInstance;
};
type AntComponentNames = keyof {
[K in keyof Ant as Ant[K] extends Component ? K : never]: any;
};
type AntComponents = Pick<Ant, AntComponentNames>;
declare module '@vue/runtime-core' {
export interface GlobalComponents extends AntComponents {}
}
export {}; I'm not good at complete TS, can anyone help ? repro https://github.com/soulsam480/mizu |
Beta Was this translation helpful? Give feedback.
Answered by
tangjinzhou
Jan 8, 2022
Replies: 1 comment 2 replies
-
please use [email protected]
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
johnsoncodehk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
please use [email protected]
then add this code to tsConfig file