Skip to content
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 options allow partial directives list #17554

Closed
rasmus0201 opened this issue Oct 2, 2024 · 2 comments · Fixed by #17559
Closed

Quasar plugin options allow partial directives list #17554

rasmus0201 opened this issue Oct 2, 2024 · 2 comments · Fixed by #17559
Assignees
Labels
area/typescript bug/2-confirmed We have reproduce the problem and confirmed that this is a bug. flavour/vite-plugin Bugs related to Vite usage with Quasar kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@rasmus0201
Copy link

What happened?

Kind of a continuation of #17466 - and the suggested solution #17466 (comment).

When registering directives for global usage, TypeScript complains when we only need to register some of the directives Quasar has. It doesn't make sense that you can't register a single directive for global usage.

TypeScript gives the following explanation: Type '{ vClosePopup: ClosePopup; }' is missing the following properties from type 'QuasarDirectives': vIntersection, vMorph, vMutation, vRipple, and 6 more.

What did you expect to happen?

No TypeScript error and the ability to only register some directives.

Reproduction URL

https://stackblitz.com/edit/vitejs-vite-tgtwe3?file=src%2Fmain.ts

How to reproduce?

  1. Go to the provided reproduction
  2. Look at the TypeScript error in main.ts

Flavour

Vite Plugin (@quasar/vite-plugin)

Areas

TypeScript Support

Platforms/Browsers

No response

Quasar info output

No response

Relevant log output

No response

Additional context

No response

@rasmus0201 rasmus0201 added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Oct 2, 2024
@github-actions github-actions bot added area/typescript bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/vite-plugin Bugs related to Vite usage with Quasar labels Oct 2, 2024
@yusufkandemir yusufkandemir added bug/2-confirmed We have reproduce the problem and confirmed that this is a bug. and removed bug/1-repro-available A reproduction is available and needs to be confirmed. labels Oct 2, 2024
@yusufkandemir yusufkandemir self-assigned this Oct 2, 2024
@yusufkandemir
Copy link
Member

The correct way is { ClosePopup }/{ ClosePopup: ClosePopup }. So, the problem was not just everything being required. But, it will now be correctly typed in both aspects, thanks for reporting.

The fix will be included in quasar v2.17.1.

@rasmus0201
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/typescript bug/2-confirmed We have reproduce the problem and confirmed that this is a bug. flavour/vite-plugin Bugs related to Vite usage with Quasar kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants