-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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(TS): missing ssrContext param for language set #8807
fix(TS): missing ssrContext param for language set #8807
Conversation
When setting a language in SSR mode a ssrContext parameter should be passed: https://next.quasar.dev/options/quasar-language-packs#dynamical-ssr-
LGTM, have you tested the autocomplete works correctly both in a SSR and not-SSR project? |
Isn't this breaking the |
@IlCallo How do you usually test this? What I did now was modify this file in my running projects node_modules, but that does not feel like the best way... |
@Evertvdw I have my own fork of the quasar repo locally, I do the changes there, then create the test projects anew and run If the problem is TS related, I always restart VSCode too. In this case the test would be to check that the second parameter is required only if SSR mode is enabled, so you'll need to test it on a new project and check the parameter isn't there. Then add SSR mode, restart VSCode and check the second parameter is now required. Then try the use case (providing there the @rstoenescu as far as I can tell from the code and the docs, the second parameter is required when in SSR mode. Do you see any flaws in this plan? |
Like I said, |
As far as I can see in the source code it requires 2 arguments: https://github.com/quasarframework/quasar/blob/vue3-work/ui/src/lang.js#L29 |
Yeah, that's the code I was talking about. |
Anything you need from me to get this PR along? |
Here's the explanation: all methods which require At this point, we'll need to separate the types in some way. We need something like a quasar/ui/build/build.types.js Line 368 in e9a84de
instead of quasar/ui/build/build.types.js Line 397 in e9a84de
@Evertvdw are you up for the task? |
I don't think so. If you have clear what needs to be done I think you can better do it. I don't have that much experience with Typescript. Edit I gave it a try anyways, is this ok? |
LGTM, thanks! |
@IlCallo yes I already confirmed it works! |
Thanks, will be in next beta release :) |
@IlCallo This change has not been merged in Quasar v1 but that is also necessary as I get this error there also now :) |
…8807) * fix(TS): missing ssrContext param for language set When setting a language in SSR mode a ssrContext parameter should be passed: https://next.quasar.dev/options/quasar-language-packs#dynamical-ssr- * Split types for QuasarGlobals Co-authored-by: Evert van der Weit <evert@mett.nl>
Merged into dev branch too, will be out with next release |
When setting a language in SSR mode a ssrContext parameter should be passed: https://next.quasar.dev/options/quasar-language-packs#dynamical-ssr-
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch and not themaster
branchfix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: