New issue
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
[lodash_v4.x.x] lodash.values generic parameters #3005
Conversation
Thanks for the PR! Currently your build is failing, and we'll need that to pass to merge it in. You can check out the build in Travis, or read about running libdef tests locally in CONTRIBUTING.md. |
Locally I'm seeing this:
|
Just to confirm, these failures already exist in f0bbb7e
And voila:
So I at least didn't increase any errors or warnings: https://travis-ci.org/flow-typed/flow-typed/jobs/470139319#L1237 |
Tests will pass once #3020 lands. |
@AndrewSouthpaw test failures were fixed in #3020 so this is passing now. I also added a test for the new type definition in 81d6c2d. |
@villesau is this ok to go? |
@beaucollins I think this is a bit problematic, for the same reasons why native For exact objects it's a different story though, there all possible values are known beforehand. |
The existing
values
definition is:So if you use an Object with an indexer definition, the type gets erased when using
lodash.values
By adding an overload on
values
that accepts indexed types we get to keep the correct type: