@tanstack/solid-query 5.66.4 → 5.66.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev.cjs +10 -10
- package/build/dev.js +11 -11
- package/build/index.cjs +10 -10
- package/build/index.d.cts +7 -3
- package/build/index.d.ts +7 -3
- package/build/index.js +11 -11
- package/package.json +2 -2
- package/src/createQueries.ts +4 -18
package/build/dev.cjs
CHANGED
|
@@ -11,7 +11,7 @@ exports.QueryClient = class QueryClient extends queryCore.QueryClient {
|
|
|
11
11
|
super(config);
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
exports.QueryClientContext = solidJs.createContext(
|
|
14
|
+
exports.QueryClientContext = solidJs.createContext(void 0);
|
|
15
15
|
exports.useQueryClient = (queryClient) => {
|
|
16
16
|
if (queryClient) {
|
|
17
17
|
return queryClient;
|
|
@@ -59,7 +59,7 @@ function reconcileFn(store$1, result, reconcileOption, queryHash) {
|
|
|
59
59
|
return { ...result, data: newData2 };
|
|
60
60
|
}
|
|
61
61
|
let data = result.data;
|
|
62
|
-
if (store$1.data ===
|
|
62
|
+
if (store$1.data === void 0) {
|
|
63
63
|
try {
|
|
64
64
|
data = structuredClone(data);
|
|
65
65
|
} catch (error) {
|
|
@@ -84,11 +84,11 @@ var hydratableObserverResult = (query, result) => {
|
|
|
84
84
|
...store.unwrap(result),
|
|
85
85
|
// During SSR, functions cannot be serialized, so we need to remove them
|
|
86
86
|
// This is safe because we will add these functions back when the query is hydrated
|
|
87
|
-
refetch:
|
|
87
|
+
refetch: void 0
|
|
88
88
|
};
|
|
89
89
|
if ("fetchNextPage" in result) {
|
|
90
|
-
obj.fetchNextPage =
|
|
91
|
-
obj.fetchPreviousPage =
|
|
90
|
+
obj.fetchNextPage = void 0;
|
|
91
|
+
obj.fetchPreviousPage = void 0;
|
|
92
92
|
}
|
|
93
93
|
obj.hydrationData = {
|
|
94
94
|
state: query.state,
|
|
@@ -157,7 +157,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
157
157
|
return reconcileFn(
|
|
158
158
|
store,
|
|
159
159
|
res,
|
|
160
|
-
reconcileOptions ===
|
|
160
|
+
reconcileOptions === void 0 ? false : reconcileOptions,
|
|
161
161
|
opts.queryHash
|
|
162
162
|
);
|
|
163
163
|
});
|
|
@@ -294,7 +294,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
294
294
|
const handler = {
|
|
295
295
|
get(target, prop) {
|
|
296
296
|
if (prop === "data") {
|
|
297
|
-
if (state.data !==
|
|
297
|
+
if (state.data !== void 0) {
|
|
298
298
|
return queryResource.latest?.data;
|
|
299
299
|
}
|
|
300
300
|
return queryResource()?.data;
|
|
@@ -434,7 +434,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
434
434
|
defaultedQueries(),
|
|
435
435
|
queriesOptions().combine ? {
|
|
436
436
|
combine: queriesOptions().combine
|
|
437
|
-
} :
|
|
437
|
+
} : void 0
|
|
438
438
|
);
|
|
439
439
|
const [state, setState] = store.createStore(
|
|
440
440
|
observer.getOptimisticResult(
|
|
@@ -507,7 +507,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
507
507
|
defaultedQueries(),
|
|
508
508
|
queriesOptions().combine ? {
|
|
509
509
|
combine: queriesOptions().combine
|
|
510
|
-
} :
|
|
510
|
+
} : void 0,
|
|
511
511
|
{ listeners: false }
|
|
512
512
|
);
|
|
513
513
|
});
|
|
@@ -516,7 +516,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
516
516
|
defaultedQueries(),
|
|
517
517
|
queriesOptions().combine ? {
|
|
518
518
|
combine: queriesOptions().combine
|
|
519
|
-
} :
|
|
519
|
+
} : void 0,
|
|
520
520
|
{ listeners: false }
|
|
521
521
|
);
|
|
522
522
|
});
|
package/build/dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryClient as QueryClient$1, MutationObserver, replaceEqualDeep, QueriesObserver, hydrate, QueryObserver, InfiniteQueryObserver
|
|
1
|
+
import { QueryClient as QueryClient$1, MutationObserver, replaceEqualDeep, QueriesObserver, hydrate, notifyManager, QueryObserver, InfiniteQueryObserver } from '@tanstack/query-core';
|
|
2
2
|
export * from '@tanstack/query-core';
|
|
3
3
|
import { createContext, useContext, createRenderEffect, onCleanup, createMemo, createSignal, createComputed, on, createEffect, mergeProps, createResource, batch, onMount } from 'solid-js';
|
|
4
4
|
import { createComponent, isServer } from 'solid-js/web';
|
|
@@ -10,7 +10,7 @@ var QueryClient = class extends QueryClient$1 {
|
|
|
10
10
|
super(config);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
var QueryClientContext = createContext(
|
|
13
|
+
var QueryClientContext = createContext(void 0);
|
|
14
14
|
var useQueryClient = (queryClient) => {
|
|
15
15
|
if (queryClient) {
|
|
16
16
|
return queryClient;
|
|
@@ -58,7 +58,7 @@ function reconcileFn(store, result, reconcileOption, queryHash) {
|
|
|
58
58
|
return { ...result, data: newData2 };
|
|
59
59
|
}
|
|
60
60
|
let data = result.data;
|
|
61
|
-
if (store.data ===
|
|
61
|
+
if (store.data === void 0) {
|
|
62
62
|
try {
|
|
63
63
|
data = structuredClone(data);
|
|
64
64
|
} catch (error) {
|
|
@@ -83,11 +83,11 @@ var hydratableObserverResult = (query, result) => {
|
|
|
83
83
|
...unwrap(result),
|
|
84
84
|
// During SSR, functions cannot be serialized, so we need to remove them
|
|
85
85
|
// This is safe because we will add these functions back when the query is hydrated
|
|
86
|
-
refetch:
|
|
86
|
+
refetch: void 0
|
|
87
87
|
};
|
|
88
88
|
if ("fetchNextPage" in result) {
|
|
89
|
-
obj.fetchNextPage =
|
|
90
|
-
obj.fetchPreviousPage =
|
|
89
|
+
obj.fetchNextPage = void 0;
|
|
90
|
+
obj.fetchPreviousPage = void 0;
|
|
91
91
|
}
|
|
92
92
|
obj.hydrationData = {
|
|
93
93
|
state: query.state,
|
|
@@ -156,7 +156,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
156
156
|
return reconcileFn(
|
|
157
157
|
store,
|
|
158
158
|
res,
|
|
159
|
-
reconcileOptions ===
|
|
159
|
+
reconcileOptions === void 0 ? false : reconcileOptions,
|
|
160
160
|
opts.queryHash
|
|
161
161
|
);
|
|
162
162
|
});
|
|
@@ -293,7 +293,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
293
293
|
const handler = {
|
|
294
294
|
get(target, prop) {
|
|
295
295
|
if (prop === "data") {
|
|
296
|
-
if (state.data !==
|
|
296
|
+
if (state.data !== void 0) {
|
|
297
297
|
return queryResource.latest?.data;
|
|
298
298
|
}
|
|
299
299
|
return queryResource()?.data;
|
|
@@ -433,7 +433,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
433
433
|
defaultedQueries(),
|
|
434
434
|
queriesOptions().combine ? {
|
|
435
435
|
combine: queriesOptions().combine
|
|
436
|
-
} :
|
|
436
|
+
} : void 0
|
|
437
437
|
);
|
|
438
438
|
const [state, setState] = createStore(
|
|
439
439
|
observer.getOptimisticResult(
|
|
@@ -506,7 +506,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
506
506
|
defaultedQueries(),
|
|
507
507
|
queriesOptions().combine ? {
|
|
508
508
|
combine: queriesOptions().combine
|
|
509
|
-
} :
|
|
509
|
+
} : void 0,
|
|
510
510
|
{ listeners: false }
|
|
511
511
|
);
|
|
512
512
|
});
|
|
@@ -515,7 +515,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
515
515
|
defaultedQueries(),
|
|
516
516
|
queriesOptions().combine ? {
|
|
517
517
|
combine: queriesOptions().combine
|
|
518
|
-
} :
|
|
518
|
+
} : void 0,
|
|
519
519
|
{ listeners: false }
|
|
520
520
|
);
|
|
521
521
|
});
|
package/build/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ exports.QueryClient = class QueryClient extends queryCore.QueryClient {
|
|
|
11
11
|
super(config);
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
exports.QueryClientContext = solidJs.createContext(
|
|
14
|
+
exports.QueryClientContext = solidJs.createContext(void 0);
|
|
15
15
|
exports.useQueryClient = (queryClient) => {
|
|
16
16
|
if (queryClient) {
|
|
17
17
|
return queryClient;
|
|
@@ -59,7 +59,7 @@ function reconcileFn(store$1, result, reconcileOption, queryHash) {
|
|
|
59
59
|
return { ...result, data: newData2 };
|
|
60
60
|
}
|
|
61
61
|
let data = result.data;
|
|
62
|
-
if (store$1.data ===
|
|
62
|
+
if (store$1.data === void 0) {
|
|
63
63
|
try {
|
|
64
64
|
data = structuredClone(data);
|
|
65
65
|
} catch (error) {
|
|
@@ -75,11 +75,11 @@ var hydratableObserverResult = (query, result) => {
|
|
|
75
75
|
...store.unwrap(result),
|
|
76
76
|
// During SSR, functions cannot be serialized, so we need to remove them
|
|
77
77
|
// This is safe because we will add these functions back when the query is hydrated
|
|
78
|
-
refetch:
|
|
78
|
+
refetch: void 0
|
|
79
79
|
};
|
|
80
80
|
if ("fetchNextPage" in result) {
|
|
81
|
-
obj.fetchNextPage =
|
|
82
|
-
obj.fetchPreviousPage =
|
|
81
|
+
obj.fetchNextPage = void 0;
|
|
82
|
+
obj.fetchPreviousPage = void 0;
|
|
83
83
|
}
|
|
84
84
|
obj.hydrationData = {
|
|
85
85
|
state: query.state,
|
|
@@ -148,7 +148,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
148
148
|
return reconcileFn(
|
|
149
149
|
store,
|
|
150
150
|
res,
|
|
151
|
-
reconcileOptions ===
|
|
151
|
+
reconcileOptions === void 0 ? false : reconcileOptions,
|
|
152
152
|
opts.queryHash
|
|
153
153
|
);
|
|
154
154
|
});
|
|
@@ -285,7 +285,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
285
285
|
const handler = {
|
|
286
286
|
get(target, prop) {
|
|
287
287
|
if (prop === "data") {
|
|
288
|
-
if (state.data !==
|
|
288
|
+
if (state.data !== void 0) {
|
|
289
289
|
return queryResource.latest?.data;
|
|
290
290
|
}
|
|
291
291
|
return queryResource()?.data;
|
|
@@ -425,7 +425,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
425
425
|
defaultedQueries(),
|
|
426
426
|
queriesOptions().combine ? {
|
|
427
427
|
combine: queriesOptions().combine
|
|
428
|
-
} :
|
|
428
|
+
} : void 0
|
|
429
429
|
);
|
|
430
430
|
const [state, setState] = store.createStore(
|
|
431
431
|
observer.getOptimisticResult(
|
|
@@ -498,7 +498,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
498
498
|
defaultedQueries(),
|
|
499
499
|
queriesOptions().combine ? {
|
|
500
500
|
combine: queriesOptions().combine
|
|
501
|
-
} :
|
|
501
|
+
} : void 0,
|
|
502
502
|
{ listeners: false }
|
|
503
503
|
);
|
|
504
504
|
});
|
|
@@ -507,7 +507,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
507
507
|
defaultedQueries(),
|
|
508
508
|
queriesOptions().combine ? {
|
|
509
509
|
combine: queriesOptions().combine
|
|
510
|
-
} :
|
|
510
|
+
} : void 0,
|
|
511
511
|
{ listeners: false }
|
|
512
512
|
);
|
|
513
513
|
});
|
package/build/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QueryClient as QueryClient$1, QueryClientConfig as QueryClientConfig$1, DefaultError, DefaultOptions as DefaultOptions$1, OmitKeyof, QueryKey, QueryObserverOptions as QueryObserverOptions$1, InfiniteQueryObserverOptions as InfiniteQueryObserverOptions$1, QueryObserverResult, DefinedQueryObserverResult, DefinedInfiniteQueryObserverResult, InfiniteQueryObserverResult, MutationObserverOptions, Override, MutationObserverResult, MutateFunction, DataTag, QueryFilters, InfiniteData, MutationFilters, MutationState, Mutation, QueryFunction, ThrowOnError, QueriesPlaceholderDataFunction } from '@tanstack/query-core';
|
|
2
2
|
export * from '@tanstack/query-core';
|
|
3
3
|
import * as solid_js from 'solid-js';
|
|
4
4
|
import { JSX, Accessor } from 'solid-js';
|
|
@@ -203,9 +203,13 @@ type QueriesResults<T extends Array<any>, TResult extends Array<any> = [], TDept
|
|
|
203
203
|
], [
|
|
204
204
|
...TDepth,
|
|
205
205
|
1
|
|
206
|
-
]> :
|
|
206
|
+
]> : {
|
|
207
|
+
[K in keyof T]: GetResults<T[K]>;
|
|
208
|
+
};
|
|
207
209
|
declare function createQueries<T extends Array<any>, TCombinedResult extends QueriesResults<T> = QueriesResults<T>>(queriesOptions: Accessor<{
|
|
208
|
-
queries: readonly [...QueriesOptions<T>]
|
|
210
|
+
queries: readonly [...QueriesOptions<T>] | readonly [...{
|
|
211
|
+
[K in keyof T]: GetOptions<T[K]>;
|
|
212
|
+
}];
|
|
209
213
|
combine?: (result: QueriesResults<T>) => TCombinedResult;
|
|
210
214
|
}>, queryClient?: Accessor<QueryClient>): TCombinedResult;
|
|
211
215
|
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QueryClient as QueryClient$1, QueryClientConfig as QueryClientConfig$1, DefaultError, DefaultOptions as DefaultOptions$1, OmitKeyof, QueryKey, QueryObserverOptions as QueryObserverOptions$1, InfiniteQueryObserverOptions as InfiniteQueryObserverOptions$1, QueryObserverResult, DefinedQueryObserverResult, DefinedInfiniteQueryObserverResult, InfiniteQueryObserverResult, MutationObserverOptions, Override, MutationObserverResult, MutateFunction, DataTag, QueryFilters, InfiniteData, MutationFilters, MutationState, Mutation, QueryFunction, ThrowOnError, QueriesPlaceholderDataFunction } from '@tanstack/query-core';
|
|
2
2
|
export * from '@tanstack/query-core';
|
|
3
3
|
import * as solid_js from 'solid-js';
|
|
4
4
|
import { JSX, Accessor } from 'solid-js';
|
|
@@ -203,9 +203,13 @@ type QueriesResults<T extends Array<any>, TResult extends Array<any> = [], TDept
|
|
|
203
203
|
], [
|
|
204
204
|
...TDepth,
|
|
205
205
|
1
|
|
206
|
-
]> :
|
|
206
|
+
]> : {
|
|
207
|
+
[K in keyof T]: GetResults<T[K]>;
|
|
208
|
+
};
|
|
207
209
|
declare function createQueries<T extends Array<any>, TCombinedResult extends QueriesResults<T> = QueriesResults<T>>(queriesOptions: Accessor<{
|
|
208
|
-
queries: readonly [...QueriesOptions<T>]
|
|
210
|
+
queries: readonly [...QueriesOptions<T>] | readonly [...{
|
|
211
|
+
[K in keyof T]: GetOptions<T[K]>;
|
|
212
|
+
}];
|
|
209
213
|
combine?: (result: QueriesResults<T>) => TCombinedResult;
|
|
210
214
|
}>, queryClient?: Accessor<QueryClient>): TCombinedResult;
|
|
211
215
|
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryClient as QueryClient$1, MutationObserver, replaceEqualDeep, QueriesObserver, hydrate, QueryObserver, InfiniteQueryObserver
|
|
1
|
+
import { QueryClient as QueryClient$1, MutationObserver, replaceEqualDeep, QueriesObserver, hydrate, notifyManager, QueryObserver, InfiniteQueryObserver } from '@tanstack/query-core';
|
|
2
2
|
export * from '@tanstack/query-core';
|
|
3
3
|
import { createContext, useContext, createRenderEffect, onCleanup, createMemo, createSignal, createComputed, on, createEffect, mergeProps, createResource, batch, onMount } from 'solid-js';
|
|
4
4
|
import { createComponent, isServer } from 'solid-js/web';
|
|
@@ -10,7 +10,7 @@ var QueryClient = class extends QueryClient$1 {
|
|
|
10
10
|
super(config);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
var QueryClientContext = createContext(
|
|
13
|
+
var QueryClientContext = createContext(void 0);
|
|
14
14
|
var useQueryClient = (queryClient) => {
|
|
15
15
|
if (queryClient) {
|
|
16
16
|
return queryClient;
|
|
@@ -58,7 +58,7 @@ function reconcileFn(store, result, reconcileOption, queryHash) {
|
|
|
58
58
|
return { ...result, data: newData2 };
|
|
59
59
|
}
|
|
60
60
|
let data = result.data;
|
|
61
|
-
if (store.data ===
|
|
61
|
+
if (store.data === void 0) {
|
|
62
62
|
try {
|
|
63
63
|
data = structuredClone(data);
|
|
64
64
|
} catch (error) {
|
|
@@ -74,11 +74,11 @@ var hydratableObserverResult = (query, result) => {
|
|
|
74
74
|
...unwrap(result),
|
|
75
75
|
// During SSR, functions cannot be serialized, so we need to remove them
|
|
76
76
|
// This is safe because we will add these functions back when the query is hydrated
|
|
77
|
-
refetch:
|
|
77
|
+
refetch: void 0
|
|
78
78
|
};
|
|
79
79
|
if ("fetchNextPage" in result) {
|
|
80
|
-
obj.fetchNextPage =
|
|
81
|
-
obj.fetchPreviousPage =
|
|
80
|
+
obj.fetchNextPage = void 0;
|
|
81
|
+
obj.fetchPreviousPage = void 0;
|
|
82
82
|
}
|
|
83
83
|
obj.hydrationData = {
|
|
84
84
|
state: query.state,
|
|
@@ -147,7 +147,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
147
147
|
return reconcileFn(
|
|
148
148
|
store,
|
|
149
149
|
res,
|
|
150
|
-
reconcileOptions ===
|
|
150
|
+
reconcileOptions === void 0 ? false : reconcileOptions,
|
|
151
151
|
opts.queryHash
|
|
152
152
|
);
|
|
153
153
|
});
|
|
@@ -284,7 +284,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
284
284
|
const handler = {
|
|
285
285
|
get(target, prop) {
|
|
286
286
|
if (prop === "data") {
|
|
287
|
-
if (state.data !==
|
|
287
|
+
if (state.data !== void 0) {
|
|
288
288
|
return queryResource.latest?.data;
|
|
289
289
|
}
|
|
290
290
|
return queryResource()?.data;
|
|
@@ -424,7 +424,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
424
424
|
defaultedQueries(),
|
|
425
425
|
queriesOptions().combine ? {
|
|
426
426
|
combine: queriesOptions().combine
|
|
427
|
-
} :
|
|
427
|
+
} : void 0
|
|
428
428
|
);
|
|
429
429
|
const [state, setState] = createStore(
|
|
430
430
|
observer.getOptimisticResult(
|
|
@@ -497,7 +497,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
497
497
|
defaultedQueries(),
|
|
498
498
|
queriesOptions().combine ? {
|
|
499
499
|
combine: queriesOptions().combine
|
|
500
|
-
} :
|
|
500
|
+
} : void 0,
|
|
501
501
|
{ listeners: false }
|
|
502
502
|
);
|
|
503
503
|
});
|
|
@@ -506,7 +506,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
506
506
|
defaultedQueries(),
|
|
507
507
|
queriesOptions().combine ? {
|
|
508
508
|
combine: queriesOptions().combine
|
|
509
|
-
} :
|
|
509
|
+
} : void 0,
|
|
510
510
|
{ listeners: false }
|
|
511
511
|
);
|
|
512
512
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query",
|
|
3
|
-
"version": "5.66.
|
|
3
|
+
"version": "5.66.11",
|
|
4
4
|
"description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"!src/__tests__"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@tanstack/query-core": "5.66.
|
|
48
|
+
"@tanstack/query-core": "5.66.11"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@solidjs/testing-library": "^0.8.10",
|
package/src/createQueries.ts
CHANGED
|
@@ -183,30 +183,16 @@ type QueriesResults<
|
|
|
183
183
|
[...TResult, GetResults<Head>],
|
|
184
184
|
[...TDepth, 1]
|
|
185
185
|
>
|
|
186
|
-
: T
|
|
187
|
-
CreateQueryOptionsForCreateQueries<
|
|
188
|
-
infer TQueryFnData,
|
|
189
|
-
infer TError,
|
|
190
|
-
infer TData,
|
|
191
|
-
any
|
|
192
|
-
>
|
|
193
|
-
>
|
|
194
|
-
? // Dynamic-size (homogenous) UseQueryOptions array: map directly to array of results
|
|
195
|
-
Array<
|
|
196
|
-
CreateQueryResult<
|
|
197
|
-
unknown extends TData ? TQueryFnData : TData,
|
|
198
|
-
unknown extends TError ? DefaultError : TError
|
|
199
|
-
>
|
|
200
|
-
>
|
|
201
|
-
: // Fallback
|
|
202
|
-
Array<CreateQueryResult>
|
|
186
|
+
: { [K in keyof T]: GetResults<T[K]> }
|
|
203
187
|
|
|
204
188
|
export function createQueries<
|
|
205
189
|
T extends Array<any>,
|
|
206
190
|
TCombinedResult extends QueriesResults<T> = QueriesResults<T>,
|
|
207
191
|
>(
|
|
208
192
|
queriesOptions: Accessor<{
|
|
209
|
-
queries:
|
|
193
|
+
queries:
|
|
194
|
+
| readonly [...QueriesOptions<T>]
|
|
195
|
+
| readonly [...{ [K in keyof T]: GetOptions<T[K]> }]
|
|
210
196
|
combine?: (result: QueriesResults<T>) => TCombinedResult
|
|
211
197
|
}>,
|
|
212
198
|
queryClient?: Accessor<QueryClient>,
|