unknown attributes doesn't get error even if strictTemplate: true
is set (regression from 1.4.0)
#3214
Labels
bug
Something isn't working
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
unknown-attr
attribute doesn't exist in<a>
so I expect an error to happen. The error happened with vue-tsc pre-1.4.0.Reproduction
Reproduction: https://github.com/sapphi-red-repros/vue-language-tools-strict-template-html-attribute-repro (stackblitz)
npm run tsc
doesn't throw an error. (actual)npm run tsc13
throws an error. (expected)My thoughts
I dug down this a bit and tried to create a PR but failed. I'll describe my thoughts here.
The virtual file of the file above is like below.
The type helpers are:
So this is something like:
I guess changing
__VLS_WithComponent
to use{ [K in keyof __VLS_IntrinsicElements]: { new (attrs: __VLS_IntrinsicElements[K]): unknown /* I don't know what this part should be */ } }
instead of__VLS_IntrinsicElements
would work.I don't know what
__VLS_asFunctionalComponent
is used for.Also I tried to create a test but I noticed that #2366 is required for that. But that issue would take much time to tackle for me.
The text was updated successfully, but these errors were encountered: