-
-
Notifications
You must be signed in to change notification settings - Fork 103
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 when using loadAll function. #658
Comments
Ouch, okay thanks for reporting this. I'll try to find some time over the weekend to address it |
Found some time to look at this over lunch and I think This is specified correctly Admittedly, I'm not the strongest with typescript so i could be missing something. I'm going to try to get some help with this but if you have any ideas for how to fix this, I'm all ears. I suppose worst case scenario you will just have to pass the return type as a generic parameter to |
Okay, I reached out to some people and I think they found a solution. I'm honestly amazed how quickly they came up with it. I haven't taken the time to test it in the e2e tests but on the surface it does seem to work. Leave the link here for future me: link. |
Describe the bug
There is a type error showing in VS Code when using the
loadAll
function. The full error code is:As far as I can tell, I am using the function exactly as stated in the Deep Dive: Loading multiple stores simultaneously section of the docs. It seems to work as intended, just gives that dreaded red squiggly.
Additionally, types are not inferred/generated when using the
loadAll
function, so I'm currently having to use it as follows to get types working in the svelte page:Severity
annoyance
Steps to Reproduce the Bug
Add the loadAll function to a
+page.ts
or+layout.ts
file.Reproduction
No response
The text was updated successfully, but these errors were encountered: