Skip to content

Instantly share code, notes, and snippets.

View simonuvarov's full-sized avatar

Simon simonuvarov

View GitHub Profile
/**
/* An attempt to make the error handling process described on Khalil Stemmler's excellent
/* blog a little somewhat simpler.
/* https://khalilstemmler.com/articles/enterprise-typescript-nodejs/functional-error-handling/
/**
// Left and Right classes, but more specific to error handling.
class Failure<L, A = any> {
readonly error: L;