I hereby claim:
- I am remojansen on github.
- I am remojansen (https://keybase.io/remojansen) on keybase.
- I have a public key whose fingerprint is 95CF 4000 58A6 7EBF D965 2C32 C2E7 7CC5 4C37 06E7
To claim this, I am signing this object:
function logClass(target: any) { | |
// save a reference to the original constructor | |
var original = target; | |
// a utility function to generate instances of a class | |
function construct(constructor, args) { | |
var c : any = function () { | |
return constructor.apply(this, args); | |
} |
I hereby claim:
To claim this, I am signing this object:
class Result<T, E = Error> { | |
constructor( | |
private v: T | undefined, | |
private e: E | undefined | |
) {} | |
onSuccess(cb: (v: T) => void) { | |
if (this.v !== undefined) { | |
cb(this.v as T); | |
} | |
} |