File tree 2 files changed +21
-6
lines changed
2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " safe-fn " : patch
3
+ " safe-fn-react " : patch
4
+ ---
5
+
6
+ Fix type issues with the hook (related to distribution)
Original file line number Diff line number Diff line change @@ -60,14 +60,23 @@ export type InferActionErrError<T> =
60
60
/**
61
61
* Converts a `ResultAsync<T,E>` to a `<ActionResult<T,E>`.
62
62
*/
63
- export type ResultAsyncToActionResult < T > =
64
- T extends ResultAsync < infer D , infer E > ? ActionResult < D , E > : never ;
63
+ export type ResultAsyncToActionResult < T > = [ T ] extends [
64
+ ResultAsync < infer D , infer E > ,
65
+ ]
66
+ ? ActionResult < D , E >
67
+ : never ;
65
68
66
- export type ActionResultToResultAsync < T > =
67
- T extends ActionResult < infer D , infer E > ? ResultAsync < D , E > : never ;
69
+ export type ActionResultToResultAsync < T > = [ T ] extends [
70
+ ActionResult < infer D , infer E > ,
71
+ ]
72
+ ? ResultAsync < D , E >
73
+ : never ;
68
74
69
- export type ActionResultToResult < T > =
70
- T extends ActionResult < infer D , infer E > ? Result < D , E > : never ;
75
+ export type ActionResultToResult < T > = [ T ] extends [
76
+ ActionResult < infer D , infer E > ,
77
+ ]
78
+ ? Result < D , E >
79
+ : never ;
71
80
72
81
/**
73
82
* Converts an `ActionResult<T,E>` to a `Result<T,E>`.
You can’t perform that action at this time.
0 commit comments