Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'... is declared but its value is never read' in vue-tsc 0.40.0 and onwards #1748

Closed
samardzicneo opened this issue Aug 22, 2022 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@samardzicneo
Copy link

samardzicneo commented Aug 22, 2022

Hello

Since updating to 0.40.0 (and later 0.40.1), we are unable to use vue-tsc on our project. On that version, we get errors like these on pretty much all of our Vue SFCs:

...
src/[...].vue - error TS6133: '...' is declared but its value is never read.
...

We are using Vue 3 and SFCs with setup scripts all throughout our application.

Reading other issues that reported similar issues, it looks like they were either using Vue 2 or had their issue fixed by editing their tsconfig.json. However, we use Vue 3 and our tsconfig.json includes these lines:

{
  "compilerOptions": {
    ...
    "jsx": "preserve",
    ...
  },
  "vueCompilerOptions": {
    "experimentalDisableTemplateSupport": true
  }
}

Our project was ported from using vue-cli and we didn't consider type-checking in templates at the time, which is why we need experimentalDisableTemplateSupport enabled. Disabling it gets rid of these errors, but introduces hundreds of other ones. Also, the IDE (WebStorm) some of us use didn't support Typescript syntax inside templates at the time.

@johnsoncodehk
Copy link
Member

Duplicate of #1729

@johnsoncodehk johnsoncodehk marked this as a duplicate of #1729 Aug 27, 2022
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Aug 27, 2022
@sschneider-ihre-pvs
Copy link

Doesn't seem to fix it for me. I have that problem for components and variables from setup that are used in the template.

@johnsoncodehk
Copy link
Member

@sschneider-ihre-pvs Please open a new issue and provide minimal reproduction if you have the problem in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants