@@ -34,21 +34,19 @@ export type SafeActionResult<
34
34
Data = unknown ,
35
35
// eslint-disable-next-line
36
36
NextCtx = unknown ,
37
- > =
38
- | {
39
- data ?: Data ;
40
- serverError ?: ServerError ;
41
- validationErrors ?: CVE ;
42
- bindArgsValidationErrors ?: CBAVE ;
43
- }
44
- | undefined ;
37
+ > = {
38
+ data ?: Data ;
39
+ serverError ?: ServerError ;
40
+ validationErrors ?: CVE ;
41
+ bindArgsValidationErrors ?: CBAVE ;
42
+ } ;
45
43
46
44
/**
47
45
* Type of the function called from components with type safe input data.
48
46
*/
49
47
export type SafeActionFn < ServerError , S extends Schema | undefined , BAS extends readonly Schema [ ] , CVE , CBAVE , Data > = (
50
48
...clientInputs : [ ...bindArgsInputs : InferInArray < BAS > , input : S extends Schema ? InferIn < S > : void ]
51
- ) => Promise < SafeActionResult < ServerError , S , BAS , CVE , CBAVE , Data > > ;
49
+ ) => Promise < SafeActionResult < ServerError , S , BAS , CVE , CBAVE , Data > | undefined > ;
52
50
53
51
/**
54
52
* Type of the stateful function called from components with type safe input data.
@@ -66,7 +64,7 @@ export type SafeStateActionFn<
66
64
prevResult : Prettify < SafeActionResult < ServerError , S , BAS , CVE , CBAVE , Data > > ,
67
65
input : S extends Schema ? InferIn < S > : void ,
68
66
]
69
- ) => Promise < SafeActionResult < ServerError , S , BAS , CVE , CBAVE , Data > > ;
67
+ ) => Promise < SafeActionResult < ServerError , S , BAS , CVE , CBAVE , Data > | undefined > ;
70
68
71
69
/**
72
70
* Type of the result of a middleware function. It extends the result of a safe action with
0 commit comments