-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Typescript definitions #48
base: main
Are you sure you want to change the base?
Conversation
Awesome @nikolayg, thanks for this :) @mattphillips would be awesome to get this merged, please :) |
+1 |
@nikolayg thanks for it). It is interesting why PR is still not merged.🤔 |
I'm not sure that it works this way. The originalObj and updatedObj could be fully unrelated and therefore typing both to |
friendly ping @mattphillips |
@Bessonov I agree with you. This looks safe enough to me though, since each property of I've not searched the space much, but I imagine it's fairly uncommon to compare objects of two different types. In my own code at least, if I'm expecting a field to have been added to an object, that field would at least be defined on the type of the original as optional (potentially |
I don't think these type defs are actually accurate, they don't recurse on Arrays and they error on the example usage in the project readme as shown in screenshot. I've taken a quick stab at writing some more advanced type definitions here: #88. If anyone wants to test drive them on a project and provide any issues/feedback on that PR that would be greatly appreciated. |
Hey guys,
I've created some more accurate Typescript definitions for
deep-object-diff
. I would be happy if you merge them, so I can use them directly from the npm module :)