Skip to content

Commit e25222d

Browse files
committed
fix it for real this time, probably
1 parent 2b9b4dc commit e25222d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/toolkit/src/query/apiTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface ApiModules<
2828

2929
export type ModuleName = keyof ApiModules<any, any, any, any>
3030

31-
export type Module<Name> = {
31+
export type Module<Name extends ModuleName> = {
3232
name: Name
3333
init<
3434
BaseQuery extends BaseQueryFn,

packages/toolkit/src/query/react/module.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import type {
44
MutationDefinition,
55
QueryArgFrom,
66
QueryDefinition,
7+
Api,
8+
Module,
79
} from '@reduxjs/toolkit/query'
8-
import type { Api, Module } from '../apiTypes'
910
import { isMutationDefinition, isQueryDefinition } from '../endpointDefinitions'
1011
import { safeAssign } from '../tsHelpers'
1112
import { capitalize } from '../utils'
@@ -187,8 +188,8 @@ export const reactHooksModule = ({
187188
const anyApi = api as any as Api<
188189
any,
189190
Record<string, any>,
190-
string,
191-
string,
191+
any,
192+
any,
192193
ReactHooksModule
193194
>
194195
const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({

0 commit comments

Comments
 (0)