From c64c5fed35a5de04448ee2891c8301205c7186b4 Mon Sep 17 00:00:00 2001 From: Markus Thielker Date: Sun, 17 Mar 2024 17:17:57 +0100 Subject: [PATCH] N-FIN-47: enhance the action response interface The interface got a new property called data which can be typed using generics. --- src/lib/types/actionResponse.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/types/actionResponse.ts b/src/lib/types/actionResponse.ts index 3a436c6..a4787da 100644 --- a/src/lib/types/actionResponse.ts +++ b/src/lib/types/actionResponse.ts @@ -1,5 +1,6 @@ -export interface ActionResponse { +export interface ActionResponse { type: 'success' | 'info' | 'warning' | 'error'; message: string; redirect?: string; + data?: T; }