selfrefactor / rambda

Faster and smaller alternative to Ramda
https://selfrefactor.github.io/rambda
MIT License
1.64k stars 89 forks source link

pathOr types don't match path types #90

Closed chimon2000 closed 5 years ago

chimon2000 commented 5 years ago

In the site documentation, there is an example of pathOr with a string for the path property:

R.pathOr(1, 'a.b', {a: {b: 2}}) // => 2

This causes an error when using TypeScript because the definitions do not allow a string like they do with the path function. https://github.com/selfrefactor/rambda/blob/b27e21dc1ba97fb500fcd0b9fdd59d81b7340cb1/index.d.ts#L391-L396

selfrefactor commented 5 years ago

Duly noted, will fix it in two days as I cannot do so earlier than that.