Closed ipanasenko closed 6 years ago
Unfortunately, it'll cause an unexpected inference for currying due to their type parameter dependencies:
-R.pathOr('N/A')(['a', 'b'], { a: { b: 2 } }) //=> string | {}
+R.pathOr('N/A')(['a', 'b'], { a: { b: 2 } }) //=> string
Got you, thanks!
Hey guys.
I'm using
pathOr
like this:It seems that I always need to specify two generics, even if I want default to be the same type as what I get on that path.
Do you think we can make second generic optional?
BTW, I think this also applies to
propOr