diff --git a/src/composable/composable.ts b/src/composable/composable.ts index c45040b9..05b342c4 100644 --- a/src/composable/composable.ts +++ b/src/composable/composable.ts @@ -36,6 +36,11 @@ function error(errors: ErrorWithMessage[]): Failure { return { success: false, errors } } +/** + * Creates a composable function. + * That function is gonna catch any errors and always return a Result. + * @param fn a function to be used as a Composable + */ function composable(fn: T): Composable { return async (...args) => { try {