@@ -102,35 +102,29 @@ export function createAction<P = void, T extends string = string>(type: T): Payl
102
102
export function createAction<PA extends PrepareAction <any >, T extends string = string >(type : T , prepareAction : PA ): PayloadActionCreator <ReturnType <PA >[' payload' ], T , PA >;
103
103
104
104
// @alpha (undocumented)
105
- export function createAsyncThunk<ActionType extends string , Returned , ActionParams = void , TA extends AsyncThunksArgs <any , any , any > = AsyncThunksArgs <unknown , unknown , Dispatch >>(type : ActionType , payloadCreator : (args : ActionParams , thunkArgs : TA ) => Promise <Returned > | Returned ): ((args : ActionParams ) => (dispatch : TA [" dispatch" ], getState : TA [" getState" ], extra : TA [" extra" ]) => Promise <import (" ./createAction" ).PayloadAction <undefined , string , {
106
- args : ActionParams ;
105
+ export function createAsyncThunk<ActionType extends string , Returned , ThunkArg = void , ThunkAPI extends BaseThunkAPI <any , any , any > = BaseThunkAPI <unknown , unknown , Dispatch >>(type : ActionType , payloadCreator : (arg : ThunkArg , thunkAPI : ThunkAPI ) => Promise <Returned > | Returned ): ((arg : ThunkArg ) => (dispatch : ThunkAPI [" dispatch" ], getState : ThunkAPI [" getState" ], extra : ThunkAPI [" extra" ]) => Promise <import (" ./createAction" ).PayloadAction <undefined , string , {
106
+ arg : ThunkArg ;
107
107
requestId: string ;
108
- } | {
109
108
aborted: boolean ;
110
- abortReason: string ;
111
- args: ActionParams ;
112
- requestId: string ;
109
+ abortReason: string | undefined ;
113
110
}, any > | import (" ./createAction" ).PayloadAction <Returned , string , {
114
- args : ActionParams ;
111
+ arg : ThunkArg ;
115
112
requestId: string ;
116
113
}, never >> & {
117
114
abort: (reason ? : string ) => void ;
118
115
}) & {
119
- pending: import (" ./createAction" ).ActionCreatorWithPreparedPayload <[string , ActionParams ], undefined , string , never , {
120
- args : ActionParams ;
116
+ pending: import (" ./createAction" ).ActionCreatorWithPreparedPayload <[string , ThunkArg ], undefined , string , never , {
117
+ arg : ThunkArg ;
121
118
requestId: string ;
122
119
}>;
123
- rejected: import (" ./createAction" ).ActionCreatorWithPreparedPayload <[Error , string , ActionParams ], undefined , string , any , {
124
- args : ActionParams ;
120
+ rejected: import (" ./createAction" ).ActionCreatorWithPreparedPayload <[Error , string , ThunkArg ], undefined , string , any , {
121
+ arg : ThunkArg ;
125
122
requestId: string ;
126
- } | {
127
123
aborted: boolean ;
128
- abortReason: string ;
129
- args: ActionParams ;
130
- requestId: string ;
124
+ abortReason: string | undefined ;
131
125
}>;
132
- fulfilled: import (" ./createAction" ).ActionCreatorWithPreparedPayload <[Returned , string , ActionParams ], Returned , string , never , {
133
- args : ActionParams ;
126
+ fulfilled: import (" ./createAction" ).ActionCreatorWithPreparedPayload <[Returned , string , ThunkArg ], Returned , string , never , {
127
+ arg : ThunkArg ;
134
128
requestId: string ;
135
129
}>;
136
130
};
@@ -260,6 +254,18 @@ export interface SerializableStateInvariantMiddlewareOptions {
260
254
isSerializable? : (value : any ) => boolean ;
261
255
}
262
256
257
+ // @alpha (undocumented)
258
+ export interface SerializedError {
259
+ // (undocumented)
260
+ code? : string ;
261
+ // (undocumented)
262
+ message? : string ;
263
+ // (undocumented)
264
+ name? : string ;
265
+ // (undocumented)
266
+ stack? : string ;
267
+ }
268
+
263
269
// @public
264
270
export interface Slice <State = any , CaseReducers extends SliceCaseReducers <State > = SliceCaseReducers <State >> {
265
271
actions: CaseReducerActions <CaseReducers >;
0 commit comments