Skip to content

Commit

Permalink
fix it for real this time, probably
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 committed Jan 25, 2024
1 parent 2b9b4dc commit e25222d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/toolkit/src/query/apiTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface ApiModules<

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

export type Module<Name> = {
export type Module<Name extends ModuleName> = {
name: Name
init<
BaseQuery extends BaseQueryFn,
Expand Down
7 changes: 4 additions & 3 deletions packages/toolkit/src/query/react/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -187,8 +188,8 @@ export const reactHooksModule = ({
const anyApi = api as any as Api<
any,
Record<string, any>,
string,
string,
any,
any,
ReactHooksModule
>
const { buildQueryHooks, buildMutationHook, usePrefetch } = buildHooks({
Expand Down

0 comments on commit e25222d

Please sign in to comment.