TsMonad
TsMonad copied to clipboard
The valueOrError has `<U extends T>`, why?
I try to extract the value inside Maybe with undefined as Nothing:
errors = mappedErrors.valueOr(undefined)
Trouble is, the <U extends T> does not allow me to default to undefined. What is that constraint for?
Sorry, I honestly can't remember. It's been a couple of years since I spent real time on this library. Not a great answer I know!