Recent versions of `vue-tsc` show "declared but never read" errors (variables used in styles)
See original GitHub issueWith the latest versions of vue-tsc
, I’m seeing errors like this:
src/app/core/layouts/default.vue:302:7 - error TS6133: 'sectionImages' is declared but its value is never read.
302 const sectionImages = computed(() => {
~~~~~~~~~~~~~
The styles:
.content {
background-image: v-bind("sectionImages.logo.image"), v-bind("sectionImages.header.image");
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
TypeScript, disable checks for `declared but its value is ...
If you declare a variable but never use it, TypeScript will not compile, saying '<variable>' is declared but its value is never read...
Read more >Vue3 & Typescript error: ... is declared but its value is never ...
Try using the Take Over Mode in volar instead using Volar, Vetur and the TypeScript Vue Plugin all at the same time.
Read more >Using Vue with TypeScript
A type system like TypeScript can detect many common errors via static ... If using SFCs, use the vue-tsc utility for command line...
Read more >Features
Because Vite targets modern browsers only, it is recommended to use native CSS variables with PostCSS plugins that implement CSSWG drafts (e.g. postcss-nesting) ......
Read more >TypeScript - Astro Documentation
For example, if you use TypeScript to type your component's props, you'll get an error in your editor if you set a prop...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sapphi-red Yes I’m done like your said, but I hope vue can expose parsed css vars and css module classes text range in future version.
Similar to #1089, will look on
@vue/compiler-sfc
if it has any available API for this.