-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Type-Error because of 'declare module "@vue/runtime-core"' #17416
Comments
The same problem has occurred, and it has now affected normal development |
Thanks for reporting. It didn't work for me even without the |
to ensure Volar correctly picks up Quasar components and provides IntelliSense for them
Are you possibly using an older version of the VSCode Extension for vue "Vue - Official" ( |
The fix will be included in the next |
This still seems to be broken when a project augments ComponentCustomProperties and uses custom augmentation from another project, e.g. vue-router. Here is a repro.
Reference to Could @yusufkandemir take another look at this please? |
@Logima you are right, we've overlooked that part. For simplicity purposes, I will just reopen this issue instead of creating a new one. |
in quasar/dist/types/index.d.ts declare module "@vue/runtime-core" {
interface ComponentCustomProperties {
$q: QVueGlobals; Fix buid.types.js
by
|
Do you have any news about a new release of Quasar solving this bug? Can you propose a workaround? |
Fix will be available in Quasar v2.17+ |
What happened?
If one defines a global variable like described in the vue documentation within a typescript project with
define module "vue" { ... }
, then all quasar components don't get resolved within the template anymore.This results in
vue-tsc
throwing errors and VSCode, with the official Vue extension, not being able to resolve the component to show hints.What did you expect to happen?
The quasar components should still resolve correctly if a user (or another package) defines a global vue variable.
Reproduction URL
https://github.com/delphi-sucks/quasar-bug-define-module-vue
How to reproduce?
vue-tsc
with at least version 2.0.29vue-tsc -p tsconfig.vue-tsc.json
) or open a vue-file which uses a quasar component and verify that the component doesn't get resolved (unknown
)example-global-var-definition.d.ts
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
TypeScript Support
Platforms/Browsers
Other
Quasar info output
Relevant log output
Additional context
This is a problem which was introduced with the latest vue/vue-tsc/volar changes.
Projects are slowly migrating from
define module "@vue/runtime-core"
todefine module "vue"
like vue-router and having packages with different ways to implement global vue variables can result in unexpected behaviour like quasar components not being resolvable anymore.The text was updated successfully, but these errors were encountered: