New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support component TS type resolving in Volar context #53
Comments
Tracking volarjs/volar.js#85 Waiting for stable API from Volar 2.0 |
We should collect props and slots definition from Vine function component and convert them into pure TS files |
Sounds good! So what is the actual form/struct/content in those pure TS files? // _VINE_VLS.virtual.ts ??
interface _Comp1_Props_ {
// ...
}
interface _Comp1_Slots {
// ...
}
interface _Comp1_Emits {
// ...
} You mean something like this ?? |
Yes! And then we can convert Vine component function into such code: export default defineComponent({
props: {} as _Comp1_Props,
slots: {} as _Comp1_Slots,
emits: {} as _Comp1_Emits,
}) |
So you mean I need to write a complete process of this generation by myself manually or just provide these enough data for Volar new API?🥹🥰😜 |
Not sure if volar provides such function 🥹 |
Purpose
Make Vue Vine become usage compatible with Vue SFC
i.e. user can import the components that export from
.vine.ts
in.vue
file, and no type issues.This issue may need Volar 2.0 TS Plugin's help.
We need to implicitly convert the "Vine component function" type to a "Vue component" object's type, based on information like props, emits and so on ...
I'd be so appreciated if @johnsoncodehk could provide some information about it. Thanks ❤️ !
The text was updated successfully, but these errors were encountered: