-
-
Notifications
You must be signed in to change notification settings - Fork 484
Closed
Description
In my template I'm rendering a Vue component and specify the class and style attribute on the tag, like so:
<MyComponent class="my-class" style="font-weight: bold" data-value="test" />
I get a type error, saying:
Type '{ class: string; dataValue: any; "data-value": any; }' is not assignable to type 'IntrinsicAttributes & Readonly<Partial<{ selected: boolean; }> & Omit<{ selected: boolean; } & {}, "selected">>'.
Property 'class' does not exist on type 'IntrinsicAttributes & Readonly<Partial<{ selected: boolean; }> & Omit<{ selected: boolean; } & {}, "selected">>'.ts(2322)
The component looks like this:
export default defineComponent({
name: 'MyComponent',
functional: true,
props: {
selected: { type: Boolean, default: false },
},
render () // omitted for brevity
})
The type checking should allow specifying class
and style
attributes.
I'm using Vue 2.7 ^2.7.0-beta.5
Metadata
Metadata
Assignees
Labels
No labels