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
Where do you define T?
Either your interface needs to add is a generic parameter or if these are your props in an SFC you need to add it in the script setup attributes.
Vue - Official extension or vue-tsc version
bundled 243.26053.12
VSCode version
WebStorm 2024.3.5
Vue version
3.4.31
TypeScript version
5.6.3
System Info
package.json dependencies
Steps to reproduce
Made an interface to have my components data typed. As I dont want to type any data property I added
[key: string]: T;
to the type.What is expected?
Shouldn't be an error as it's a generic type
What is actually happening?
Editor shows error:
Vue: Cannot find name T
Link to minimal reproduction
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: