Wraps a function and returns validation result if an error occurs.
Validation result and target function execution result.
const [validationResult, result] = runWithValidationResult(() => myFunc());if (!validationResult.isSuccessful) { // log error}
Target function.
Generated using TypeDoc
Wraps a function and returns validation result if an error occurs.
Returns
Validation result and target function execution result.
Example