diff --git a/packages/toolkit/src/asyncThunkCreator.ts b/packages/toolkit/src/asyncThunkCreator.ts index d41019cc90..198fb3a1c9 100644 --- a/packages/toolkit/src/asyncThunkCreator.ts +++ b/packages/toolkit/src/asyncThunkCreator.ts @@ -83,15 +83,20 @@ export type AsyncThunkSliceReducerConfig< options?: AsyncThunkOptions } -export type AsyncThunkSliceReducerDefinition< +export interface AsyncThunkSliceReducerDefinition< State, ThunkArg extends any, Returned = unknown, ThunkApiConfig extends AsyncThunkConfig = {}, -> = AsyncThunkSliceReducerConfig & - ReducerDefinition & { - payloadCreator: AsyncThunkPayloadCreator - } +> extends AsyncThunkSliceReducerConfig< + State, + ThunkArg, + Returned, + ThunkApiConfig + >, + ReducerDefinition { + payloadCreator: AsyncThunkPayloadCreator +} /** * Providing these as part of the config would cause circular types, so we disallow passing them