@@ -97,59 +97,6 @@ export type MutationOptionsFunction<Paths extends Record<string, Record<HttpMeth
9797 }
9898> ;
9999
100- // Helper type to infer TPageParam type
101- type InferPageParamType < T > = T extends { initialPageParam : infer P } ? P : unknown ;
102-
103- export type InfiniteQueryOptionsFunction <
104- Paths extends Record < string , Record < HttpMethod , { } > > ,
105- Media extends MediaType ,
106- > = <
107- Method extends HttpMethod ,
108- Path extends PathsWithMethod < Paths , Method > ,
109- Init extends MaybeOptionalInit < Paths [ Path ] , Method > ,
110- Response extends Required < FetchResponse < Paths [ Path ] [ Method ] , Init , Media > > ,
111- Options extends Omit <
112- UseInfiniteQueryOptions <
113- Response [ "data" ] ,
114- Response [ "error" ] ,
115- InferSelectReturnType < InfiniteData < Response [ "data" ] > , Options [ "select" ] > ,
116- QueryKey < Paths , Method , Path > ,
117- InferPageParamType < Options >
118- > ,
119- "queryKey" | "queryFn"
120- > & {
121- pageParamName ?: string ;
122- initialPageParam : InferPageParamType < Options > ;
123- } ,
124- > (
125- method : Method ,
126- path : Path ,
127- init : InitWithUnknowns < Init > ,
128- options : Options ,
129- ) => NoInfer <
130- Omit <
131- UseInfiniteQueryOptions <
132- Response [ "data" ] ,
133- Response [ "error" ] ,
134- InferSelectReturnType < InfiniteData < Response [ "data" ] > , Options [ "select" ] > ,
135- QueryKey < Paths , Method , Path > ,
136- InferPageParamType < Options >
137- > ,
138- "queryFn"
139- > & {
140- queryFn : Exclude <
141- UseInfiniteQueryOptions <
142- Response [ "data" ] ,
143- Response [ "error" ] ,
144- InferSelectReturnType < InfiniteData < Response [ "data" ] > , Options [ "select" ] > ,
145- QueryKey < Paths , Method , Path > ,
146- InferPageParamType < Options >
147- > [ "queryFn" ] ,
148- SkipToken | undefined
149- > ;
150- }
151- > ;
152-
153100export type UseQueryMethod < Paths extends Record < string , Record < HttpMethod , { } > > , Media extends MediaType > = <
154101 Method extends HttpMethod ,
155102 Path extends PathsWithMethod < Paths , Method > ,
0 commit comments