@@ -35,9 +35,7 @@ export type BaseThunkAPI<
35
35
>
36
36
fulfillWithValue : IsUnknown <
37
37
FulfilledMeta ,
38
- < FulfilledValue > (
39
- value : FulfilledValue
40
- ) => FulfillWithMeta < FulfilledValue , FulfilledMeta > ,
38
+ < FulfilledValue > ( value : FulfilledValue ) => FulfilledValue ,
41
39
< FulfilledValue > (
42
40
value : FulfilledValue ,
43
41
meta : FulfilledMeta
@@ -405,18 +403,16 @@ export type AsyncThunk<
405
403
Returned ,
406
404
ThunkArg ,
407
405
ThunkApiConfig extends AsyncThunkConfig
408
- > = [ Returned ] extends [ FulfillWithMeta < infer P , infer M > ]
409
- ? AsyncThunk < P , ThunkArg , ThunkApiConfig & { fulfilledMeta : M } >
410
- : AsyncThunkActionCreator < Returned , ThunkArg , ThunkApiConfig > & {
411
- pending : AsyncThunkPendingActionCreator < ThunkArg , ThunkApiConfig >
412
- rejected : AsyncThunkRejectedActionCreator < ThunkArg , ThunkApiConfig >
413
- fulfilled : AsyncThunkFulfilledActionCreator <
414
- Returned ,
415
- ThunkArg ,
416
- ThunkApiConfig
417
- >
418
- typePrefix : string
419
- }
406
+ > = AsyncThunkActionCreator < Returned , ThunkArg , ThunkApiConfig > & {
407
+ pending : AsyncThunkPendingActionCreator < ThunkArg , ThunkApiConfig >
408
+ rejected : AsyncThunkRejectedActionCreator < ThunkArg , ThunkApiConfig >
409
+ fulfilled : AsyncThunkFulfilledActionCreator <
410
+ Returned ,
411
+ ThunkArg ,
412
+ ThunkApiConfig
413
+ >
414
+ typePrefix : string
415
+ }
420
416
421
417
type OverrideThunkApiConfigs < OldConfig , NewConfig > = Id <
422
418
NewConfig & Omit < OldConfig , keyof NewConfig >
@@ -696,12 +692,19 @@ If you want to use the AbortController to react to \`abort\` events, please cons
696
692
}
697
693
}
698
694
699
- return Object . assign ( actionCreator as any , {
700
- pending,
701
- rejected,
702
- fulfilled,
703
- typePrefix,
704
- } )
695
+ return Object . assign (
696
+ actionCreator as AsyncThunkActionCreator <
697
+ Returned ,
698
+ ThunkArg ,
699
+ ThunkApiConfig
700
+ > ,
701
+ {
702
+ pending,
703
+ rejected,
704
+ fulfilled,
705
+ typePrefix,
706
+ }
707
+ )
705
708
}
706
709
createAsyncThunk . withTypes = ( ) => createAsyncThunk
707
710
0 commit comments