declare module 'vue' breaks types for auto imported components · vuejs/pinia · Discussion #2729 (original) (raw)

I think the key here is the use in combination with unplugin-vue-components or unplugin-auto-import.

the generated component.d.ts file contains something around the following, then:

... export {}

/* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { MyComponent: typeof import('./components/MyComponent.vue')['default'] MyOtherComponent: typeof import('./components/MyOtherComponent.vue')['default'] ... }

In my case - the update in the dependabot group broke all type-checks.
Reverting (and hard-pinning) pinia fixes this behavior again - with this, pinia is now the only dependency not uptodate.

edit while not a good, minimal reproduction (it's just my project breaking) - this PR showcases that the update of pinia breaks check-types (Ci is passing on main):
freqtrade/frequi#2004

Also noteworthy: the type-check failures are not due to pinia usage, but due to random, other, auto-imported utility functions. (which in hindsight, would make it more reasonable that it's acutally conflicting with unplugin-auto-import).