getting type of query
+page.svelte
component
FunctionReturnType<api.accounts.list>
returns the type of the data but doesn't include the query states. And UsePaginatedQueryReturnType<api.accounts.list>
creates a type mismatch.
What's the correct way to do this?3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
The correct way to do what, to type the prop? this is the code, sounds like it'd be helpful to export this? https://github.com/get-convex/convex-svelte/blob/main/src/lib/client.svelte.ts#L46
but for now you could use that type
GitHub
convex-svelte/src/lib/client.svelte.ts at main · get-convex/convex-...
Contribute to get-convex/convex-svelte development by creating an account on GitHub.
Alternatively, just pass the data instead of all the loading state, or if you want loading state, do the query in the component where you need the data. A nice thing about Convex is not needing to pass these props around.