@tuyau/react-query 1.0.0-beta.3 → 1.0.0-beta.4
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/index.d.ts +9 -8
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -18,7 +18,9 @@ interface DecorateQueryFn<EDef extends SchemaEndpoint> {
|
|
|
18
18
|
interface TuyauReactQueryOptions<EDef extends SchemaEndpoint> {
|
|
19
19
|
<TData = Response$2<EDef>>(input: RawRequestArgs<EDef> | SkipToken, opts: DefinedTuyauQueryOptionsIn<Response$2<EDef>, TData, unknown>): DefinedTuyauQueryOptionsOut<Response$2<EDef>, TData, unknown>;
|
|
20
20
|
<TData = Response$2<EDef>>(input: RawRequestArgs<EDef>, opts?: UnusedSkipTokenTuyauQueryOptionsIn<Response$2<EDef>, TData, unknown>): UnusedSkipTokenTuyauQueryOptionsOut<Response$2<EDef>, TData, unknown>;
|
|
21
|
-
|
|
21
|
+
(): UnusedSkipTokenTuyauQueryOptionsOut<Response$2<EDef>, Response$2<EDef>, unknown>;
|
|
22
|
+
(input: SkipToken): UndefinedTuyauQueryOptionsOut<Response$2<EDef>, Response$2<EDef>, unknown>;
|
|
23
|
+
<TData = Response$2<EDef>>(input: RawRequestArgs<EDef> | SkipToken, opts?: UndefinedTuyauQueryOptionsIn<Response$2<EDef>, TData, unknown>): UndefinedTuyauQueryOptionsOut<Response$2<EDef>, TData, unknown>;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
/**
|
|
@@ -104,11 +106,6 @@ interface UnusedSkipTokenTuyauInfiniteQueryOptionsOut<TQueryFnData, TError, TDat
|
|
|
104
106
|
}
|
|
105
107
|
/**
|
|
106
108
|
* Type definition for infinite query options with proper overloads.
|
|
107
|
-
*
|
|
108
|
-
* Three overloads handle different cases:
|
|
109
|
-
* 1. Input without SkipToken => Returns type compatible with useSuspenseInfiniteQuery
|
|
110
|
-
* 2. Input with SkipToken + defined initialData => Returns type with SkipToken possible
|
|
111
|
-
* 3. Input with SkipToken (default) => Returns type with SkipToken possible
|
|
112
109
|
*/
|
|
113
110
|
interface TuyauReactInfiniteQueryOptions<EDef extends SchemaEndpoint> {
|
|
114
111
|
/**
|
|
@@ -120,9 +117,13 @@ interface TuyauReactInfiniteQueryOptions<EDef extends SchemaEndpoint> {
|
|
|
120
117
|
*/
|
|
121
118
|
<TData = InfiniteData<Response<EDef>>>(input: RawRequestArgs<EDef> | SkipToken, opts: DefinedTuyauInfiniteQueryOptionsIn<Response<EDef>, unknown, TData>): DefinedTuyauInfiniteQueryOptionsOut<Response<EDef>, unknown, TData>;
|
|
122
119
|
/**
|
|
123
|
-
* Overload 3:
|
|
120
|
+
* Overload 3: No arguments - no skipToken possible
|
|
124
121
|
*/
|
|
125
|
-
|
|
122
|
+
(): UnusedSkipTokenTuyauInfiniteQueryOptionsOut<Response<EDef>, unknown, InfiniteData<Response<EDef>>>;
|
|
123
|
+
/**
|
|
124
|
+
* Overload 4: With skipToken or conditional (request | skipToken) and options
|
|
125
|
+
*/
|
|
126
|
+
<TData = InfiniteData<Response<EDef>>>(input: RawRequestArgs<EDef> | SkipToken, opts: UndefinedTuyauInfiniteQueryOptionsIn<Response<EDef>, unknown, TData>): UndefinedTuyauInfiniteQueryOptionsOut<Response<EDef>, unknown, TData>;
|
|
126
127
|
}
|
|
127
128
|
/**
|
|
128
129
|
* Decorate query endpoints with infinite query capabilities
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuyau/react-query",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.4",
|
|
5
5
|
"description": "Tanstack Query integration for Tuyau",
|
|
6
6
|
"author": "Julien Ripouteau <julien@ripouteau.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@types/react": "^19.2.7",
|
|
46
46
|
"@vinejs/vine": "^4.2.0",
|
|
47
47
|
"react": "^19.2.3",
|
|
48
|
-
"@tuyau/core": "1.0.0-beta.
|
|
48
|
+
"@tuyau/core": "1.0.0-beta.10"
|
|
49
49
|
},
|
|
50
50
|
"tsup": {
|
|
51
51
|
"entry": [
|