-
-
Notifications
You must be signed in to change notification settings - Fork 527
Closed
Labels
bugSomething isn't workingSomething isn't workinggood reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it first
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.119Steps to reproduce
Enable strictTemplates: true and run type-check on vue templates that contain certain fallthrough attributes/events like id on a component:
<HelloWorld msg="You did it!" id="4" />The other attributes that don't work are title and aria-* attributes.
Another problem is with the @click event listener on components that use defineModel (see repro link)
What is expected?
No typechecking errors are expected as attributes like id and aria-label should be treated as allowed fallthrough attributes.
What is actually happening?
Type check fails with errors (Object literal may only specify known properties):
src/App.vue:15:37 - error TS2353: Object literal may only specify known properties, and 'id' does not exist in type 'Partial<{}> & Omit<{ readonly msg?: string | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly<...>, never>'.
15 <HelloWorld msg="You did it!" id="4" />
Link to minimal reproduction
https://github.com/Doeke/bug-stricttemplates
Any additional comments?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it first