-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
strictTemplates + defineModel event listener type errors #4701
Comments
Oh I'm sorry, I thought you were referring to an error when adding
As you said, this is the same issue with fallthrough attributes. Regardless of whether there is a |
Should it report an error? My understanding is that |
IMO in strictTemplates, just as unknown props should report errors, the listening for events is similar to assigning values to the 'onXxx' prop, and it should also apply the rules of the former. |
My understanding is that |
Maybe it's possible to add an option to vue language options for globally allowed event listeners, kind of like htmlAttributes/dataAttributes settings? |
What I'd fixed is exactly the inconsistency you mentioned. The reason of And what #4103 want to solve includes this issue. |
Vue - Official extension or vue-tsc version
2.0.21
VSCode version
1.92.2
Vue version
3.4.29
TypeScript version
5.4.0
System Info
Steps to reproduce
@click
or@change
on a component that usesdefineModel
and enablestrictTemplates
What is expected?
No errors,
@click
is a valid native event listener on componentsWhat is actually happening?
Error (
Object literal may only specify known properties...
)Link to minimal reproduction
https://github.com/Doeke/bug-stricttemplates
Any additional comments?
Was asked to make a separate issue for this
#4699 (comment)
The text was updated successfully, but these errors were encountered: