unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.77k stars 349 forks source link

[Resolved] Typescript 5.1 has broken this plugin.(Volar needs to be updated to version 1.7.12 and above) #641

Closed lvzhenbo closed 1 year ago

lvzhenbo commented 1 year ago

Describe the bug

Today, I updated VSC to 1.79. As I am using the built-in version of TS for VSC, version 5.1.3, I found that the TS type inference of the plugin is invalid. Then when I switched to TS with built-in version 5.0.4 of the project, everything returned to normal v5.1.3 image v5.0.4 image

Reproduction

https://github.com/lvzhenbo/legado-web

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
    Memory: 1.32 GB / 7.91 GB
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1778.0), Chromium (114.0.1823.41)
    Internet Explorer: 11.0.22621.1

Used Package Manager

pnpm

Validations

ywenhao commented 1 year ago

image image

TrueNine commented 1 year ago

same issue

gustavotoyota commented 1 year ago

Same here, changing Typescript to 4.8.3 solved for me.

JaavierR commented 1 year ago

image image

Im facing the same issue here, but if I do what the image shows above it works again in typescript 5.1.3.

ywenhao commented 1 year ago

you can change the vscode typescript 5.0.4 image image

manmen-mi commented 1 year ago

It looks Vue Language Features (Volar) extension's problem, see https://github.com/vuejs/language-tools/pull/3277 . (and extention has been updated today)

lvzhenbo commented 1 year ago

It looks Vue Language Features (Volar) extension's problem, see vuejs/language-tools#3277 . (and extention has been updated today)

After testing, it is indeed volar's ts compatibility problem, but the version has not been officially released, need to switch to the pre-release version image

so1ve commented 1 year ago

If this problem has been resolved, please close this issue 😄