beermanB
Convex Community12mo ago
3 replies
beerman

getting type of query

+page.svelte
const accounts = useQuery(api.accounts.list, {});

component
interface Props {
  accounts: ;
}
let { accounts }: Props = $props();

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?
Was this page helpful?