-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
fix: update vue-shims for Vue v3.0.1 #5975
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works. This seems like a reasonable compromise for now... there may be a case for defining types at a per component level down the road...
@@ -1,5 +1,5 @@ | |||
declare module '*.vue' { | |||
import type { DefineComponent } from 'vue' | |||
const component: DefineComponent | |||
const component: DefineComponent<any, any, any> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DefineComponent<{}, {}, any>
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yes, now that VTU beta.7 is out, this is enough.
vuejs/core@6aa2256 intriduced a change in `DefineComponent` type, that results in a broken bare CLI app that would use VTU, as `mount` will not compile. This relaxes the type definitation by using generic `any`. Fixes vuejs#5974
5c1b57e
to
6d42778
Compare
I updated the PR to use |
Thanks! |
I just created an app with vue/cli v4.5.8 . It looks like it uses Vue v3.0.2 and Vue Test Utils v2.0.0-beta.7 and I'm still having the same issue when I run the default unit test. The exact error is as follows:
Any idea? |
@alperkay that's a different matter. This PR targets a typing (i.e. compile-time) issue, yours is a runtime issue (missing prop declaration?) |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information:
vuejs/core@6aa2256 intriduced a change in
DefineComponent
type, that results in a broken bare CLI app that would use VTU, asmount
will not compile.This relaxes the type definitation by using generic
any
.Fixes #5974