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

Bug: TypeScript errors with Vue generic components #2436

Open
thimonwentink opened this issue May 24, 2024 · 3 comments
Open

Bug: TypeScript errors with Vue generic components #2436

thimonwentink opened this issue May 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@thimonwentink
Copy link

Describe the bug

I get TypeScript errors when trying to find a component that has a generic with findComponent.

Steps to reproduce

I have made a minimal reproduction. Here a small component is created with a generic, called Select.vue. I use the Select component in App.vue.

  1. Open minimal reproduction
  2. You should now see app.spec.ts. This is the test file where the TypeScript errors occur.
  3. Run npm run type-check in the terminal below the file editor.
  4. You should now see two TypeScript errors.

I think the two errors are related. They are only thrown if the component has a generic.

Expected behaviour

It should not throw these errors. The findComponent for the component with the generic, should return a VueWrapper.

Actual behaviour

It somehow returns a WrapperLike, instead of the expected VueWrapper.

@thimonwentink thimonwentink added the bug Something isn't working label May 24, 2024
@thimonwentink
Copy link
Author

Maybe it is the same issue as described in #2254, but I wasn't sure.

@cexbrayat
Copy link
Member

@thimonwentink Thanks for the repro.

@pikax What do you think about this?

@pikax
Copy link
Member

pikax commented May 24, 2024

@pikax What do you think about this?

@johnsoncodehk should be able to help more on this specific issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants