Type error in template when using dynamic CSS Modules keys in :class (A computed property name must be of type 'string', 'number', 'symbol', or 'any') #5507
Unanswered
shatovkin-ivan
asked this question in
Q&A
Replies: 1 comment
-
See nuxt/nuxt#32552. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm encountering a type error in my IDE (VSCode with Vue(Official)) when using dynamic class names with CSS Modules in Vue SFC templates.
The project is built on Nuxt and Typescript. This issue is reproducible throughout the project for the entire team across different IDEs where the Vue extension is enabled (VS Code, Cursor, WebStorm, PhpStorm), while the error does not occur at runtime. If a ternary expression or computed properties are used, everything works correctly, but these solutions are not suitable for the project.
I couldn't find anything that could be configured on the TypeScript or Nuxt side. I would appreciate any help in resolving this issue. Thank you.
Environment:
nuxt: 3.16.1
typescript: 5.8.3
vue(official) plugin: 3.0.1
Beta Was this translation helpful? Give feedback.
All reactions