Closed
Description
Vue version
3.5.17
Link to minimal reproduction
Steps to reproduce
Create a component with a generic (<script setup lang="ts" generic="T">
).
Use the component and provide a prop that is not in the props list (e.g. a fallthrough attribute)
Notice that required props in the component is no longer required and typescript allows the usage without the prop.
What is expected?
Required props should be required and typescript should be aware of missing prop.
What is actually happening?
The way generic=""
is altering defineProps
is making required props optional.
System Info
Any additional comments?
No response