- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Quasar plugin config property is typed incorrectly #16046
Comments
@yusufkandemir
And the type itself also seems to be missing the generated types:
|
Yes, the fix is released. But, share your code so we can check it.
To understand that you would need to search for |
@yusufkandemir But it does not seem to be augmented correctly when registering quasar. Here's the code I used for initializing:
I upgraded from v2.12.0 and there it was working, maybe this helps |
|
@yusufkandemir Interesesting though that it seems to work on your end. Is there something I could have missed in the setup, but the types should be picked up automatically I would assume |
@yusufkandemir
![]() |
It works fine, make sure you have updated Quasar and the version gets picked up correctly. You can confirm with $ pnpm create vite
...
✔ Project name: … quasar-16046-test
✔ Select a framework: › Vue
✔ Select a variant: › TypeScript
...
$ cd quasar-16046-test
$ pnpm install
$ pnpm add quasar Some options like |
Probably a typo here but there doesn't seem to be any version with that number, it should be Installing with the config and ts-ignore, I see my close button (the "X" on the far right) but if I remove the config, then my close button isn't showing anymore |
@yusufkandemir awesome thanks a lot for the reference, just a side note though, that PR fixes the Types but not the docs right? |
@ghiscoding it fixes both |
great, thanks for confirming :) |
@yusufkandemir It is working when passing a component but type-safe is complaining.
|
@danielwwc This IS working. Can you share a reproduction repo/codesandbox where it is not working pls? |
@rstoenescu It is not working.
|
@danielwwc Due to a clear reproduction I now see what the issue is. I was referring to quasar.config.js setting where String is required, as opposed to the UI code where a Component should be used instead. My next comment will explain why. |
There are subtle differences between quasar.config.js usage and the UI code (eg. a boot file). There are also other Quasar plugins which have different config, based on where you are specifying it (quasar.config.js or UI space). Example: the "actions" that you pushed. You can't specify the "handler" in quasar.config.js because that's a Function and cannot be serialized when injected into the UI space. As a general rule of thumb, it is really a bad idea to import anything UI related in the Node context of quasar.config.js (Components, Functions, etc). Can you focus on solving this, please? Make a diff between what the typings were before your main/first PR (because they were done correctly) and what they are now and implement a way to differentiate the things I mentioned above. Unfortunately, all Quasar plugins should be reviewed (which is where the diff will help). |
Discussed in #16045
Originally posted by ghiscoding July 5, 2023
I have global configs defined for Quasar and that used to work properly before updating (mostly because the
config
property ofQuasarPluginOptions
was set toany
so we could provide anything we wanted really)So considering this global config
this no longer work and tells me what
notify
is not a known property ofQuasarPluginOptions
and seem to be caused by this PR #15945I am not expecting any errors since even the documentation still mentions the same way to configure the global configs
https://quasar.dev/quasar-plugins/notify#installation
Am I doing something wrong or is that a Regression Bug?
The text was updated successfully, but these errors were encountered: