We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Original issue here vuejs/vue-cli#3067
vue-cli
template
App.vue
render() { const obj = { tag: "HelloWorld" }; const TagName = obj.tag; return <TagName class="name" />; }
No Error
Error Type '{ class: string; }' is not assignable to type '{}'
Type '{ class: string; }' is not assignable to type '{}'
However, the codes below works fine
render() { // this works const TagName = "HelloWorld"; return <TagName class="name" />; }
render() { // this also works const obj = { tag: "HelloWorld" }; const TagName = obj.tag; return <TagName />; }
The text was updated successfully, but these errors were encountered:
Can you show the JSX shim you're using in your project @troy351?
Sorry, something went wrong.
the same as shims-tsx.d.ts in vue-cli
This is not a JSX issue but an issue in TS.
microsoft/TypeScript#28806
It is on the teams radar to be fixed.
Solution for now is to stay behind a version, or use if statements to ensure a specific tag type.
No branches or pull requests
Original issue here vuejs/vue-cli#3067
Steps to reproduce
vue-cli
with only babel and typescript (use class style component).template
field and add render code inApp.vue
What is expected?
No Error
What is actually happening?
Error
Type '{ class: string; }' is not assignable to type '{}'
However, the codes below works fine
The text was updated successfully, but these errors were encountered: