TsMonad icon indicating copy to clipboard operation
TsMonad copied to clipboard

The valueOrError has `<U extends T>`, why?

Open witoldsz opened this issue 7 years ago • 1 comments

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?

witoldsz avatar Oct 17 '18 12:10 witoldsz

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!

cbowdon avatar Dec 15 '18 12:12 cbowdon