Skip to content

Commit fc4e1d1

Browse files
committed
Infer select return from useInfiniteQuery
1 parent 8330f5a commit fc4e1d1

File tree

1 file changed

+2
-2
lines changed
  • packages/openapi-react-query/src

1 file changed

+2
-2
lines changed

packages/openapi-react-query/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export type UseInfiniteQueryMethod<Paths extends Record<string, Record<HttpMetho
110110
UseInfiniteQueryOptions<
111111
Response["data"],
112112
Response["error"],
113-
InfiniteData<Response["data"]>,
113+
InferSelectReturnType<InfiniteData<Response["data"]>, Options["select"]>,
114114
Response["data"],
115115
QueryKey<Paths, Method, Path>,
116116
unknown
@@ -125,7 +125,7 @@ export type UseInfiniteQueryMethod<Paths extends Record<string, Record<HttpMetho
125125
init: InitWithUnknowns<Init>,
126126
options: Options,
127127
queryClient?: QueryClient,
128-
) => UseInfiniteQueryResult<InfiniteData<Response["data"]>, Response["error"]>;
128+
) => UseInfiniteQueryResult<InferSelectReturnType<InfiniteData<Response["data"]>, Options["select"]>, Response["error"]>;
129129

130130
export type UseSuspenseQueryMethod<Paths extends Record<string, Record<HttpMethod, {}>>, Media extends MediaType> = <
131131
Method extends HttpMethod,

0 commit comments

Comments
 (0)