How to make Tsx file read the same types as Vue SFC does? #1873
Answered
by
johnsoncodehk
mockingjet
asked this question in
Q&A
-
In Vue file, we can see the SfcButton props types. But in Tsx file, we can only see the default SFC types. // global.d.ts
declare module '*.vue' {
import type { DefineComponent } from 'vue';
const component: DefineComponent<{}, {}, any>;
export default component;
} How to make tsx read the correct prop types? |
Beta Was this translation helpful? Give feedback.
Answered by
johnsoncodehk
Sep 22, 2022
Replies: 1 comment 1 reply
-
See https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mockingjet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode.