Discriminated union for an IFailable result.
value or error can be extracted from it using an
if (r.isError)
check
Creates a failable comutation from a function. The supplied function receives an object containing helper functions to create IFailable values. You need to give generic arguments T and E to it indicating the success and failure types.
Failable computation
Async version of failable that takes a computation that returns a Promise<Failable<T, E>>. It can be combined with async/await
Take an array of elements and apply a failable computation to the array, one element at a time, returning an IFailable of items.
Array of values of type T
Function that takes an item of type T from the given array and returns an IFailable<U, E>.
A failable containing an array of U values wrapped inside an IFailable
Object containing static functions for IFailable. Anything that isn't an instance method should be added here.
Generated using TypeDoc
Helper type for an async function that takes Req and returns a FailablePromise<Res, Err>.