File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
packages/toolkit/src/query/tests Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change
1
+ import { setupApiStore } from '@internal/tests/utils/helpers'
2
+ import type { SerializedError } from '@reduxjs/toolkit'
3
+ import { configureStore } from '@reduxjs/toolkit'
1
4
import type {
2
5
DefinitionsFromApi ,
3
6
OverrideResultType ,
4
7
TagTypesFromApi ,
5
8
} from '@reduxjs/toolkit/dist/query/endpointDefinitions'
6
- import { ANY , setupApiStore } from '@internal/tests/utils/helpers'
7
- import type { SerializedError } from '@reduxjs/toolkit'
8
- import { configureStore } from '@reduxjs/toolkit'
9
9
import type {
10
- Api ,
11
10
FetchBaseQueryError ,
12
11
MutationDefinition ,
13
12
QueryDefinition ,
13
+ TagDescription ,
14
14
} from '@reduxjs/toolkit/query'
15
15
import { createApi , fetchBaseQuery } from '@reduxjs/toolkit/query'
16
16
@@ -39,12 +39,9 @@ describe('type tests', () => {
39
39
40
40
expectTypeOf ( api . reducerPath ) . toEqualTypeOf < 'api' > ( )
41
41
42
- type TagTypes =
43
- typeof api extends Api < any , any , any , infer E > ? E : 'no match'
44
-
45
- assertType < TagTypes > ( ANY as never )
46
-
47
- expectTypeOf ( 0 ) . not . toMatchTypeOf < TagTypes > ( )
42
+ expectTypeOf ( api . util . invalidateTags )
43
+ . parameter ( 0 )
44
+ . toEqualTypeOf < TagDescription < never > [ ] > ( )
48
45
} )
49
46
50
47
describe ( 'endpoint definition typings' , ( ) => {
You can’t perform that action at this time.
0 commit comments