Skip to content

Commit ec946dc

Browse files
committed
fix inferrence and order of async thunk generics
1 parent ea1017f commit ec946dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/toolkit/src/createSlice.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ interface AsyncThunkCreator<
350350
State,
351351
CurriedThunkApiConfig extends PreventCircular<AsyncThunkConfig> = PreventCircular<AsyncThunkConfig>
352352
> {
353-
<ThunkArg extends any, Returned = unknown>(
353+
<Returned, ThunkArg = void>(
354354
payloadCreator: AsyncThunkPayloadCreator<
355355
Returned,
356356
ThunkArg,
@@ -369,8 +369,8 @@ interface AsyncThunkCreator<
369369
CurriedThunkApiConfig
370370
>
371371
<
372-
ThunkArg extends any,
373-
Returned = unknown,
372+
Returned,
373+
ThunkArg,
374374
ThunkApiConfig extends PreventCircular<AsyncThunkConfig> = {}
375375
>(
376376
payloadCreator: AsyncThunkPayloadCreator<

0 commit comments

Comments
 (0)