🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
using the latest version of tanstack query svelte, passing derived store and using select to select subset of the data makes the data in select type any and breaks the query types.
Describe the bug
using the latest version of tanstack query svelte, passing
derived
store and usingselect
to select subset of the data makes thedata
in select typeany
and breaks the query types.Playground link: https://tsplay.dev/mpkn6N
Example. This works:
this doesn't:
this shows that
select
works withoutderived
:Your minimal, reproducible example
https://tsplay.dev/mpkn6N
Steps to reproduce
derived
store,select
in the query,data
type isany
.see twoslash shiki comments
Expected behavior
it should not break types when passing a store and using
select
tocreateQuery
How often does this bug happen?
Every time
Screenshots or Videos
Platform
all
Tanstack Query adapter
svelte-query
TanStack Query version
^5.49.1
TypeScript version
6.5.2
Additional context
No response