You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile component incl. template with TypeScript (vue-tsc --noEmit)
What is expected?
Vue allows using a symbol as a v-for :key. This is very useful in some situations, since symbols are an automatically unique primitive. I would expect the typing of v-for :key to include symbol.
What is actually happening?
The code works at runtime, but the type checking step complains that the provided v-for :key is not string | number | undefined.
Symbols have been officially supported as a v-for :key since Vue 2.5. For some reason, the typing (but not the functionality) regressed with Vue 3.0.
We noticed this bug after switching from Vue-cli to Vite, since Vite supports TypeScript in templates out-of-the-box.
The text was updated successfully, but these errors were encountered:
Version
3.2.0-beta.7
Reproduction link
Reproduction link
Steps to reproduce
What is expected?
Vue allows using a symbol as a v-for :key. This is very useful in some situations, since symbols are an automatically unique primitive. I would expect the typing of v-for :key to include symbol.
What is actually happening?
The code works at runtime, but the type checking step complains that the provided v-for :key is not string | number | undefined.
Symbols have been officially supported as a v-for :key since Vue 2.5. For some reason, the typing (but not the functionality) regressed with Vue 3.0.
We noticed this bug after switching from Vue-cli to Vite, since Vite supports TypeScript in templates out-of-the-box.
The text was updated successfully, but these errors were encountered: