You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Volar throws the error of class property doesn't exist in vue component defined by defineComponent function: Property 'class' does not exist on type 'IntrinsicAttributes & Readonly<Partial<{}> & Omit<{} & {}, never>>'.
I've tried to fix the error by providing a type of class property in IntrinsicAttributes interface in jsx.d.ts file, and the problem has gone, but seems like the solution must be provided by Volar itself.
The next problem is about property 'slot': Property 'slot' does not exist on type 'ElementAttrs<HTMLAttributes>'.
I've tried to solve this as well as class-property problem, but it didn't help. VS Code shows that property exists in JSX.IntrinsicAttributes interface, but compiler still throws the same.
Extending HTMLAttributes interface in declaration of vue/types/jsx module in jsx.d.ts file didn't fix the error. But direct extension of HTMLAttributes interface in node_modules/vue/types/jsx.d.ts helped.
The text was updated successfully, but these errors were encountered:
Type '{ dataSelected: boolean; "data-selected": boolean; }' is not assignable to type 'ElementAttrs<HTMLAttributes>'.
Property 'dataSelected' does not exist on type 'ElementAttrs<HTMLAttributes>'.ts(2322)
In order to solve this issue as fast as possible, I created a small repo to reproduce the problem: https://github.com/Hope410/slot-class-issue
defineComponent
function:Property 'class' does not exist on type 'IntrinsicAttributes & Readonly<Partial<{}> & Omit<{} & {}, never>>'.
I've tried to fix the error by providing a type of
class
property inIntrinsicAttributes
interface in jsx.d.ts file, and the problem has gone, but seems like the solution must be provided by Volar itself.Property 'slot' does not exist on type 'ElementAttrs<HTMLAttributes>'.
I've tried to solve this as well as
class
-property problem, but it didn't help. VS Code shows that property exists inJSX.IntrinsicAttributes
interface, but compiler still throws the same.Extending
HTMLAttributes
interface in declaration ofvue/types/jsx
module in jsx.d.ts file didn't fix the error. But direct extension ofHTMLAttributes
interface innode_modules/vue/types/jsx.d.ts
helped.The text was updated successfully, but these errors were encountered: