wheatjs / vite-plugin-vue-type-imports

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

type argument passed to defineProps() must be a literal type, or a reference to an interface or literal type. #41

Closed laterdays closed 1 year ago

laterdays commented 1 year ago

[vite] Internal server error: [@vue/compiler-sfc] type argument passed to defineProps() must be a literal type, or a reference to an interface or liter al type.

import type { ButtonProps } from 'naive-ui';
defineProps<ButtonProps>();
Zolyn commented 1 year ago

Can you provide a reproduction link or repo?

Zolyn commented 1 year ago

https://antfu.me/posts/why-reproductions-are-required