We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey guys.
I'm using pathOr like this:
pathOr
type TSomeProp = { cc: number; }; type TItem = { aaa: TSomeProp[]; }; const item: TItem = { ... }; pathOr<TSomeProp[], TSomeProp[]>([], ['aaa'], item);
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
propOr
The text was updated successfully, but these errors were encountered:
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
Sorry, something went wrong.
Got you, thanks!
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: