FunctionResult type

Void if no return output is registered Otherwise, the registered return output

type FunctionResult<T> = T | Promise<T>