toResult
toResult<
E>(onNotReady): <A>(data) =>Result<E,A>
Defined in: Core/RemoteData.ts:278
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>
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”RemoteData<E, A>
Returns
Section titled “Returns”Result<E, A>