Closed Doeke closed 2 weeks ago
Might be fixed by #4103
@KazariEX What about @click
+ defineModel
case? Is that also the same issue with fallthrough attributes?
@Doeke This is actually caused by the update
event defined by defineModel
. When there are no events on a component, its $emit
will be inferred as any event function. Could you create a separate issue for this so that my PR can link it correctly?
@KazariEX
New issue for event listener errors: https://github.com/vuejs/language-tools/issues/4701
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
Enable
strictTemplates: true
and run type-check on vue templates that contain certain fallthrough attributes/events likeid
on a component:The other attributes that don't work are
title
andaria-*
attributes.Another problem is with the
@click
event listener on components that usedefineModel
(see repro link)What is expected?
No typechecking errors are expected as attributes like
id
andaria-label
should be treated as allowed fallthrough attributes.What is actually happening?
Type check fails with errors (
Object literal may only specify known properties
):Link to minimal reproduction
https://github.com/Doeke/bug-stricttemplates
Any additional comments?
No response