recover
recover<
E,A,B>(fallback): (data) =>Validation<E,A|B>
Defined in: Core/Validation.ts:202
Recovers from an Invalid state by providing a fallback Validation.
The fallback receives the accumulated error list so callers can inspect which errors occurred.
The fallback can produce a different success type, widening the result to Validation<E, A | B>.
Type Parameters
Section titled “Type Parameters”E
A
B
Parameters
Section titled “Parameters”fallback
Section titled “fallback”(errors) => Validation<E, B>
Returns
Section titled “Returns”(
data):Validation<E,A|B>
Parameters
Section titled “Parameters”Validation<E, A>
Returns
Section titled “Returns”Validation<E, A | B>