TanStackT
TanStack3y ago
19 replies
wet-aqua

TypeScript type hinting fails

I have followed the example shown in https://tanstack.com/query/latest/docs/svelte/ssr to a T, but I cannot get the type hint for the Readable result.

2nd picture shows my expectation for $query
image.png
image.png
Setup

SvelteKit defaults to rendering routes with SSR. Because of this, you need to disable the query on the server. Otherwise, your query will continue executing on the server asynchronously, even after the HTML has been sent to the client.
SSR and SvelteKit | TanStack Query Docs
Was this page helpful?