File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -198,26 +198,19 @@ export interface _StoreOnActionListenerContext<
198
198
199
199
/**
200
200
* Sets up a hook once the action is finished. It receives the return value
201
- * of the action, if it's a Promise, it will be unwrapped. Can return a
202
- * value (other than `undefined`) to **override** the returned value.
201
+ * of the action, if it's a Promise, it will be unwrapped.
203
202
*/
204
203
after : (
205
204
callback : A extends Record < ActionName , _Method >
206
- ? (
207
- resolvedReturn : _Awaited < ReturnType < A [ ActionName ] > >
208
- // allow the after callback to override the return value
209
- ) =>
210
- | void
211
- | ReturnType < A [ ActionName ] >
212
- | _Awaited < ReturnType < A [ ActionName ] > >
205
+ ? ( resolvedReturn : _Awaited < ReturnType < A [ ActionName ] > > ) => void
213
206
: ( ) => void
214
207
) => void
215
208
216
209
/**
217
210
* Sets up a hook if the action fails. Return `false` to catch the error and
218
211
* stop it fro propagating.
219
212
*/
220
- onError : ( callback : ( error : unknown ) => unknown | false ) => void
213
+ onError : ( callback : ( error : unknown ) => void ) => void
221
214
}
222
215
223
216
/**
You can’t perform that action at this time.
0 commit comments