diff --git a/packages/toolkit/src/query/apiTypes.ts b/packages/toolkit/src/query/apiTypes.ts index 7065455bf0..2aa7992999 100644 --- a/packages/toolkit/src/query/apiTypes.ts +++ b/packages/toolkit/src/query/apiTypes.ts @@ -28,7 +28,7 @@ export interface ApiModules< export type ModuleName = keyof ApiModules -export type Module = { +export type Module = { name: Name init< BaseQuery extends BaseQueryFn, diff --git a/packages/toolkit/src/query/react/module.ts b/packages/toolkit/src/query/react/module.ts index f4b41e9eac..f6e46b120f 100644 --- a/packages/toolkit/src/query/react/module.ts +++ b/packages/toolkit/src/query/react/module.ts @@ -4,8 +4,9 @@ import type { MutationDefinition, QueryArgFrom, QueryDefinition, + Api, + Module, } from '@reduxjs/toolkit/query' -import type { Api, Module } from '../apiTypes' import { isMutationDefinition, isQueryDefinition } from '../endpointDefinitions' import { safeAssign } from '../tsHelpers' import { capitalize } from '../utils' @@ -187,8 +188,8 @@ export const reactHooksModule = ({ const anyApi = api as any as Api< any, Record, - string, - string, + any, + any, ReactHooksModule > const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({