The return type of a SafeFn is a ResultAsync<Value, Error> when using .run() or the useServerAction() hook, or an ActionResult<Value,Error> when calling the function returned by .createAction() directly.
ActionResult is a simple Result type that is used as a NeverThrow Result can
not be serialized and sent over the network. The useServerAction() hook
transforms this ActionResult back into a ResultAsync for you.
With T as the input of your input schema (this differs from output when using things like .transform()). Only applicable if an input schema is defined.
If you defined a parent, its input type will be merged to create one single input error type.
With T as the input of your output schema (this differs from output when using things like .transform()). Only applicable if an output schema is defined. If you defined a parent, its output type will be merged to create one single output error type.
The return type of child.run() or calling child.createAction() through the useServerAction() hook will be:
when calling the returned function from .createAction() directly, the Value and Error types will be identical to the ones above, only wrapped in an ActionResult