Skip to content

Commit

Permalink
switch back to an interface
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 committed Sep 1, 2024
1 parent e9744e0 commit b10f345
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/toolkit/src/asyncThunkCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,20 @@ export type AsyncThunkSliceReducerConfig<
options?: AsyncThunkOptions<ThunkArg, ThunkApiConfig>
}

export type AsyncThunkSliceReducerDefinition<
export interface AsyncThunkSliceReducerDefinition<
State,
ThunkArg extends any,
Returned = unknown,
ThunkApiConfig extends AsyncThunkConfig = {},
> = AsyncThunkSliceReducerConfig<State, ThunkArg, Returned, ThunkApiConfig> &
ReducerDefinition<ReducerType.asyncThunk> & {
payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>
}
> extends AsyncThunkSliceReducerConfig<
State,
ThunkArg,
Returned,
ThunkApiConfig
>,
ReducerDefinition<ReducerType.asyncThunk> {
payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>
}

/**
* Providing these as part of the config would cause circular types, so we disallow passing them
Expand Down

0 comments on commit b10f345

Please sign in to comment.