error using type union or intersection in defineProps
Vue version
3.2.47
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-1fkknn
Steps to reproduce
- Create a type union/intersection
- Use the type union/intersection in defineProps
What is expected?
defineProps allows type union/intersection
What is actually happening?
defineProps doesnt allow type union/intersection
[vite] Internal server error: [@vue/compiler-sfc] type argument passed to defineProps() must be a literal type, or a reference to an interface or literal type.
/home/projects/vitejs-vite-1fkknn/src/components/HelloWorld.vue
12 | type HelloWorldProps = BaseProps & OtherProps;
13 |
14 | withDefaults(defineProps<HelloWorldProps>(), {
| ^^^^^^^^^^^^^^^
15 | msg: 'Hello World',
16 | });
System Info
No response
Any additional comments?
No response