-
-
Notifications
You must be signed in to change notification settings - Fork 433
Components type inference and highlighting got broken in version 0.40.0 #1711
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
Comments
"error ts7022: 'default' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer." Downgrading to |
I am the same. I appreciate this extension. thank you for always. |
This might not be the exact same issue because mine wasn't fixed by downgrading Volar's version. I had the same problem and thought it was caused by Volar, but it turned out to be caused by the plugin After following the instructions in the last post on the linked issue, intellisense worked again, even with the latest version of Volar. |
Updated the extension version to the recent 0.40.6 and the issue seems to be resolved. @francoism90, @ameryu716 — can you also confirm this, so I can close the issue? |
@jagoncalves14 It indeed seem to fix the issues, many thanks! :) |
Still got similar issue when checks types by components/SingoutAndNavigateLink.vue:1:25 - error TS7022: 'default' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectl
y in its own initializer.
1 <script lang="ts" setup>
2 import { useCookie } from '#imports'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
10 }
~
11 </script>
components/CabinetHeader.vue:1:25 - error TS7022: 'default' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its
own initializer.
1 <script lang="ts" setup>
2 import { IconList } from '@iconify-prerendered/vue-bi'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
13 })
~~
14 </script> |
@cawa-93 it should be a different problem, if you still have this problem with v.0.40.13 or newer, please open an new issue and provide repro case. |
Looks like since Volar 0.40 was released that Components lost highlighting and type inference in my project.
This seems to be happening in versions 0.40.0 and 0.40.1
To confirm this, I rolled back VSCode's Volar plugin to version 0.39.5 and everything came back to work as before.
Example below:
In version 0.39.5 👇

In version 0.40.1 👇

Notes:
Typescript version: 4.7.4
The text was updated successfully, but these errors were encountered: