File tree Expand file tree Collapse file tree 2 files changed +8
-37
lines changed
packages/toolkit/src/query/tests Expand file tree Collapse file tree 2 files changed +8
-37
lines changed Original file line number Diff line number Diff line change @@ -322,37 +322,6 @@ describe('type tests', () => {
322322 SelectedResult
323323 > = ( state ) => ( { posts : state . data ?. posts ?? EMPTY_ARRAY } )
324324
325- expectTypeOf <
326- TypedQueryStateSelector <
327- PostsApiResponse ,
328- QueryArgument ,
329- BaseQueryFunction ,
330- SelectedResult
331- >
332- > ( ) . toEqualTypeOf <
333- QueryStateSelector <
334- SelectedResult ,
335- QueryDefinition <
336- QueryArgument ,
337- BaseQueryFunction ,
338- string ,
339- PostsApiResponse
340- >
341- >
342- > ( )
343-
344- expectTypeOf ( typedSelectFromResult ) . toEqualTypeOf <
345- QueryStateSelector <
346- SelectedResult ,
347- QueryDefinition <
348- QueryArgument ,
349- BaseQueryFunction ,
350- string ,
351- PostsApiResponse
352- >
353- >
354- > ( )
355-
356325 function PostsList ( ) {
357326 const { posts } = useGetPostsQuery ( undefined , {
358327 selectFromResult : typedSelectFromResult ,
Original file line number Diff line number Diff line change @@ -78,9 +78,11 @@ describe('Infinite queries', () => {
7878
7979 expectTypeOf ( pokemonApi . useGetInfinitePokemonInfiniteQuery ) . toBeFunction ( )
8080
81- expectTypeOf ( pokemonApi . endpoints . getInfinitePokemon . useInfiniteQuery )
82- . parameter ( 0 )
83- . toEqualTypeOf < string | typeof skipToken > ( )
81+ expectTypeOf <
82+ Parameters <
83+ typeof pokemonApi . endpoints . getInfinitePokemon . useInfiniteQuery
84+ > [ 0 ]
85+ > ( ) . toEqualTypeOf < string | typeof skipToken > ( )
8486
8587 expectTypeOf ( pokemonApi . endpoints . getInfinitePokemon . useInfiniteQueryState )
8688 . parameter ( 0 )
@@ -128,9 +130,9 @@ describe('Infinite queries', () => {
128130 const useGetInfinitePokemonQuery =
129131 pokemonApi . endpoints . getInfinitePokemon . useInfiniteQuery
130132
131- expectTypeOf ( useGetInfinitePokemonQuery )
132- . parameter ( 0 )
133- . toEqualTypeOf < string | typeof skipToken > ( )
133+ expectTypeOf <
134+ Parameters < typeof useGetInfinitePokemonQuery > [ 0 ]
135+ > ( ) . toEqualTypeOf < string | typeof skipToken > ( )
134136
135137 function PokemonList ( ) {
136138 const {
You can’t perform that action at this time.
0 commit comments