-
-
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 default vue 3 typescript shim #6023
base: dev
Are you sure you want to change the base?
Conversation
@cexbrayat @pikax I'm no expert in TypeScript so I'm not sure which is the better way to shim From what I understand, |
I think 2 possible ways to deal with the issue with eslint:
|
The rule could also be |
See #6023 It's not the ideal solution, though. In the long run we should have the shim built-in (either in this plugin or in the `vue-loader` package), for which ESLint rules should be properly applied, and the user can simply import that shim module.
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.
consider changing the shim to:
declare module '*.vue' {
import type { DefineComponent } from 'vue';
const component: DefineComponent<
Record<string, unknown>,
Record<string, unknown>,
unknown
>;
export default component;
}
See #6023 It's not the ideal solution, though. In the long run we should have the shim built-in (either in this plugin or in the `vue-loader` package), for which ESLint rules should be properly applied, and the user can simply import that shim module.
#6021 eslint warns about "unsafe any" in default shim when formatting.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information: