nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
54.31k stars 4.97k forks source link

Autoimport useTemplateRef TS #28957

Closed tandler5 closed 2 weeks ago

tandler5 commented 3 weeks ago

Environment

Nuxt 3.13.0 with Nitro 2.9.7

Reproduction

https://codesandbox.io/p/devbox/github/nuxt/starter/tree/v3?embed=1&file=%2Fapp.vue

Describe the bug

useTemplateRef is imported but the editor does not know about it (types etc..)

Additional context

No response

Logs

No response

manniL commented 3 weeks ago

Make sure you have the latest unimport version (3.12.0 or later). This was added @ https://github.com/unjs/unimport/pull/370

danielroe commented 2 weeks ago

You need to have Nuxt v3.13.1+.

The auto-import of useTemplateRef was added in that version via https://github.com/nuxt/nuxt/pull/28285.