toResult
toResult<
E>(onNotReady): <A>(data) =>Result<E,A>
Defined in: Core/RemoteData.ts:283
Converts a RemoteData to a Result. Success becomes Ok, Failure becomes Err. NotAsked and Loading become Err with the provided fallback error.
Type Parameters
Section titled “Type Parameters”E
Parameters
Section titled “Parameters”onNotReady
Section titled “onNotReady”() => E
Returns
Section titled “Returns”<A>(data) => Result<E, A>