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

TS2322 after upgrade to 1.4 #2674

Closed
coader opened this issue Apr 22, 2023 · 7 comments
Closed

TS2322 after upgrade to 1.4 #2674

coader opened this issue Apr 22, 2023 · 7 comments

Comments

@coader
Copy link

coader commented Apr 22, 2023

if use fallthrough attribute then got this error, it's ok in 1.2

image

NButton doese not define onClick and use bind="$attrs" to fall throuth, and it's ok in vue-tsc 1.2

@johnsoncodehk
Copy link
Member

It seems a same issue with #2671, can you try remove "jsxTemplates": true in tsconfig if you have?

@coader
Copy link
Author

coader commented Apr 22, 2023

only found "jsx": "preserve", in tsconfig

@coader
Copy link
Author

coader commented Apr 22, 2023

and I already add types vite/client, but it not helps

@johnsoncodehk
Copy link
Member

Can you provide repro case?

@Ttou
Copy link

Ttou commented Apr 23, 2023

image
add "jsxTemplates": true can remove error msg

image

@jd-solanki
Copy link
Contributor

Reproduction: https://github.com/jd-solanki/volar-vue-playground/blob/attrs-not-working/src/components/foo/Play.vue

Note
make sure you are in correct branch

I guess this is because of strictTemplates: true

https://github.com/jd-solanki/volar-vue-playground/blob/attrs-not-working/tsconfig.json#L28

BTW, what does strictTemplates: true do? do we have any kind of docs on what each vueCompilerOptions does?

@johnsoncodehk
Copy link
Member

@jd-solanki This is the expected behavior of enabling strictTemplates, which will reject your input for an unknown prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants