From 200d2f114326dad6bd46b0e8fd401b4c17d944ff Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Sun, 15 May 2022 11:32:55 +0200 Subject: [PATCH] docs: remove outdated onAction docs Close #1294 --- packages/pinia/src/types.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) 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 } /** -- 2.47.3