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
When I generate TypeScript definitions for this SCSS module, it also generate types for all the 4000+ Vuetify classes imported with @use "vuetify/styles":
The way this tool works is it compiles with sass and determines which classes are defined after the fact.
One solution would be to provide a custom importer that returns an empty file for certain sass imports.
This will work but I think its error prone because you'll have to maintain an explicit list of the imports you want to omit, and if your file has an hard dependency on any imported values, it cause a build error.
My recommendation is to accept the lost of type specificity here, or do a manual Omit with ts on your code.
This should allow you to check for this specific import and return nothing, but could lead to other issues.
The special comment is interesting, but I'm guessing it could lead to complexity implementing/supporting it that would likely be a customer importer under-the-hood.
I'm using the Vuetify library which ships with a lot of utility classes. I'm
@extend
some of these classes in my own classes, e.g.:When I generate TypeScript definitions for this SCSS module, it also generate types for all the 4000+ Vuetify classes imported with
@use "vuetify/styles"
:Is there a way to make
typed-scss-modules
generate TypeScript definitions for my own classes only?The text was updated successfully, but these errors were encountered: