-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
SFC setup error with TS7006 #5347
Comments
In general, having all TS strict options activated (through |
I rather suspect the issue with with a limitation of ts-loader, as described in the new docs: https://staging.vuejs.org/guide/typescript/overview.html#note-on-vue-cli-and-ts-loader
Doing typechecking with |
Indeed, it works in a vite project too. Closing in favor of vuejs/vue-loader#1915 then |
I think this is a separate issue from vuejs/vue-loader#1915 because the workaround that applies to the issue doesn't apply here. Also, is there a way to add a switch so that the generated TS code can have a |
Version
3.2.29
Reproduction link
github.com
Steps to reproduce
yarn
yarn build
What is expected?
No error is produced
What is actually happening?
The compilation process errors with
TS7006: Parameter 'n' implicitly has an 'any' type.
This bug seems to only happen if the SFC contains a
<script lang="ts" setup>
, some Typescript code or comments, at least 2 elements (or lines of comments) in templates, and scoped css. This error is independent of vuejs/vue-loader#1915 because the error caused by the issue can be avoided by setting"strictPropertyInitialization": false
intsconfig.json
, which is indeed the case here.The text was updated successfully, but these errors were encountered: