@@ -310,9 +310,19 @@ describe('fully typed usage', () => {
310310 const fetchedQuery = await queryClient . fetchQuery ( queryOptions )
311311 expectTypeOf ( fetchedQuery ) . toEqualTypeOf < TData > ( )
312312
313+ const queriedData = await queryClient . query ( queryOptions )
314+ expectTypeOf ( queriedData ) . toEqualTypeOf < TData > ( )
315+
313316 queryClient . prefetchQuery ( queryOptions )
314317
315- const infiniteQuery = await queryClient . fetchInfiniteQuery (
318+ const fetchInfiniteQueryResult = await queryClient . fetchInfiniteQuery (
319+ fetchInfiniteQueryOptions ,
320+ )
321+ expectTypeOf ( fetchInfiniteQueryResult ) . toEqualTypeOf <
322+ InfiniteData < TData , unknown >
323+ > ( )
324+
325+ const infiniteQuery = await queryClient . infiniteQuery (
316326 fetchInfiniteQueryOptions ,
317327 )
318328 expectTypeOf ( infiniteQuery ) . toEqualTypeOf < InfiniteData < TData , unknown > > ( )
@@ -449,9 +459,19 @@ describe('fully typed usage', () => {
449459 const fetchedQuery = await queryClient . fetchQuery ( queryOptions )
450460 expectTypeOf ( fetchedQuery ) . toEqualTypeOf < unknown > ( )
451461
462+ const queriedData = await queryClient . query ( queryOptions )
463+ expectTypeOf ( queriedData ) . toEqualTypeOf < unknown > ( )
464+
452465 queryClient . prefetchQuery ( queryOptions )
453466
454- const infiniteQuery = await queryClient . fetchInfiniteQuery (
467+ const fetchInfiniteQueryResult = await queryClient . fetchInfiniteQuery (
468+ fetchInfiniteQueryOptions ,
469+ )
470+ expectTypeOf ( fetchInfiniteQueryResult ) . toEqualTypeOf <
471+ InfiniteData < unknown , unknown >
472+ > ( )
473+
474+ const infiniteQuery = await queryClient . infiniteQuery (
455475 fetchInfiniteQueryOptions ,
456476 )
457477 expectTypeOf ( infiniteQuery ) . toEqualTypeOf < InfiniteData < unknown , unknown > > ( )
0 commit comments