-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update: omit #84
Update: omit #84
Conversation
@lautarodragan it was easier to fix your issue #81 (comment) by making my own MR The problem as far as I can tell is Typescript itself. While not the ideal solution, what I was able to do is make it return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I've tested this PR my code and it works as expected.
Maybe unrelated, but it didn't feel nice to see my PR being closed, replaced by another, after the effort and time I spent on it. I don't assume any bad intentions, but definitely doesn't feel welcoming.
Regardless, I appreciate that omit
will now be type-safe, and that you found a way to implement so; and, more broadly, your work bringing type safety to Ramda.
Thank you for the constructive criticism, I'll work on my communication so for the future instead of close+replace we'll keep the initial MR for these cases |
I pushed some additional changes, can you retest and let me know if everything is still working as expected, please and thank you |
26e31cd
to
1b64889
Compare
Thanks ❤️
I just did a couple of manual tests in my code base and it works perfectly! It correctly reports errors when I try to access fields I've omitted, both with the curried and non-curried versions; and the non-omitted fields are still accessibly and correctly typed. When including in the omit list a field that does not exist in the object type it infers the type as I think this even uncovered an existing bug in the code base. 🚀 |
@lautarodragan accepting that as a Virtual "Approve" and merging |
typing
omit
same aspick
Additional fix for optional properties for
pick