-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Type error of inheritAttrs on TSX component #8572
Comments
Maybe you can find the solution in the typescript jsx. |
@liulinboyi I'm not sure what caused it, but before it was OK |
Maybe the Typescript or the Volar has update, so i suggest you can find the solution in the typescript jsx or the Volar release log or the both repo issue. |
I think the Attribute type checking part can solve this issue. vite-env.d.ts /// <reference types="vite/client" />
declare module "*.vue" {
import { DefineComponent } from "vue";
const component: DefineComponent<{}, {}, any>;
export default component;
}
// I had a try, add this namespace to resolve this issue
declare namespace JSX {
interface IntrinsicAttributes {
msg: string;
}
} |
Thank you. I think it's volar |
The issue can no longer be reproduced with: "dependencies": {
"vue": "3.5.12"
},
"devDependencies": {
"typescript": "5.6.3",
"vue-tsc": "2.1.10"
}, |
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Vue version
3.3.4
Link to minimal reproduction
https://github.com/wonderl17/vue-tsx-error
Steps to reproduce
C2.vue:
C1.vue:
Dev.vue:
run
pnpm vue-tsc
and get error:What is expected?
no type error
What is actually happening?
type error shown
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: