Describe the bug#
Here's a simple reproduction.
$: test = createQueries({
queries: [
{
queryKey: [123],
queryFn() {
return 1;
},
},
{
queryKey: [234],
queryFn() {
return 2;
},
},
],
combine(a) {
return (a[0].data ?? 0) + (a[1].data ?? 0);
},
});
Typescript reports that test is Readable<number> but it seems like combine doesn't get applied and the actual type is Readable<[QueryObserverResult<number>, QueryObserverResult<number>]> -
Your minimal, reproducible example#
Steps to reproduce#
Expected behavior#
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
Ubuntu 22.04
Tanstack Query adapter#
svelte-query
TanStack Query version#
5.0.0-beta.20
TypeScript version#
5.2.2
Additional context#
No response
A typescript playground shows that this is working as expected - I'm getting
Readable<number>here: https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgYygUwIYzQRQK5pTBoDOcAvnAGZQQhwDkAAjBgHYmvIDWA9CQDc0AG2wBaAI4EoATwZxevODBlhSALjhRkAKB3IIHeFMLEyAXhTosuaWYAUCHXDgmiGuAG1nLxD9+u0jIA0mgymp4AjABMAMwAugA0-r5uMgBibPYAlH4BAegweFBscJEA3Cku5MkBNSlO+YGEIWERcQAsSVXNspk5eU1aaEUlcNGVTfV1tXDdLgYgAEbAbGj2GLmNvoXFpRueAAzxAHQAJlgYcAD813CHuQDUcAeRpxesN3cPkxTJ5NlKjo3GYdIo4AA9a5AA