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

Types not compatible with Vue 2.6 in "strict" type checking mode #3786

Closed
rchl opened this issue Sep 4, 2022 · 2 comments
Closed

Types not compatible with Vue 2.6 in "strict" type checking mode #3786

rchl opened this issue Sep 4, 2022 · 2 comments

Comments

@rchl
Copy link
Contributor

rchl commented Sep 4, 2022

Version

3.6.4

Reproduction link

codesandbox.io

Steps to reproduce

  1. Go to /src/main.js
  2. Right click the Router import and select Go to Definition
  3. Notice how there is an error in the definition of the type Component type

What is expected?

No errors with Vue 2.6

What is actually happening?

Error Generic type 'Component' requires between 0 and 4 type arguments.


Component has different amount of generic arguments in Vue 2.7 compared to Vue 2.6 so this code is not compatible with Vue 2.6. Since vue-router passes 5 arguments, this triggers a typescript error if strict option in tsconfig is enabled.

@rchl
Copy link
Contributor Author

rchl commented Sep 4, 2022

And there is also related issue (that was auto-closed but is valid) -- #3779

That is also an incompatibility with Vue 2.6 but in a different file.

@rchl
Copy link
Contributor Author

rchl commented Sep 4, 2022

The workaround is to stick to v3.5.4 which is the latest version compatible with Vue 2.6 types.

@posva posva closed this as completed in d6064df Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant