Skip to content

Conversation

oconnorjoseph
Copy link

This PR takes #98 a step further to force the type system to reflect the recursive transformation of array field types into the object structure presented in the README examples. Those examples show that we cannot simply use Partial<T> for the return type of each function. To recap,

diff({ bar: ['a', 'b'] }, { bar: ['a'] }));

Evaluates to:

{
  bar: {
    '1': undefined
  }
}

So the type returned by diff must reflect that as well. That is the purpose of this PR'sDiffRemovable<T> type.

@oconnorjoseph
Copy link
Author

@mattphillips senpai notice me

@builtbyjavi
Copy link

@mattphillips +1 senpai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants