From: Eduardo San Martin Morote Date: Sun, 15 May 2022 09:32:55 +0000 (+0200) Subject: docs: remove outdated onAction docs X-Git-Tag: @pinia/nuxt@0.2.0~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=200d2f114326dad6bd46b0e8fd401b4c17d944ff;p=thirdparty%2Fvuejs%2Fpinia.git docs: remove outdated onAction docs Close #1294 --- diff --git a/packages/pinia/src/types.ts b/packages/pinia/src/types.ts index 36592cca..35bcae7a 100644 --- a/packages/pinia/src/types.ts +++ b/packages/pinia/src/types.ts @@ -198,18 +198,11 @@ export interface _StoreOnActionListenerContext< /** * Sets up a hook once the action is finished. It receives the return value - * of the action, if it's a Promise, it will be unwrapped. Can return a - * value (other than `undefined`) to **override** the returned value. + * of the action, if it's a Promise, it will be unwrapped. */ after: ( callback: A extends Record - ? ( - resolvedReturn: _Awaited> - // allow the after callback to override the return value - ) => - | void - | ReturnType - | _Awaited> + ? (resolvedReturn: _Awaited>) => void : () => void ) => void @@ -217,7 +210,7 @@ export interface _StoreOnActionListenerContext< * Sets up a hook if the action fails. Return `false` to catch the error and * stop it fro propagating. */ - onError: (callback: (error: unknown) => unknown | false) => void + onError: (callback: (error: unknown) => void) => void } /**