-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
PageData types don't update to reflect changes to load function(s) #5940
Comments
What do you mean by "lag" - as in, until you save the file? |
@CaptainCodeman running |
Had similar experience today, but turned out that the response wasn’t sterilisable. Once I’d sorted that out, all was peachy. Not saying that is what is going on here, but thought it worth mentioning. |
That's unrealistic, it should happen while you work. |
It's not that, it does it with the simplest props which are all definitely serializable (I added the dates while testing something else) |
If it's any help, I've been reloading the vscode window via the command palette any time I've made changes to the returning data of the load function for It's obviously not a solution to the problem, but it could be helpful in narrowing down where the problem is. |
I've noticed the same thing with all exports of As @AdrianGonz97 mentioned, reloading vscode helps, so my guess is that the problem is in vscode not reading the files on each update. |
This may be a problem in language-tools. |
@CaptainCodeman could you check if your errors still persist? I'm having trouble to figure out if this is one or multiple issues. The "type doesn't update" issue should be resolved in the latest Svelte for VS Code extension version. |
It seems better this morning, with all latest updates. Still feels a little odd that things only update if you have the dev-server running, but the changes now appear to reflect when it is. |
I stumbled upon this issue here when searching for what to do when PageData types are not created: sveltejs/kit#5940 The solution is to run svelte-kit sync. I have added a small helper to our package.json and I call it from the CircleCI check:eslint step. Also including this in our bisect helper
I stumbled upon this issue here when searching for what to do when PageData types are not created: sveltejs/kit#5940 The solution is to run svelte-kit sync. I have added a small helper to our package.json and I call it from the CircleCI check:eslint step. Also including this in our bisect helper
Describe the bug
Having a
+page.server.ts
load function with no+page.ts
load function results inPageData
beingany
Making changes to
+page.ts
load function means thePageData
types lag and mismatch.Reproduction
Just add and remove some static props to the
load
function return object.Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: