Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefineProps don't convert generic type to Object #9277

Open
UwetU opened this issue Sep 22, 2023 · 0 comments
Open

DefineProps don't convert generic type to Object #9277

UwetU opened this issue Sep 22, 2023 · 0 comments
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. scope: types

Comments

@UwetU
Copy link

UwetU commented Sep 22, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. scope: types
Projects
None yet
Development

No branches or pull requests

2 participants