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

Type issue with the value ref of useAsyncData #27220

Closed
paranoidPhantom opened this issue May 14, 2024 · 4 comments
Closed

Type issue with the value ref of useAsyncData #27220

paranoidPhantom opened this issue May 14, 2024 · 4 comments

Comments

@paranoidPhantom
Copy link

paranoidPhantom commented May 14, 2024

Environment


  • Operating System: Windows_NT
  • Node Version: v20.13.1
  • Nuxt Version: 3.11.1
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.4
  • Package Manager: bun@1.1.8
  • Builder: -
  • User Config: devtools, modules, primevue, supabase, ssr
  • Runtime Modules: nuxt-primevue@0.3.1, @nuxtjs/supabase@1.2.2
  • Build Modules: -

Reproduction

Link

Describe the bug

When destructuring { data } from useAsyncData and using it in v-for, typescript suggests using data.value instead of just data.
It happens in my editor but not the reproduction and I don't know why.
image
image

Additional context

No response

Logs

No response

@paranoidPhantom paranoidPhantom changed the title Type issue with the output of useAsyncData Type issue with the value ref of useAsyncData May 14, 2024
@DamianGlowala
Copy link
Member

DamianGlowala commented May 14, 2024

Which version of the Vue - Official extension are you using (if you do)?

@paranoidPhantom
Copy link
Author

Which version of the Vue - Official extension are you using (if you do)?

How would I check this?

@xMorthi
Copy link

xMorthi commented May 23, 2024

@paranoidPhantom Simply go to extensions tab -> find Vue - Official and on the top, next to the name you should have version which is currently in use

Screenshot 2024-05-23 at 10 53 37

@danielroe
Copy link
Member

Yes, this will be an issue with the Vue IDE plugin rather than Nuxt's types. (Sometimes this happens when you have multiple Vue versions installed, which you can debug with pnpm why vue.)

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants