Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class is not assignable to generic components (rfc436) #2744

Closed
cohlar opened this issue Apr 27, 2023 · 1 comment
Closed

class is not assignable to generic components (rfc436) #2744

cohlar opened this issue Apr 27, 2023 · 1 comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@cohlar
Copy link

cohlar commented Apr 27, 2023

With "experimentalRfc436": true enabled, vue-tsc complains when adding a class to generic components, since version 1.4.4, and still with version 1.6.0. Version 1.4.3 works fine in this regard.

Please find a link to a reproduction repo and below the exact error message:
"Argument of type '{ class: string; }' is not assignable to parameter of type '{ foo?: string | undefined; } & VNodeProps'.
Object literal may only specify known properties, and 'class' does not exist in type '{ foo?: string | undefined; } & VNodeProps'."

In the reproduction repo, please see the two errors in component TheWelcome.vue (either with vscode extension or by running yarn type-check).

@johnsoncodehk johnsoncodehk added bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Apr 27, 2023
@cohlar
Copy link
Author

cohlar commented Apr 27, 2023

That was fast! ⚡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first
Projects
None yet
Development

No branches or pull requests

2 participants