Skip to content
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

Vue 2.7 components.d.ts module augmentation #463

Closed
jfrs opened this issue Jul 16, 2022 · 4 comments · Fixed by #529
Closed

Vue 2.7 components.d.ts module augmentation #463

jfrs opened this issue Jul 16, 2022 · 4 comments · Fixed by #529

Comments

@jfrs
Copy link

jfrs commented Jul 16, 2022

Vue 2.7 no longer needs @vue/runtime-core, which means that the generated components.d.ts isn't recognised by Volar.

I've replaced

import '@vue/runtime-core'

export {}

declare module '@vue/runtime-core' {

with

export {}

declare module 'vue' {

and that fixes the issue.

I don't know if we can autodetect the version, otherwise maybe an option to override the module used here?

@liwangyong
Copy link

me too

@TylerOliver
Copy link

This issue causes type inference to fail in Vue 2.7

@TylerOliver
Copy link

Is there something I can provide to help this get worked on? Type inference is totally broken in Vue 2.7 without manually editing the generated file.

@VividLemon
Copy link
Contributor

Using option 2.7 seemingly had no affect for me. The process did not work correctly. Pushing the option back to '2', from '2.7', had no affect either. I was only able to get it to function properly by explicitly adding @vue/runtime-core & pushing back to the 2 option. Otherwise volar was not able to infer the types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants