Release 0.40.1 breaks typescript compatibility on script setup
See original GitHub issueThis morning’s release breaks the typescript/tslint’s compatibility on <script lang='ts' setup>
.
More specifically the following error is triggered:
'default' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.ts(7022)
As you may see it only happens in <script>
and does not extend outside it.

Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:29 (1 by maintainers)
Top Results From Across the Web
Releases - ImmyDocs
This issue was causing all scripts that relied on AzureAD commands to fail. Fixed an issue where syncing the connected state of large...
Read more >Import statements breaks script setup Nuxtjs 3 - Stack Overflow
The moment I comment the import statement, the myName ref seems to work again. What I use: VS Code; Nuxtjs 3; Tailwind CSS;...
Read more >Vue Language Features (Volar) - Visual Studio Marketplace
Launch VS Code Quick Open ( Ctrl+P ), paste the following command, and press enter. ... to implement native TypeScript language service level...
Read more >@vue/composition-api - npm
@vue/composition-api · Installation · TypeScript Support · SSR · Browser Compatibility · Limitations · Keywords.
Read more >Prettier 1.19: Long awaited Vue option, TypeScript 3.7 and ...
This release adds the long awaited --vue-indent-script-and-style option, ... Prettier installed from npm stays compatible with Node.js 4.) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In my case downgrading to 0.39.5 solved it.
Edit: I have experiencied many issues arround my code after update to 0.40+ (my components, vue imports, etc), after change to 0.39.5 they have been gone.
I experienced the same issue, when having circular references between components.
Here is a minimal reproducible example. (literally just
npm init vue@latest
with minimal features and only two components)Steps to reproduce:
src/components/A.vue
orsrc/components/B.vue
in VS Code with Volar version 0.40.1Hope it helps!