framework icon indicating copy to clipboard operation
framework copied to clipboard

Html and Body components: class prop type error if not string

Open jshimkoski opened this issue 3 years ago • 0 comments

Environment

Reproduction

https://stackblitz.com/edit/github-fbh4ex?file=app.vue

Please note: the StackBlitz version doesn't show type errors. If you have a fresh local project with the code, you will see the type error.

Describe the bug

The <Html> and <Body> components show type errors when you attempt to use anything other than a string for the class prop. Shouldn't their class prop accept arrays and objects as well?

(property) class?: string | undefined
Type '{ test: true; }' is not assignable to type 'string'.ts(2322)
components.d.ts(654, 5): The expected type comes from property 'class' which is declared here on type 'ComponentProps<DefineComponent<{ manifest: StringConstructor; version: StringConstructor; xmlns: StringConstructor; renderPriority: (StringConstructor | NumberConstructor)[]; ... 27 more ...; translate: StringConstructor; }, ... 10 more ..., { ...; }>>'

Additional context

No response

Logs

No response

jshimkoski avatar Nov 17 '22 11:11 jshimkoski