mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-04-12 05:08:43 +00:00
N-FIN-47: enhance the action response interface
The interface got a new property called data which can be typed using generics.
This commit is contained in:
parent
bdbb80121a
commit
c64c5fed35
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
export interface ActionResponse {
|
export interface ActionResponse<T = any> {
|
||||||
type: 'success' | 'info' | 'warning' | 'error';
|
type: 'success' | 'info' | 'warning' | 'error';
|
||||||
message: string;
|
message: string;
|
||||||
redirect?: string;
|
redirect?: string;
|
||||||
|
data?: T;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue