wheatjs / vite-plugin-vue-type-imports

Import types in Vue SFC for defineProps
223 stars 16 forks source link

When I import the type in Vue, I get an error. #48

Closed williamChen26 closed 1 year ago

williamChen26 commented 1 year ago

image

code:

// types.ts
import type { StyleValue } from 'vue/types/jsx';

export interface PanelProps {
    dialogStyle?: StyleValue;
}
// component
import { PanelProps } from './types';

const props = withDefaults(defineProps<PanelProps>(), {});