strictTemplates + defineModel event listener type errors #4701
Description
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
System:
OS: Linux 6.8 Ubuntu 24.04 LTS 24.04 LTS (Noble Numbat)
CPU: (16) x64 AMD Ryzen 7 7840U w/ Radeon 780M Graphics
Memory: 13.28 GB / 30.66 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.15.1/bin/npm
Browsers:
Chrome: 127.0.6533.119
Steps to reproduce
- Add an event listener like
@click
or@change
on a component that usesdefineModel
and enablestrictTemplates
- Run type check
What is expected?
No errors, @click
is a valid native event listener on components
What 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
Metadata
Assignees
Labels
No labels