Subscribe on changes!

DefineProps don't convert generic type to Object

avatar
Sep 22nd 2023

Vue version

3.3.4

Link to minimal reproduction

https://play.vuejs.org/#eNp9Uk1PwzAM/StWTps0bYfdSlcJph3gwCYoXAiH0nklI01CPsbQ1P+Om2rdEGiXyLHfc96zc2DXxox3AVnCUldaYTw49MGALFQ148w7zqBChVaUdM05y7gStdHWg/82CAdYWW3yNmxgY3UNnFE/zq644ipCWoBL8wxmcOAKoNZrlM+FDJhATrAmQkutnIfgMEfnnxzOC4fEGJiWnfRNhjDLoMVqiWOpq64+PGsRE8Rc40YojLzBn3djAqKFBJZvWyw9FK73kh6fe+HsROPsNRt1RIufQVhcJ+BtwJhs6Gw6Ib9dnCSmk27GNEO6eKyNLDxm6aQP2YhGTj42ohpvnVa0lyiVs1LXRki0S+MF+eSsN8FZIaX+uou5Xk7kvGP58U9+6/ZtjrOVRYd2R876mi9shb4rLx7vcU9xX6RZBEnoC8UHpNWEVmMHuwlqTbLPcFHtbfxDQlW5W+w9Knc01Qo9jrNF02eaX7B+kjsdTyOPtsCaH9dd9oo=

Steps to reproduce

  1. create a generic component
  2. define props with the generic type: Object as PropType<T>
  3. define a function which has props in parameters
  4. execute the function with defined props
  5. catch the following error image

What is expected?

prop modelValue has a T type

What is actually happening?

at the line useTestUseCase(props); has error image

System Info

No response

Any additional comments?

No response